/* The Excuse Generator - Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-hover: #252542;
    --text: #f1f1f1;
    --text-muted: #a0a0b0;
    --border: #2a2a4a;
    --success: #10b981;
    --warning: #f59e0b;
    --accent: #8b5cf6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-style: italic;
}

.controls {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-of-type {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

select:hover {
    border-color: var(--primary);
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

#generateBtn {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

#generateBtn:active {
    transform: translateY(0);
}

.excuse-display {
    background: linear-gradient(135deg, var(--bg-card), #16213e);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    border: 2px solid var(--border);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.excuse-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.excuse-content {
    position: relative;
    z-index: 1;
}

.excuse-content p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text);
}

.excuse-content .placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.excuse-content .main-excuse {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.excuse-content .elaboration {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.excuse-meta {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag {
    background: var(--bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary);
    border: 1px solid var(--border);
}

.actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn.secondary {
    flex: 0;
    background: transparent;
    border-style: dashed;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.credit {
    margin-top: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.close:hover {
    color: var(--text);
}

.modal-content h2 {
    margin-bottom: 12px;
}

.modal-content > p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.code-section {
    margin-bottom: 24px;
}

.code-section h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text);
}

.code-block {
    background: var(--bg);
    padding: 12px 16px;
    border-radius: 8px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    color: var(--secondary);
}

.param-table {
    width: 100%;
    border-collapse: collapse;
}

.param-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.param-table td:first-child {
    font-weight: 600;
    color: var(--primary);
    width: 100px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px 16px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .excuse-display {
        padding: 24px 20px;
    }

    .excuse-content p {
        font-size: 1.1rem;
    }

    .actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .stats {
        flex-direction: column;
        gap: 20px;
    }
}
