.chat-toggle {
  position: fixed;
  right: 12px;
  bottom: 12px;
  background: #2b6cb0;
  color: #fff;
  border-radius: 20px;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 3500;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.chat-panel {
  position: fixed;
  right: 12px;
  bottom: 60px;
  width: min(320px, 92vw);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  z-index: 3500;
}

.chat-panel.hidden {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  background: #f7fafc;
}

.chat-messages {
  padding: 10px;
  max-height: 40vh;
  overflow-y: auto;
  font-size: 0.95rem;
}

.chat-input {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid #eee;
}

.chat-input input {
  flex: 1;
  font-size: 16px; /* Prevent iOS Safari zoom on focus */
}

.chat-input button {
  font-size: 16px; /* Keep controls consistent size on mobile */
}

.chat-msg {
  margin: 6px 0;
}

.chat-name {
  font-weight: 600;
  margin-right: 6px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.joeparty-logo {
    width: 100%;
    max-width: 250px;
    margin-bottom: 10px;
}
.joeparty-logo.small {
    max-width: 100px;
    margin-bottom: 0px;
}


.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Daily Double Modal */
.daily-double-content {
    text-align: center;
    max-width: 400px;
}

.daily-double-title {
    font-size: 2.5rem;
    color: #f6ad55;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0,0,0,0.3), 0 0 10px rgba(246, 173, 85, 0.5); }
    to { text-shadow: 2px 2px 4px rgba(0,0,0,0.3), 0 0 20px rgba(246, 173, 85, 0.8); }
}

.wager-section {
    margin: 2rem 0;
}

.wager-section label {
    display: block;
    margin-bottom: 1rem;
    font-weight: bold;
    font-size: 1.1rem;
}

#wager-input {
    width: 200px;
    padding: 0.75rem;
    font-size: 1.2rem;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#wager-input:focus {
    border-color: #f6ad55;
    outline: none;
    box-shadow: 0 0 0 3px rgba(246, 173, 85, 0.1);
}

/* Final Jeopardy Wager Input */
#final-wager-input {
    width: 250px;
    padding: 1rem;
    font-size: 1.5rem;
    text-align: center;
    border: 3px solid #f6d55c;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background: rgba(246, 213, 92, 0.05);
    color: #2d3748;
    font-weight: bold;
}

#final-wager-input:focus {
    border-color: #f6d55c;
    outline: none;
    box-shadow: 0 0 0 4px rgba(246, 213, 92, 0.2);
    background: rgba(246, 213, 92, 0.1);
}

.wager-buttons {
    margin-top: 1rem;
}

#submit-wager {
    background: linear-gradient(135deg, #f6ad55, #ed8936);
    color: #1a202c;
    font-weight: bold;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

#submit-wager:hover {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

/* Final Jeopardy Styles */
.final-jeopardy-content {
    text-align: center;
    max-width: 600px;
}

.final-jeopardy-title {
    font-size: 2.5rem;
    color: #f6d55c;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: goldGlow 3s ease-in-out infinite alternate;
}

@keyframes goldGlow {
    from { text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 15px rgba(246, 213, 92, 0.5); }
    to { text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 25px rgba(246, 213, 92, 0.8); }
}

.spectator-message {
    padding: 2rem;
}

.broke-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

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

.jab-message {
    font-size: 1.2rem;
    color: #f093fb;
    font-weight: bold;
    margin: 1rem 0;
    font-style: italic;
}

.spectator-info {
    margin-top: 2rem;
    text-align: left;
}

.spectator-info h4 {
    color: #667eea;
    margin: 1rem 0 0.5rem 0;
}

.player-chip {
    display: inline-block;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    font-size: 0.9rem;
    color: #000000;
}

.player-chip.broke {
    background: rgba(240, 147, 251, 0.2);
    border-color: rgba(240, 147, 251, 0.3);
    color: #f093fb;
}

.final-category {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.final-wager-display {
    font-size: 1.3rem;
    color: #f6d55c;
    font-weight: bold;
    margin-bottom: 2rem;
    padding: 0.75rem;
    background: rgba(246, 213, 92, 0.1);
    border-radius: 8px;
    border: 2px solid rgba(246, 213, 92, 0.3);
}

.timer-display {
    margin-top: 2rem;
    font-size: 1.2rem;
    color: #ed8936;
    font-weight: bold;
}

#final-time-remaining {
    font-size: 1.5rem;
    color: #f56565;
}

.waiting-message {
    padding: 2rem;
}

.spinner {
    font-size: 3rem;
    animation: spin 2s linear infinite;
}

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

.results-list {
    margin-top: 2rem;
}

.result-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid;
}

