/* ============================================
   REVERSE TURING TEST PAGE STYLES
   ============================================ */

.turing-layout {
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.turing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.turing-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    background: linear-gradient(135deg, #A5EEFF 0%, #8B5CF6 50%, #64C2A6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
}

.turing-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
}

/* Lobby Styles */
.lobby-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.game-explanation {
    background: linear-gradient(145deg, rgba(45, 50, 55, 0.8), rgba(35, 40, 45, 0.6));
    border: 1px solid rgba(165, 238, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.game-explanation h3 {
    color: #A5EEFF;
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

.game-explanation p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.game-explanation ul {
    margin: 0;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.game-explanation li {
    margin-bottom: 0.5rem;
}

/* Name Input */
.name-input-section {
    margin-bottom: 1.5rem;
    text-align: center;
}

.name-input-section label {
    display: block;
    color: rgba(165, 238, 255, 0.8);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.name-input {
    max-width: 300px;
    margin: 0 auto;
}

.name-input .mud-input-outlined-border {
    border-color: rgba(165, 238, 255, 0.3) !important;
    border-width: 2px !important;
    border-radius: 12px !important;
}

.name-input:focus-within .mud-input-outlined-border {
    border-color: #A5EEFF !important;
    box-shadow: 0 0 15px rgba(165, 238, 255, 0.2);
}

.name-input input {
    color: #fff !important;
    font-size: 1.1rem !important;
    text-align: center;
}

.rounds-selector {
    margin-bottom: 2rem;
}

.rounds-selector label {
    display: block;
    color: rgba(165, 238, 255, 0.8);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.round-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.round-btn {
    width: 56px;
    height: 56px;
    border: 2px solid rgba(165, 238, 255, 0.3);
    border-radius: 12px;
    background: transparent;
    color: #A5EEFF;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.round-btn:hover {
    border-color: rgba(165, 238, 255, 0.6);
    background: rgba(165, 238, 255, 0.1);
}

.round-btn.active {
    background: linear-gradient(145deg, #23668b, #2d7ba0);
    border-color: #23668b;
    color: #fff;
    box-shadow: 0 4px 12px rgba(35, 102, 139, 0.4);
}

/* Mode Selector */
.mode-selector {
    margin-bottom: 2rem;
    text-align: center;
}

.mode-selector label {
    display: block;
    color: rgba(165, 238, 255, 0.8);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.mode-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(165, 238, 255, 0.3);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.mode-btn:hover {
    border-color: rgba(165, 238, 255, 0.6);
    background: rgba(165, 238, 255, 0.1);
}

.mode-btn.active {
    background: linear-gradient(145deg, rgba(35, 102, 139, 0.4), rgba(35, 102, 139, 0.2));
    border-color: #23668b;
    box-shadow: 0 4px 12px rgba(35, 102, 139, 0.3);
}

.mode-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.mode-label {
    color: #A5EEFF;
    font-weight: 600;
    font-size: 0.95rem;
}

.mode-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.start-game-btn {
    min-width: 200px !important;
    height: 56px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    text-transform: none !important;
}

/* Game Container */
.game-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Round Info */
.round-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.round-badge, .phase-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.round-badge {
    background: rgba(35, 102, 139, 0.3);
    border: 1px solid rgba(35, 102, 139, 0.5);
    color: #A5EEFF;
}

.phase-badge {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #C4B5FD;
}

/* Player Cards */
.player-cards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.player-card {
    width: 100px;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(45, 50, 55, 0.8), rgba(35, 40, 45, 0.6));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.player-card.is-you {
    border-color: var(--player-color);
    box-shadow: 0 0 20px color-mix(in srgb, var(--player-color) 30%, transparent);
}

.player-card.voted-for {
    animation: pulse-vote 1s ease-in-out infinite;
}

@keyframes pulse-vote {
    0%, 100% {
        box-shadow: 0 0 15px color-mix(in srgb, var(--player-color) 20%, transparent);
    }
    50% {
        box-shadow: 0 0 25px color-mix(in srgb, var(--player-color) 40%, transparent);
    }
}

.player-avatar {
    width: 48px;
    height: 48px;
    background: var(--player-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.player-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--player-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.you-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #64C2A6, #23668b);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.votes-received {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

/* Question Box */
.question-box {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.15), rgba(35, 102, 139, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.question-label {
    display: block;
    color: rgba(139, 92, 246, 0.8);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.question-text {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

/* Responses Container */
.responses-container {
    background: rgba(30, 35, 40, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.response-bubble {
    background: linear-gradient(145deg, rgba(45, 50, 55, 0.9), rgba(35, 40, 45, 0.7));
    border-left: 3px solid var(--player-color);
    border-radius: 0 12px 12px 0;
    padding: 0.75rem 1rem;
    animation: fadeIn 0.3s ease;
}

.response-bubble.previous {
    opacity: 0.7;
}

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

.response-player {
    color: var(--player-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.response-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Previous Rounds */
.previous-round {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.round-divider {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.previous-question {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0.75rem;
    text-align: center;
}

/* Input Area */
.input-area {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.response-input {
    flex: 1;
}

.response-input .mud-input-outlined-border {
    border-color: rgba(165, 238, 255, 0.3) !important;
    border-width: 2px !important;
    border-radius: 12px !important;
}

.response-input:focus-within .mud-input-outlined-border {
    border-color: #A5EEFF !important;
    box-shadow: 0 0 15px rgba(165, 238, 255, 0.2);
}

.response-input input {
    color: #fff !important;
    font-size: 1rem !important;
}

.submit-btn {
    min-width: 100px !important;
    border-radius: 12px !important;
    text-transform: none !important;
    font-weight: 600 !important;
}

/* Waiting/Voting Indicators */
.waiting-indicator, .voting-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(30, 35, 40, 0.5);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Results Container */
.results-container {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(145deg, rgba(45, 50, 55, 0.8), rgba(35, 40, 45, 0.6));
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.results-container.won {
    border-color: rgba(100, 194, 166, 0.5);
    background: linear-gradient(145deg, rgba(100, 194, 166, 0.15), rgba(35, 40, 45, 0.6));
}

.results-container.lost {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.1), rgba(35, 40, 45, 0.6));
}

.result-banner {
    margin-bottom: 2rem;
}

.result-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.result-title.win {
    background: linear-gradient(135deg, #64C2A6, #A5EEFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-title.lose {
    background: linear-gradient(135deg, #EF4444, #F87171);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin: 0;
}

/* Votes Breakdown */
.votes-breakdown {
    margin-bottom: 2rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.votes-breakdown h3 {
    color: #A5EEFF;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vote-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.voter {
    font-weight: 600;
}

.vote-arrow {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.voted-for {
    font-weight: 600;
}

.voted-for.correct {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 5px currentColor;
    }
    50% {
        text-shadow: 0 0 20px currentColor;
    }
}

.correct-badge {
    background: rgba(100, 194, 166, 0.2);
    color: #64C2A6;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.25rem;
}

.vote-reasoning {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-left: 1rem;
    margin-bottom: 1rem;
    font-style: italic;
    line-height: 1.4;
}

/* Reveal Section */
.reveal-section {
    margin-bottom: 2rem;
}

.reveal-section h3 {
    color: #A5EEFF;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.identity-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.identity-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--player-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 120px;
}

.identity-name {
    display: block;
    color: var(--player-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.identity-type {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* AI Feedback Section */
.feedback-section {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.feedback-section h3 {
    color: #A5EEFF;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feedback-item {
    background: linear-gradient(145deg, rgba(45, 50, 55, 0.6), rgba(35, 40, 45, 0.4));
    border-left: 3px solid var(--player-color);
    border-radius: 0 12px 12px 0;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.feedback-item:last-child {
    margin-bottom: 0;
}

.feedback-player {
    color: var(--player-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.feedback-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.5;
}

.feedback-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Game Transcript Section */
.transcript-section {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.transcript-section h3 {
    color: #A5EEFF;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.transcript-round {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.transcript-round:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.transcript-round-header {
    color: rgba(165, 238, 255, 0.8);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.transcript-round-header.bonus {
    color: #C4B5FD;
}

.transcript-question {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(139, 92, 246, 0.4);
}

.transcript-response {
    background: linear-gradient(145deg, rgba(45, 50, 55, 0.4), rgba(35, 40, 45, 0.2));
    border-left: 3px solid var(--player-color);
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.transcript-response:last-child {
    margin-bottom: 0;
}

.transcript-player {
    color: var(--player-color);
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.transcript-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

.transcript-bonus-exchange {
    margin-bottom: 1rem;
}

.transcript-bonus-exchange:last-child {
    margin-bottom: 0;
}

.transcript-question-asked {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.transcript-question-asked em {
    color: rgba(255, 255, 255, 0.8);
}

.play-again-btn {
    min-width: 180px !important;
    height: 50px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    text-transform: none !important;
}

/* Bonus Round Styles */
.round-badge.bonus {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(100, 194, 166, 0.3));
    border: 1px solid rgba(139, 92, 246, 0.5);
    color: #C4B5FD;
}

.bonus-round-container {
    text-align: center;
}

.bonus-explanation {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.15), rgba(100, 194, 166, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.bonus-explanation h3 {
    color: #C4B5FD;
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
}

.bonus-explanation p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.bonus-hint {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.9rem;
    font-style: italic;
}

.question-box.bonus {
    background: linear-gradient(145deg, rgba(100, 194, 166, 0.15), rgba(35, 102, 139, 0.1));
    border: 1px solid rgba(100, 194, 166, 0.3);
}

.round-divider.bonus {
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
    padding: 0.25rem 1rem;
    border-radius: 8px;
    color: #C4B5FD;
}

.bonus-exchange {
    margin-bottom: 1rem;
}

.bonus-question-line {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), transparent);
    border-left: 3px solid var(--player-color);
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.bonus-question-line .response-player {
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .turing-layout {
        padding: 1rem;
    }

    .turing-title {
        font-size: 1.75rem;
    }

    .game-explanation {
        padding: 1.25rem;
    }

    .player-cards {
        gap: 0.5rem;
    }

    .player-card {
        width: 80px;
        padding: 0.75rem;
    }

    .player-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .player-name {
        font-size: 0.8rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .input-area {
        flex-direction: column;
    }

    .submit-btn {
        width: 100% !important;
    }

    .result-title {
        font-size: 2rem;
    }

    .identity-grid {
        gap: 0.5rem;
    }

    .identity-card {
        min-width: 100px;
        padding: 0.75rem 1rem;
    }

    .vote-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .vote-reasoning {
        margin-left: 0;
    }
}

/* Scrollbar Styling */
.responses-container::-webkit-scrollbar {
    width: 8px;
}

.responses-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.responses-container::-webkit-scrollbar-thumb {
    background: rgba(165, 238, 255, 0.3);
    border-radius: 4px;
}

.responses-container::-webkit-scrollbar-thumb:hover {
    background: rgba(165, 238, 255, 0.5);
}
