/* ===== CSS Variables & Reset ===== */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #ec4899;
    --accent-4: #14b8a6;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== Background Effects ===== */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-3);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-4);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(20px, 30px) scale(1.05);
    }
}

/* ===== Container ===== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ===== Header ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-emoji {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.logo-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-mode-badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* ===== Progress Navigation ===== */
.progress-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.5;
}

.step.active {
    opacity: 1;
    background: var(--gradient-1);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.step.completed {
    opacity: 1;
    background: var(--accent-4);
    border-color: transparent;
}

.step-icon {
    font-size: 1.5rem;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(20px);
    padding: 30px;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ===== Main Content ===== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.game-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== Mode Selection ===== */
.mode-selection {
    margin-bottom: 30px;
}

.mode-selection h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-weight: 600;
}

.mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 15px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.mode-card:hover {
    transform: scale(1.05);
    border-color: var(--accent-1);
}

.mode-card.selected {
    border-color: var(--accent-2);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.mode-emoji {
    font-size: 2.5rem;
}

.mode-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.mode-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ===== Team Setup ===== */
.team-setup {
    margin-bottom: 30px;
}

.team-setup h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-weight: 600;
}

.team-count {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.team-count label {
    font-weight: 600;
}

.count-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-count {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-1);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-count:hover {
    transform: scale(1.1);
}

.count-controls span {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.teams-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.team-input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.team-input input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 15px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.team-input input:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.team-input input::placeholder {
    color: var(--text-secondary);
}

.team-color {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.team-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* ===== Buttons ===== */
.btn-primary {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto 0;
    padding: 16px 30px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50px;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.btn-start {
    background: var(--gradient-2);
    box-shadow: 0 10px 30px rgba(20, 184, 166, 0.4);
}

.btn-start:hover {
    box-shadow: 0 15px 40px rgba(20, 184, 166, 0.5);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.btn-action {
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-random {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.btn-random:hover {
    transform: scale(1.05);
}

.btn-timer {
    background: var(--gradient-3);
    color: white;
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
}

.btn-timer:hover {
    transform: scale(1.05);
}

.btn-task {
    background: var(--gradient-2);
    color: white;
    box-shadow: 0 5px 20px rgba(20, 184, 166, 0.4);
}

.btn-task:hover {
    transform: scale(1.05);
}

/* Truth or Dare Buttons */
.btn-truth {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    box-shadow: 0 5px 25px rgba(99, 102, 241, 0.5);
    font-size: 1.2rem;
    padding: 18px 40px;
}

.btn-truth:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 35px rgba(99, 102, 241, 0.6);
}

.btn-dare {
    background: linear-gradient(135deg, #ef4444, #ec4899);
    color: white;
    box-shadow: 0 5px 25px rgba(239, 68, 68, 0.5);
    font-size: 1.2rem;
    padding: 18px 40px;
}

.btn-dare:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 35px rgba(239, 68, 68, 0.6);
}

/* Next Turn Button */
.btn-next-turn {
    background: linear-gradient(135deg, #14b8a6, #06b6d4);
    color: white;
    box-shadow: 0 5px 25px rgba(20, 184, 166, 0.5);
}

.btn-next-turn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 35px rgba(20, 184, 166, 0.6);
}

.turn-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Player Turn Indicator */
.player-turn-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 30px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: var(--border-radius-lg);
    animation: turnPulse 2s ease-in-out infinite;
}

@keyframes turnPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

.turn-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.turn-player-name {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.turn-player-avatar {
    font-size: 2.5rem;
    animation: bounce 1s ease-in-out infinite;
}

.btn-next {
    display: block;
    width: fit-content;
    margin: 30px auto 0;
    padding: 14px 40px;
    background: transparent;
    border: 2px solid var(--accent-1);
    border-radius: 50px;
    color: var(--accent-1);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-next:hover {
    background: var(--accent-1);
    color: white;
}

/* ===== Challenge/Question Cards ===== */
.challenge-card,
.question-card,
.special-card {
    max-width: 600px;
    margin: 0 auto;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-1);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-badge.special {
    background: var(--gradient-3);
}

.card-content {
    text-align: center;
    padding: 20px;
}

.card-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.card-text {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.8;
}

/* ===== Power-ups ===== */
.power-ups {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-power {
    padding: 12px 24px;
    border: 2px solid var(--accent-2);
    border-radius: 50px;
    background: transparent;
    color: var(--accent-2);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-power:hover {
    background: var(--accent-2);
    color: white;
}

.btn-steal {
    border-color: var(--accent-3);
    color: var(--accent-3);
}

.btn-steal:hover {
    background: var(--accent-3);
    color: white;
}

/* ===== Results ===== */
.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.result-card.winner {
    background: var(--gradient-1);
    border: none;
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.result-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-score {
    font-size: 2.5rem;
    font-weight: 800;
}

.winner-announcement {
    text-align: center;
    padding: 30px;
    margin-bottom: 20px;
}

.winner-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.winner-name {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Score Panel ===== */
.score-panel {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    backdrop-filter: blur(20px);
    min-width: 180px;
    display: none;
    z-index: 100;
}

.score-panel.visible {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.score-panel h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.scores {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.score-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.score-team {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-team-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.score-value {
    font-weight: 800;
    font-size: 1.2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    padding: 40px;
    text-align: center;
    min-width: 300px;
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Timer Modal ===== */
.timer-display {
    font-size: 6rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.timer-display.warning {
    background: var(--gradient-3);
    -webkit-background-clip: text;
    background-clip: text;
    animation: pulse 0.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-timer-control {
    padding: 10px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-timer-control.active {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: white;
}

.btn-timer-control:hover {
    border-color: var(--accent-1);
}

/* ===== Score Edit Modal ===== */
.score-edit {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.score-edit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.score-edit-name {
    font-weight: 600;
}

.score-edit-controls {
    display: flex;
    gap: 10px;
}

.btn-score {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-score.minus {
    background: var(--accent-3);
    color: white;
}

.btn-score.plus {
    background: var(--accent-4);
    color: white;
}

.btn-score:hover {
    transform: scale(1.1);
}

/* ===== Confetti ===== */
#confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-1);
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px 10px;
        padding-bottom: 180px;
        /* Space for score panel */
    }

    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 15px 0;
        margin-bottom: 15px;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .game-mode-badge {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .btn-contribute {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .progress-nav {
        gap: 6px;
        margin-bottom: 20px;
    }

    .step {
        padding: 10px 15px;
        flex: 1;
        min-width: 70px;
    }

    .step-icon {
        font-size: 1.3rem;
    }

    .step-label {
        display: none;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    /* Mode Selection Mobile */
    .mode-selection {
        margin-bottom: 20px;
    }

    .mode-selection h3 {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .mode-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mode-card {
        padding: 18px 10px;
        gap: 8px;
    }

    .mode-emoji {
        font-size: 2rem;
    }

    .mode-name {
        font-size: 0.85rem;
    }

    .mode-desc {
        font-size: 0.7rem;
    }

    /* Team Setup Mobile */
    .team-setup h3 {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .team-count {
        gap: 15px;
        margin-bottom: 15px;
    }

    .teams-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .team-input {
        padding: 12px;
    }

    .team-input input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Player Turn Indicator Mobile */
    .player-turn-indicator {
        flex-direction: column;
        gap: 8px;
        padding: 15px 20px;
        margin-bottom: 20px;
    }

    .turn-player-name {
        font-size: 1.3rem;
    }

    .turn-player-avatar {
        font-size: 2rem;
    }

    /* Cards Mobile */
    .glass-card {
        padding: 20px;
    }

    .challenge-card,
    .question-card,
    .special-card {
        min-height: 200px;
        margin: 0 auto;
    }

    .card-badge {
        top: 15px;
        left: 15px;
        padding: 5px 12px;
        font-size: 0.75rem;
    }

    .card-content {
        padding: 15px;
    }

    .card-emoji {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    .card-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Buttons Mobile */
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 20px 0;
    }

    .btn-action {
        width: 100%;
        max-width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .btn-truth,
    .btn-dare {
        font-size: 1.1rem;
        padding: 16px 30px;
    }

    .turn-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 15px;
    }

    .btn-next {
        width: 100%;
        padding: 12px 30px;
        margin-top: 20px;
    }

    .btn-primary {
        max-width: 100%;
        padding: 14px 25px;
        font-size: 1rem;
    }

    /* Power-ups Mobile */
    .power-ups {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn-power {
        width: 100%;
        padding: 12px 20px;
    }

    /* Score Panel Mobile - Bottom Fixed */
    .score-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 10px;
        transform: none;
        min-width: unset;
        max-height: 150px;
        overflow-y: auto;
        padding: 15px;
    }

    .score-panel h3 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .scores {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .score-item {
        flex: 1 1 45%;
        min-width: 120px;
        padding: 8px 10px;
    }

    .score-team {
        font-size: 0.8rem;
    }

    .score-value {
        font-size: 1rem;
    }

    /* Results Mobile */
    .results-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .result-card {
        padding: 18px;
    }

    .result-name {
        font-size: 0.95rem;
    }

    .result-score {
        font-size: 2rem;
    }

    .winner-announcement {
        padding: 20px;
    }

    .winner-text {
        font-size: 1.2rem;
    }

    .winner-name {
        font-size: 1.5rem;
    }

    /* Timer Modal Mobile */
    .timer-display {
        font-size: 4rem;
    }

    .timer-controls {
        gap: 8px;
    }

    .btn-timer-control {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* Modal Mobile */
    .modal-content {
        padding: 25px 20px;
        margin: 15px;
        width: calc(100% - 30px);
    }

    /* Punishment Section Mobile */
    .punishment-section h3 {
        font-size: 1rem;
    }

    .punishment-levels {
        flex-direction: row;
        gap: 8px;
    }

    .btn-punishment {
        padding: 10px 15px;
        font-size: 0.85rem;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px 8px;
        padding-bottom: 170px;
    }

    .mode-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .mode-card {
        padding: 15px 8px;
    }

    .mode-emoji {
        font-size: 1.8rem;
    }

    .teams-container {
        grid-template-columns: 1fr;
    }

    .results-container {
        grid-template-columns: 1fr;
    }

    .score-item {
        flex: 1 1 100%;
    }

    .punishment-levels {
        flex-direction: column;
    }

    .btn-punishment {
        width: 100%;
    }
}

/* ===== Header Actions ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-contribute {
    padding: 10px 20px;
    background: var(--gradient-2);
    border: none;
    border-radius: 30px;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(20, 184, 166, 0.3);
}

.btn-contribute:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.4);
}

/* ===== Contribute Modal ===== */
.contribute-modal {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.contribute-modal h3 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.5rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contribute-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.contribute-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-secondary);
    color: white;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-4);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
}

.contribute-stats {
    text-align: center;
    padding: 15px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 12px;
    color: var(--accent-4);
}

.contribute-stats strong {
    font-size: 1.3rem;
    color: white;
}

.btn-submit {
    margin-top: 10px;
}

.contributed-list {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.contributed-list h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.contributed-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.contributed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contributed-item-text {
    flex: 1;
    font-size: 0.9rem;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contributed-item-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: var(--accent-1);
    border-radius: 20px;
    white-space: nowrap;
}

.btn-delete-contrib {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 10px;
    transition: var(--transition);
}

.btn-delete-contrib:hover {
    background: #ef4444;
    color: white;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(20px);
    animation: toastIn 0.5s ease, toastOut 0.5s ease 2.5s forwards;
    pointer-events: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

.toast-icon {
    font-size: 1.5rem;
    animation: bounce 1s ease-in-out infinite;
}

.toast-content {
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toast.success {
    border-color: var(--accent-4);
    box-shadow: 0 10px 40px rgba(20, 184, 166, 0.3);
}

.toast.celebration {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.3));
    border-color: var(--accent-3);
}

.toast.encouragement {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
    border-color: #f59e0b;
}

/* ===== Achievement Popup ===== */
.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-popup.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.achievement-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 60px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.5);
    text-align: center;
}

.achievement-icon {
    font-size: 5rem;
    animation: achievementBounce 0.6s ease infinite;
}

@keyframes achievementBounce {

    0%,
    100% {
        transform: scale(1) rotate(-5deg);
    }

    50% {
        transform: scale(1.2) rotate(5deg);
    }
}

.achievement-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.achievement-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.achievement-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== Encouragement Streak Display ===== */
.streak-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f59e0b;
}

.streak-display .streak-fire {
    animation: firePulse 0.5s ease infinite;
}

@keyframes firePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ===== Mobile adjustments for new features ===== */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-contribute {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .contribute-modal {
        max-height: 90vh;
        padding: 25px;
    }

    .toast {
        padding: 12px 18px;
        border-radius: 30px;
        max-width: 90vw;
    }

    .achievement-content {
        padding: 30px 40px;
    }

    .achievement-icon {
        font-size: 4rem;
    }
}

/* ===== Header Icon Buttons ===== */
.btn-header-icon {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-header-icon:hover {
    background: var(--accent-1);
    transform: scale(1.1);
}

.btn-header-icon.active {
    background: var(--gradient-1);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.btn-header-icon.muted {
    opacity: 0.5;
}

/* ===== MC Mode Banner ===== */
.mc-mode-banner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.mc-mode-banner.active {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mc-mode-banner span {
    font-weight: 600;
    color: #f59e0b;
}

.btn-mc-hide {
    padding: 8px 16px;
    border: 1px solid #f59e0b;
    border-radius: 20px;
    background: transparent;
    color: #f59e0b;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-mc-hide:hover {
    background: #f59e0b;
    color: white;
}

/* ===== Punishment Section ===== */
.punishment-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.punishment-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--accent-3);
}

.punishment-levels {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-punishment {
    padding: 12px 24px;
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    background: var(--glass-bg);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-punishment:hover {
    transform: scale(1.05);
}

.btn-punishment[data-level="light"]:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
}

.btn-punishment[data-level="medium"]:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.2);
}

.btn-punishment[data-level="heavy"]:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
}

.punishment-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 25px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.punishment-card p {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* ===== Punishment Modal ===== */
.punishment-display {
    text-align: center;
    padding: 20px;
}

.punishment-emoji {
    font-size: 5rem;
    display: block;
    margin-bottom: 20px;
    animation: shake 0.5s ease infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0) rotate(0);
    }

    25% {
        transform: translateX(-5px) rotate(-5deg);
    }

    75% {
        transform: translateX(5px) rotate(5deg);
    }
}

.punishment-text {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ===== History Modal ===== */
.history-modal {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.history-modal h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 15px;
    border-left: 4px solid var(--accent-1);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-item-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-item-mode {
    font-size: 0.85rem;
    padding: 4px 12px;
    background: var(--accent-1);
    border-radius: 20px;
}

.history-item-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-team {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.9rem;
}

.history-team.winner {
    background: rgba(20, 184, 166, 0.2);
    border: 1px solid var(--accent-4);
}

.history-team-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.history-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 12px 24px;
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    background: var(--glass-bg);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
}

.history-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* ===== Answer Hidden Mode ===== */
.answer-hidden .card-text {
    filter: blur(10px);
    user-select: none;
}

.answer-hidden .card-text:hover {
    filter: blur(5px);
}

/* ===== Sound Indicator ===== */
.sound-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
}

.sound-wave span {
    width: 3px;
    height: 100%;
    background: currentColor;
    border-radius: 3px;
    animation: soundWave 0.5s ease-in-out infinite;
}

.sound-wave span:nth-child(2) {
    animation-delay: 0.1s;
}

.sound-wave span:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes soundWave {

    0%,
    100% {
        transform: scaleY(0.3);
    }

    50% {
        transform: scaleY(1);
    }
}

/* ===== Mobile adjustments for Phase 2 ===== */
@media (max-width: 768px) {
    .btn-header-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .mc-mode-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .punishment-levels {
        flex-direction: column;
        align-items: center;
    }

    .btn-punishment {
        width: 100%;
        max-width: 200px;
    }

    .history-item-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .history-actions {
        flex-direction: column;
    }

    .btn-secondary {
        width: 100%;
    }
}