.result-item.correct {
    border-left-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

.result-item.incorrect {
    border-left-color: #f56565;
    background: rgba(245, 101, 101, 0.1);
}

.result-player {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.result-answer, .result-wager {
    margin: 0.25rem 0;
    color: green;
}

.result-change {
    font-weight: bold;
    font-size: 1.1rem;
}

.result-change.positive {
    color: #48bb78;
}

.result-change.negative {
    color: #f56565;
}

.result-final {
    font-weight: bold;
    font-size: 1.2rem;
    color: #f6d55c;
    margin-top: 0.5rem;
}

.correct-answer {
    font-size: 1.3rem;
    font-weight: bold;
    color: #48bb78;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(72, 187, 120, 0.1);
    border-radius: 8px;
    border: 2px solid rgba(72, 187, 120, 0.3);
}

/* Audio Toggle Button */
.audio-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-toggle:hover {
    background: #667eea;
    transform: scale(1.1);
}

/* Welcome Screen */
.welcome-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.welcome-container h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #4a5568;
}

.welcome-container p {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 20px;
}

/* Rules Section */
.rules-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0 2rem 0;
    text-align: center;
}

.rules-section h3 {
    color: #667eea;
    margin: 0 0 1rem 0;
    text-align: center;
    font-size: 1.2rem;
}

