/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', sans-serif;
    height: 100%;
}

/* Main Container */
.main {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
.genie-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.genie-subtitle {
    text-align: center;
    color: #9ca3af;
    font-size: 1rem;
    margin-bottom: 32px;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #a78bfa;
}

.stat-label {
    font-size: 0.78rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Progress Bar */
.progress-wrap {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #60a5fa);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 24px 0;
}

/* Screens */
.screen {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Start Screen */
.instructions {
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1.8;
    margin: 20px 0 32px 20px;
}

.instructions li {
    margin-bottom: 12px;
}

.instructions strong {
    color: #f3f4f6;
}

h3 {
    color: #f3f4f6;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* Question Card */
.question-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
}

.question-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f3f4f6;
    line-height: 1.5;
}

/* Answer Buttons */
.answer-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.answer-btn {
    flex: 1;
    min-width: 140px;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.answer-btn:hover {
    background: linear-gradient(135deg, #9370f0, #4f94e6);
    transform: translateY(-2px);
}

.answer-btn:active {
    transform: translateY(0);
}

.answer-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.force-guess-container {
    text-align: center;
    margin-top: 12px;
}

/* Reveal Answer Section */
.reveal-answer-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    text-align: center;
}

.reveal-prompt {
    color: #f3f4f6;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.answer-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    color: #f3f4f6;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #a78bfa;
    background: rgba(255, 255, 255, 0.12);
}

.answer-input::placeholder {
    color: #9ca3af;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9370f0, #4f94e6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-full {
    width: 100%;
}

.btn-grow {
    flex: 1;
}

.button-row {
    display: flex;
    gap: 12px;
}

/* Thinking Spinner */
.thinking-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.thinking-text {
    color: #9ca3af;
    font-size: 1.1rem;
}

/* Guess Reveal */
.guess-reveal {
    text-align: center;
    padding: 28px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 20px;
    margin-bottom: 20px;
}

.guess-label-sm {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 6px;
}

.guess-name {
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Finish Banner */
.finish-banner {
    text-align: center;
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.finish-banner.finish-win {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #16a34a;
}

.finish-banner.finish-lose {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid #dc2626;
}

.finish-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.finish-message {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f3f4f6;
}

/* History Expander */
.history-expander {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    color: #d1d5db;
}

.history-expander summary {
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    list-style: none;
}

.history-expander summary::-webkit-details-marker {
    display: none;
}

.history-expander summary::before {
    content: '▶ ';
    display: inline-block;
    transition: transform 0.2s;
}

.history-expander[open] summary::before {
    transform: rotate(90deg);
}

.history-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.history-item {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    line-height: 1.6;
}

.history-item strong {
    color: #a78bfa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .genie-title {
        font-size: 2rem;
    }

    .stats-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .answer-buttons {
        flex-direction: column;
    }

    .answer-btn {
        min-width: 100%;
    }

    .button-row {
        flex-direction: column;
    }

    .guess-name {
        font-size: 1.8rem;
    }
}