.rules-content {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.rule-item {
    padding: 0.5rem 0;
    color: #000;
    font-size: 0.95rem;
    line-height: 1.4;
}

.rule-item strong {
    color: #667eea;
}

.btn-link {
    background: none;
    border: none;
    color: black;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0.5rem;
    display: block;
    margin: 0;
    transition: color 0.3s;
}

.btn-link:hover {
    color: #764ba2;
}

.rules-section.collapsed .rules-content {
    display: none;
}

.player-setup {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-setup input {
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.player-setup input:focus {
    outline: none;
    border-color: #667eea;
}

.or-divider {
    text-align: center;
    color: #718096;
    font-weight: bold;
    position: relative;
    margin: 20px 0;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.join-section {
    display: flex;
    gap: 10px;
}

.join-section input {
    flex: 1;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Lobby Screen */
.lobby-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

.lobby-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #4a5568;
}

.room-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.room-info h3 {
    margin-bottom: 15px;
    color: #4a5568;
}

#room-code-display {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.share-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.share-options .btn-secondary {
    flex: 1;
    min-width: 100px;
    font-size: 0.9rem;
    padding: 8px 12px;
    white-space: nowrap;
}

.players-list {
    margin-bottom: 30px;
}

.players-list h3 {
    margin-bottom: 15px;
    color: #4a5568;
}

#players-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-item.host::after {
    content: '👑';
    margin-left: 10px;
}

.lobby-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Game Screen */
.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.game-header h1 {
    color: #4a5568;
    font-size: 2rem;
}

.game-info {
    display: flex;
    gap: 20px;
    color: #718096;
}

/* Turn Indicator */
.turn-indicator {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(240, 147, 251, 0.3);
    animation: pulse 2s infinite;
    position: relative;
    z-index: 10;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.turn-message {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Mobile Turn Indicator - Sticky and More Prominent */
@media (max-width: 768px) {
    .turn-indicator {
        position: sticky;
        top: 0;
        z-index: 1000;
        margin: 0;
        border-radius: 0 0 20px 20px;
        padding: 20px 15px;
        box-shadow: 0 15px 30px rgba(240, 147, 251, 0.4);
        /* removed bounce for non-answering UX */
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        border: 3px solid rgba(255, 255, 255, 0.3);
    }
    
    .turn-message {
        font-size: 1.4rem;
        font-weight: 900;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    
    .turn-message::before {
        content: '';
    }
    
}

@keyframes mobileBounce {
    0%, 100% { 
        transform: translateY(0) scale(1);
        box-shadow: 0 15px 30px rgba(240, 147, 251, 0.4);
    }
    25% { 
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(240, 147, 251, 0.6);
    }
    50% { 
        transform: translateY(-12px) scale(1.03);
        box-shadow: 0 25px 50px rgba(240, 147, 251, 0.7);
    }
    75% { 
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(240, 147, 251, 0.6);
    }
}

@keyframes pointBounce {
    0% { transform: translateY(0px) rotate(-10deg); }
    100% { transform: translateY(-5px) rotate(10deg); }
}

/* Add some breathing room below the sticky indicator on mobile */
@media (max-width: 768px) {
    .game-container {
        padding-top: 0;
    }
    
    .score-board {
        margin-top: 15px;
        justify-content: flex-start;
    }
}

/* Additional mobile-specific enhancements */
@media (max-width: 480px) {
    .turn-indicator {
        padding: 18px 12px;
        border-radius: 0 0 15px 15px;
    }
    
    .turn-message {
        font-size: 1.2rem;
        flex-wrap: wrap;
        line-height: 1.3;
    }
    
    .turn-message::before,
    .turn-message::after {
        font-size: 1.5rem;
    }
}

/* Not-selecting state for players who cannot pick a question */
.turn-indicator.not-selecting {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
  border-color: rgba(255,255,255,0.25);
}

.turn-indicator.not-selecting .turn-message::before {
  content: "🛑";
  margin-right: 8px;
}

/* For the active selector, show the finger with a stronger bounce */
.turn-indicator:not(.not-selecting) .turn-message::before {
  content: "👇";
  font-size: 1.9rem;
  animation: pointBounceStrong 0.8s ease-in-out infinite alternate;
}

@keyframes pointBounceStrong {
  0%   { transform: translateY(0) rotate(-12deg); }
  100% { transform: translateY(-10px) rotate(12deg); }
}

/* Score Board */
.score-board {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.score-board {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.player-score {
    background: beige;
    border: 2px solid #667eea;
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    text-align: center;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-score.current {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(240, 147, 251, 0.4);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.player-score .avatar {
    font-size: 1.5rem;
}

.player-score .name {
    font-weight: bold;
    font-size: 0.9rem;
}

.player-score .score {
    font-size: 1.3rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 1);
}

.player-score .score.positive {
    color: #20904b;
}

.player-score .score.negative {
    color: #ff4343;
}

/* Game Board */
.game-board {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.categories-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.question-cell {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    color: #4a5568;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-cell:hover {
    background: #edf2f7;
    border-color: #667eea;
    transform: translateY(-2px);
}

.question-cell.answered {
    background: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
    opacity: 0.6;
}

.question-cell.selected {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: #f093fb;
}





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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.question-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.question-header h2 {
    color: #4a5568;
    margin-bottom: 10px;
}

.question-header h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.timer {
    background: #f02a4b;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    font-weight: bold;
    font-size: 1.2rem;
}

.question-body {
    margin-bottom: 30px;
}

.question-body p {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 30px;
    text-align: center;
}

/* Answer Options */
.answer-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.answer-option {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.answer-option:hover {
    background: #edf2f7;
    border-color: #667eea;
    transform: translateY(-2px);
}

.answer-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.answer-option.correct {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
    border-color: #38a169;
}

.answer-option.incorrect {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border-color: #e53e3e;
}

.answer-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.answer-status {
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    text-align: center;
}

#answer-status-message {
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a5568;
}

#answered-players {
    font-size: 0.9rem;
    color: #718096;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #718096;
    transition: color 0.3s;
    /* display: none; */

}

.close-btn:hover {
    color: #4a5568;
}

/* Result Modal */
#result-content {
    text-align: center;
    margin-bottom: 30px;
}

.result-correct {
    color: #38a169;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.result-incorrect {
    color: #e53e3e;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.result-timeout {
    color: #f6ad55;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.result-penalty {
    color: #ff4444;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
    animation: penalty-flash 0.5s ease-in-out;
}

@keyframes penalty-flash {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Reading Message Styles */
.reading-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin: 20px 0;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.reading-text {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.reading-countdown {
    display: flex;
    justify-content: center;
    align-items: center;
}

.reading-countdown span {
    font-size: 2.5rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffeb3b;
    text-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
    animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Results Summary Styles */
.results-summary {
    margin-bottom: 20px;
}

.results-summary h3 {
    text-align: center;
    margin: 0 0 15px 0;
    color: #4a5568;
    font-size: 1.3rem;
}

.player-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #e2e8f0;
}

.player-result.current-player {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left-color: #4299e1;
    font-weight: bold;
}

.player-info {
    flex: 1;
    font-weight: 600;
}

.result-status {
    font-size: 1.2rem;
    margin: 0 10px;
}

.player-score {
    font-weight: bold;
    color: #2d3748;
}

.player-result.current-player .player-score {
    color: black;
}

.result-player {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a5568;
}

.result-answer {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: bold;
}

.result-points {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px 0;
}

.result-points.positive {
    color: #38a169;
}

.result-points.negative {
    color: #e53e3e;
}

.result-message {
    font-size: 1rem;
    color: #667eea;
    font-weight: bold;
    margin-top: 10px;
}

/* Final Leaderboard */
.game-over {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 20px;
}

.winner {
    font-size: 1.8rem;
    font-weight: bold;
    color: #38a169;
    margin-bottom: 10px;
}

.final-score {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 30px;
}

.leaderboard {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.leaderboard h3 {
    color: #4a5568;
    margin-bottom: 15px;
    text-align: center;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    font-weight: 500;
}

.leaderboard-item:first-child {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #744210;
}

.leaderboard-item:nth-child(2) {
    background: linear-gradient(135deg, #c0c0c0 0%, #e2e8f0 100%);
    color: #4a5568;
}

.leaderboard-item:nth-child(3) {
    background: linear-gradient(135deg, #cd7f32 0%, #d69e2e 100%);
    color: #744210;
}

/* Loading Screen */
.loading-container {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-message {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Game Controls */
.game-controls {
    text-align: center;
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.game-controls button {
    min-width: 140px;
}

/* Mobile Category Layout */
.mobile-category-layout {
    display: none;
}

.mobile-category-section {
    margin-bottom: 0px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-questions-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.mobile-question-cell {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 15px 8px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-question-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
    border-color: #90cdf4;
}

.mobile-question-cell.answered {
    background: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-container,
    .lobby-container {
        padding: 20px;
    }
    
    
    .welcome-container h1 {
        font-size: 2rem;
    }
    
    .game-header {
        flex-direction: row;
        gap: 15px;
        text-align: center;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Hide desktop layout on mobile */
    .categories-row,
    .questions-grid {
        display: none;
    }
    
    /* Show mobile layout */
    .mobile-category-layout {
        display: block;
    }
    
    .score-board {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .player-score {
        min-width: 80px;
    }
    
    .join-section {
        flex-direction: column;
    }
    
    .lobby-controls {
        flex-direction: column;
    }
    
    .answer-options {
        grid-template-columns: 1fr;
    }

    .audio-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .share-options {
        flex-direction: column;
        gap: 8px;
    }

    .share-options .btn-secondary {
        min-width: auto;
        flex: none;
    }

    .close-btn {
        font-size: 1rem;
    }

    /* Make Final Jeopardy wager input much bigger on mobile */
    #final-wager-input {
        width: 90%;
        max-width: 300px;
        padding: 1.5rem;
        font-size: 2rem;
        border-width: 4px;
        border-radius: 15px;
        margin-bottom: 2rem;
    }

    /* Also make Daily Double wager input bigger on mobile */
    #wager-input {
        width: 90%;
        max-width: 280px;
        padding: 1.25rem;
        font-size: 1.8rem;
        border-width: 3px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .mobile-questions-row {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .mobile-question-cell {
        font-size: 0.8rem;
        padding: 12px 6px;
        min-height: 50px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .answer-options {
        grid-template-columns: 1fr;
    }
}

/* Daily Double Spectator Styles */
.daily-double-spectator {
    text-align: center;
    padding: 20px;
}

.daily-double-spectator .spectator-info {
    background: #667eea;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.daily-double-spectator .wager-display {
    background: #48bb78;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 1.2rem;
    font-weight: bold;
}

.daily-double-spectator .question-content {
    margin: 20px 0;
    text-align: left;
}

.daily-double-spectator .category-name {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.daily-double-spectator .question-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
}

.daily-double-spectator .options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.daily-double-spectator .option.disabled {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    color: #718096;
    cursor: not-allowed;
    opacity: 0.7;
}

.daily-double-spectator .spectator-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-style: italic;
}

.daily-double-spectator .spectator-timer {
    background: #e2e8f0;
    color: #4a5568;
    padding: 10px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: normal;
    opacity: 0.8;
}

.daily-double-spectator .answer-reveal {
    margin: 20px 0;
}

.daily-double-spectator .player-answer {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    background: #f7fafc;
}

.daily-double-spectator .correct-answer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #48bb78;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    background: #f0fff4;
}

.daily-double-spectator .result-summary {
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    background: #f7fafc;
}

/* Daily Double Wagering Styles */
.daily-double-wagering {
    text-align: center;
    padding: 30px;
}

.daily-double-wagering .wagering-info {
    margin: 20px 0;
}

.daily-double-wagering .player-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0;
}

.daily-double-wagering .player-info h3 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
}

.daily-double-wagering .category-info {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.daily-double-wagering .category-info h4 {
    color: #4a5568;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.daily-double-wagering .wagering-status {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0;
}

.daily-double-wagering .wagering-status .spinner {
    font-size: 2rem;
    animation: spin 2s linear infinite;
    margin-bottom: 10px;
}

.daily-double-wagering .wagering-status h3 {
    margin: 10px 0;
    font-size: 1.3rem;
}

.daily-double-wagering .spectator-note {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    font-style: italic;
}

/* Timer hint for immediate interaction */
.timer-hint {
    font-size: 0.8rem;
    color: #68d391;
    font-weight: bold;
    margin-top: 5px;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* Pulse animation for answer options */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Privacy Policy Page Styles */
.privacy-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.privacy-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.privacy-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #e2e8f0;
}

.privacy-header .joeparty-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.privacy-header h1 {
    color: #2d3748;
    font-size: 2.5rem;
    margin: 20px 0 10px 0;
    font-weight: bold;
}

.last-updated {
    color: #718096;
    font-style: italic;
    font-size: 1rem;
    margin: 0;
}

.privacy-section {
    margin-bottom: 35px;
}

.privacy-section h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
}

.privacy-section h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.privacy-section p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 1rem;
}

.privacy-section ul {
    color: #4a5568;
    line-height: 1.7;
    margin: 15px 0;
    padding-left: 25px;
}

.privacy-section li {
    margin-bottom: 8px;
}

.privacy-section strong {
    color: #2d3748;
    font-weight: 600;
}

.contact-info {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.contact-info p {
    margin: 0;
}

.contact-info a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

.privacy-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid #e2e8f0;
}

.privacy-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.privacy-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive Design for Privacy Policy */
@media (max-width: 768px) {
    .privacy-container {
        padding: 10px;
    }
    
    .privacy-content {
        padding: 25px;
        margin: 10px 0;
    }
    
    .privacy-header h1 {
        font-size: 2rem;
    }
    
    .privacy-section h2 {
        font-size: 1.5rem;
    }
    
    .privacy-section h3 {
        font-size: 1.2rem;
    }
    
    .privacy-section p,
    .privacy-section ul {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .privacy-content {
        padding: 20px;
    }
    
    .privacy-header h1 {
        font-size: 1.8rem;
    }
    
    .privacy-section h2 {
        font-size: 1.4rem;
    }
    
    .privacy-footer .btn-primary {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

footer {
    display: flex;
    justify-content: center;
    margin: 2.5% auto;
    width: 80%;
} 

footer p {
    color: white;
}

footer a {
    color: white;
    text-decoration: none;
}

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