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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #1e293b 75%, #0f172a 100%);
    min-height: 100vh;
    color: white;
    overflow-x: auto;
    overflow-y: auto;
}

#app {
    padding: 20px;
    min-height: 100vh;
    overflow-x: auto;
}

@media (max-width: 768px) {
    body {
        overflow-x: auto;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    #app {
        padding: 10px;
        overflow-x: auto;
    }
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: auto;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .game-container {
        overflow-x: auto;
        overflow-y: visible;
        min-height: auto;
    }
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(206, 17, 65, 0.2) 0%, rgba(19, 39, 79, 0.3) 100%);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(206, 17, 65, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content {
    flex: 1;
    text-align: center;
}

.header-logo-left, .header-logo-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-logo-left, .header-logo-right {
        display: none;
    }
    
    .music-toggle {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1000;
        padding: 6px 12px;
        font-size: 0.8em;
    }
}

/* Braves Logo Styles */
.braves-logo-small {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.braves-logo-medium {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    margin-bottom: 10px;
}

.braves-logo-large {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.5));
    margin-bottom: 15px;
}

.braves-logo-celebration {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.8));
    animation: logoSpin 3s ease-in-out infinite;
    margin: 15px 0;
}

@keyframes logoSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-5deg) scale(1.05); }
    50% { transform: rotate(0deg) scale(1.1); }
    75% { transform: rotate(5deg) scale(1.05); }
}

.setup-header {
    text-align: center;
    margin-bottom: 25px;
}

.how-to-play-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-header h1::before {
    content: "🪓";
    display: inline-block;
    transform: scaleX(-1);
    margin-right: 10px;
}

.braves-tagline {
    font-size: 1.1em;
    color: #EAAA00;
    font-style: italic;
    margin-top: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.braves-motto {
    color: #CE1141;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.braves-chant {
    font-size: 1.8em;
    color: #CE1141;
    font-weight: bold;
    margin: 10px 0;
    animation: pulse 1.5s ease-in-out infinite;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.braves-victory {
    font-size: 1.5em;
    color: #13274F;
    font-weight: bold;
    margin-top: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.braves-alert-chant {
    font-size: 1.2em;
    color: #EAAA00;
    font-weight: bold;
    margin: 8px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.braves-leaderboard-motto {
    font-size: 0.9em;
    color: #EAAA00;
    font-style: italic;
    margin-top: 5px;
}

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

.setup-screen {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    color: #1e3a8a;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    margin: 20px auto;
}

.setup-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 25px;
}

.setup-left, .setup-right {
    flex: 1;
}

.player-setup {
    margin-bottom: 20px;
    text-align: left;
}

.player-setup label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #1e3a8a;
}

.player-setup input {
    width: 100%;
    padding: 8px;
    border: 2px solid #1e3a8a;
    border-radius: 5px;
    font-size: 1em;
}

.player-name-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-name-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-random {
    background: linear-gradient(135deg, #EAAA00 0%, #f59e0b 100%);
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-random:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #EAAA00 100%);
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(234, 170, 0, 0.4);
}

.btn-random:hover .baseball-icon {
    animation: spin 0.8s ease-in-out;
}

.baseball-icon {
    font-size: 1.2em;
    display: inline-block;
}

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

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(19, 39, 79, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #CE1141 0%, #a00e35 100%);
    border-radius: 6px;
    border: 2px solid rgba(19, 39, 79, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a00e35 0%, #CE1141 100%);
}

::-webkit-scrollbar-corner {
    background: rgba(19, 39, 79, 0.3);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #CE1141 rgba(19, 39, 79, 0.3);
}

@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-thumb {
        border: 1px solid rgba(19, 39, 79, 0.3);
    }
}

/* Round End Alert Styles */
.round-end-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    animation: alertSlideIn 0.5s ease-out;
}

.alert-content {
    background: linear-gradient(135deg, #CE1141 0%, #a00e35 100%);
    border: 3px solid #fbbf24;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 450px;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .alert-content {
        flex-direction: column;
        text-align: center;
        min-width: auto;
        width: 90%;
        max-width: 400px;
        padding: 20px;
        gap: 15px;
    }
    
    .alert-message h3 {
        font-size: 1.2em;
    }
    
    .alert-message p {
        font-size: 1em;
    }
    
    .alert-ok-btn {
        padding: 12px 24px;
        font-size: 1em;
    }
}

.alert-icon {
    font-size: 3em;
    animation: tomahawkChop 1s ease-in-out infinite alternate;
}

.alert-message {
    flex: 1;
    color: white;
}

.alert-message h3 {
    margin: 0 0 8px 0;
    font-size: 1.4em;
    color: #fbbf24;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.alert-message p {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    line-height: 1.4;
}

.alert-ok-btn {
    margin: 0;
    padding: 10px 20px;
    font-size: 1em;
    background: linear-gradient(135deg, #EAAA00 0%, #f59e0b 100%);
    color: #1e3a8a;
    border: 2px solid #1e3a8a;
}

.alert-ok-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #EAAA00 100%);
    color: #1e3a8a;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(234, 170, 0, 0.4);
}

@keyframes alertSlideIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes tomahawkChop {
    0% { 
        transform: rotate(-10deg) scale(1);
    }
    100% { 
        transform: rotate(10deg) scale(1.1);
    }
}

/* Leaderboard Modal Styles */
.leaderboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.leaderboard-content {
    background: linear-gradient(135deg, rgba(19, 39, 79, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 2px solid #CE1141;
    border-radius: 15px;
    padding: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: auto;
    backdrop-filter: blur(15px);
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .leaderboard-content {
        padding: 20px;
        width: 95%;
        max-height: 85vh;
        overflow-y: scroll;
        overflow-x: auto;
    }
    
    .leaderboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .leaderboard-header h2 {
        font-size: 1.5em;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px 4px;
        font-size: 0.85em;
    }
    
    .leaderboard-table {
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .leaderboard-table thead,
    .leaderboard-table tbody,
    .leaderboard-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}

.leaderboard-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #CE1141;
    padding-bottom: 15px;
    text-align: center;
    position: relative;
}

.leaderboard-header button {
    position: absolute;
    top: 0;
    right: 0;
}

.leaderboard-header h2 {
    color: #EAAA00;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.leaderboard-table-container {
    text-align: center;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.leaderboard-table th {
    background: linear-gradient(135deg, #CE1141 0%, #a00e35 100%);
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.leaderboard-table td {
    color: white;
}

.leaderboard-table tr:hover {
    background: rgba(206, 17, 65, 0.2);
}

.top-champion {
    background: linear-gradient(135deg, rgba(234, 170, 0, 0.3) 0%, rgba(245, 158, 11, 0.3) 100%);
    font-weight: bold;
}

.top-champion td {
    color: #EAAA00;
}

.no-records {
    text-align: center;
    padding: 40px;
    color: #EAAA00;
    font-size: 1.2em;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4);
}

.setup-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

@media (max-width: 768px) {
    .setup-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* How to Play Modal Styles */
.how-to-play-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
    overflow-y: auto;
    padding: 20px;
}

.how-to-play-content {
    background: linear-gradient(135deg, rgba(19, 39, 79, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 2px solid #CE1141;
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    backdrop-filter: blur(15px);
}

.how-to-play-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #CE1141;
    padding-bottom: 15px;
}

.how-to-play-header h2 {
    color: #fbbf24;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.rules-content {
    color: white;
}

.rule-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #CE1141;
}

.rule-section h3 {
    color: #EAAA00;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.rule-section p, .rule-section li {
    line-height: 1.6;
    margin-bottom: 8px;
}

.rule-section ul, .rule-section ol {
    padding-left: 20px;
}

.rule-section strong {
    color: #EAAA00;
}

.scoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.score-item {
    background: rgba(206, 17, 65, 0.2);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(206, 17, 65, 0.3);
}

.score-item.special {
    background: rgba(234, 170, 0, 0.2);
    border-color: rgba(234, 170, 0, 0.5);
    grid-column: 1 / -1;
}

.rule-section.tip {
    background: rgba(234, 170, 0, 0.1);
    border-left-color: #EAAA00;
}

@media (max-width: 768px) {
    .how-to-play-content {
        padding: 20px;
        margin: 10px;
    }
    
    .how-to-play-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .how-to-play-header h2 {
        font-size: 1.5em;
    }
    
    .rule-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .scoring-grid {
        grid-template-columns: 1fr;
    }
}

.player-name-input label {
    font-weight: bold;
    color: #1e3a8a;
    width: 25px;
    font-size: 0.9em;
}

.player-name-input input {
    padding: 6px 8px;
    border: 2px solid #13274F;
    border-radius: 5px;
    font-size: 0.9em;
    background: white;
    color: #13274F;
    flex: 1;
}

@media (max-width: 768px) {
    .setup-content {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .setup-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #CE1141 0%, #a00e35 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a00e35 0%, #CE1141 100%);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(206, 17, 65, 0.4);
}

.btn-primary:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Celebration Animation Styles */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in;
}

.winner-announcement {
    text-align: center;
    z-index: 10001;
}

.winner-text {
    font-size: 4em;
    color: #CE1141;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    animation: bounce 1s ease-in-out infinite alternate;
    margin-bottom: 20px;
}

.winner-score {
    font-size: 2em;
    color: #EAAA00;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
}

.celebration-message {
    font-size: 2.5em;
    color: #13274F;
    background: linear-gradient(45deg, #EAAA00, #CE1141, #13274F);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 2s ease-in-out infinite;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Fireworks */
.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #EAAA00;
    border-radius: 50%;
    animation: firework 2s ease-out infinite;
}

.firework:nth-child(1) { left: 10%; animation-delay: 0s; }
.firework:nth-child(2) { left: 20%; animation-delay: 0.3s; }
.firework:nth-child(3) { left: 80%; animation-delay: 0.6s; }
.firework:nth-child(4) { left: 90%; animation-delay: 0.9s; }
.firework:nth-child(5) { left: 50%; animation-delay: 1.2s; }
.firework:nth-child(6) { left: 70%; animation-delay: 1.5s; }

/* Confetti */
.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #CE1141;
    animation: confetti 3s ease-out infinite;
}

.confetti-piece:nth-child(odd) { background: #EAAA00; }
.confetti-piece:nth-child(3n) { background: #13274F; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    from { transform: translateY(0px); }
    to { transform: translateY(-20px); }
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes firework {
    0% { 
        transform: translateY(100vh) scale(0);
        opacity: 1;
    }
    15% { 
        transform: translateY(20vh) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translateY(20vh) scale(0);
        opacity: 0;
    }
}

@keyframes confetti {
    0% { 
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% { 
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Generate random positions for confetti */
.confetti-piece:nth-child(1) { left: 5%; animation-delay: 0s; }
.confetti-piece:nth-child(2) { left: 15%; animation-delay: 0.1s; }
.confetti-piece:nth-child(3) { left: 25%; animation-delay: 0.2s; }
.confetti-piece:nth-child(4) { left: 35%; animation-delay: 0.3s; }
.confetti-piece:nth-child(5) { left: 45%; animation-delay: 0.4s; }
.confetti-piece:nth-child(6) { left: 55%; animation-delay: 0.5s; }
.confetti-piece:nth-child(7) { left: 65%; animation-delay: 0.6s; }
.confetti-piece:nth-child(8) { left: 75%; animation-delay: 0.7s; }
.confetti-piece:nth-child(9) { left: 85%; animation-delay: 0.8s; }
.confetti-piece:nth-child(10) { left: 95%; animation-delay: 0.9s; }
.confetti-piece:nth-child(11) { left: 10%; animation-delay: 1.0s; }
.confetti-piece:nth-child(12) { left: 20%; animation-delay: 1.1s; }
.confetti-piece:nth-child(13) { left: 30%; animation-delay: 1.2s; }
.confetti-piece:nth-child(14) { left: 40%; animation-delay: 1.3s; }
.confetti-piece:nth-child(15) { left: 50%; animation-delay: 1.4s; }
.confetti-piece:nth-child(16) { left: 60%; animation-delay: 1.5s; }
.confetti-piece:nth-child(17) { left: 70%; animation-delay: 1.6s; }
.confetti-piece:nth-child(18) { left: 80%; animation-delay: 1.7s; }
.confetti-piece:nth-child(19) { left: 90%; animation-delay: 1.8s; }
.confetti-piece:nth-child(20) { left: 12%; animation-delay: 1.9s; }
.confetti-piece:nth-child(21) { left: 22%; animation-delay: 2.0s; }
.confetti-piece:nth-child(22) { left: 32%; animation-delay: 2.1s; }
.confetti-piece:nth-child(23) { left: 42%; animation-delay: 2.2s; }
.confetti-piece:nth-child(24) { left: 52%; animation-delay: 2.3s; }
.confetti-piece:nth-child(25) { left: 62%; animation-delay: 2.4s; }
.confetti-piece:nth-child(26) { left: 72%; animation-delay: 2.5s; }
.confetti-piece:nth-child(27) { left: 82%; animation-delay: 2.6s; }
.confetti-piece:nth-child(28) { left: 92%; animation-delay: 2.7s; }
.confetti-piece:nth-child(29) { left: 8%; animation-delay: 2.8s; }
.confetti-piece:nth-child(30) { left: 18%; animation-delay: 2.9s; }
.confetti-piece:nth-child(31) { left: 28%; animation-delay: 0.05s; }
.confetti-piece:nth-child(32) { left: 38%; animation-delay: 0.15s; }
.confetti-piece:nth-child(33) { left: 48%; animation-delay: 0.25s; }
.confetti-piece:nth-child(34) { left: 58%; animation-delay: 0.35s; }
.confetti-piece:nth-child(35) { left: 68%; animation-delay: 0.45s; }
.confetti-piece:nth-child(36) { left: 78%; animation-delay: 0.55s; }
.confetti-piece:nth-child(37) { left: 88%; animation-delay: 0.65s; }
.confetti-piece:nth-child(38) { left: 14%; animation-delay: 0.75s; }
.confetti-piece:nth-child(39) { left: 24%; animation-delay: 0.85s; }
.confetti-piece:nth-child(40) { left: 34%; animation-delay: 0.95s; }
.confetti-piece:nth-child(41) { left: 44%; animation-delay: 1.05s; }
.confetti-piece:nth-child(42) { left: 54%; animation-delay: 1.15s; }
.confetti-piece:nth-child(43) { left: 64%; animation-delay: 1.25s; }
.confetti-piece:nth-child(44) { left: 74%; animation-delay: 1.35s; }
.confetti-piece:nth-child(45) { left: 84%; animation-delay: 1.45s; }
.confetti-piece:nth-child(46) { left: 94%; animation-delay: 1.55s; }
.confetti-piece:nth-child(47) { left: 16%; animation-delay: 1.65s; }
.confetti-piece:nth-child(48) { left: 26%; animation-delay: 1.75s; }
.confetti-piece:nth-child(49) { left: 36%; animation-delay: 1.85s; }
.confetti-piece:nth-child(50) { left: 46%; animation-delay: 1.95s; }

.btn-secondary {
    background: #1e3a8a;
    color: white;
    margin: 5px;
}

.btn-secondary:hover {
    background: #1e40af;
}

.btn-celebration-close {
    background: linear-gradient(135deg, #EAAA00 0%, #f59e0b 100%);
    color: #13274F;
    border: 3px solid #13274F;
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    text-shadow: none;
}

.btn-celebration-close:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #EAAA00 100%);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(234, 170, 0, 0.6);
}

@media (max-width: 768px) {
    .btn-celebration-close {
        padding: 12px 24px;
        font-size: 1.1em;
        margin-top: 20px;
    }
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(19, 39, 79, 0.4) 0%, rgba(206, 17, 65, 0.2) 100%);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .game-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px;
    }
    
    .current-player {
        font-size: 1.1em;
    }
    
    .round-info {
        font-size: 1em;
    }
}

.current-player {
    font-size: 1.3em;
    font-weight: bold;
}

.round-info {
    font-size: 1.1em;
}

.starting-player {
    font-size: 0.9em;
    color: #EAAA00;
    font-style: italic;
    margin-top: 3px;
}

.btn-help-link {
    background: rgba(234, 170, 0, 0.2);
    color: #EAAA00;
    border: 1px solid rgba(234, 170, 0, 0.5);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 5px;
    display: inline-block;
}

.btn-help-link:hover {
    background: rgba(234, 170, 0, 0.3);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(234, 170, 0, 0.3);
}

@media (max-width: 768px) {
    .btn-help-link {
        font-size: 0.75em;
        padding: 3px 6px;
    }
}

.main-game-area {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .main-game-area {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        overflow-x: auto;
        overflow-y: visible;
    }
    
    .right-panel {
        width: 100%;
        max-width: 500px;
        overflow-x: auto;
    }
}

.game-board {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    flex: 1;
    overflow-x: auto;
    overflow-y: visible;
}

@media (max-width: 768px) {
    .game-board {
        gap: 15px;
        overflow-x: auto;
        min-width: 100%;
    }
    
    .player-area {
        min-width: 280px;
        max-width: 100%;
        flex-shrink: 0;
    }
}

/* Desktop/Mobile Layout Control */
.desktop-only {
    display: block;
}

.mobile-deck-area {
    display: none;
}

@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-deck-area {
        display: block !important;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 2px solid rgba(206, 17, 65, 0.3);
    }
}

/* Mobile Deck Area Styles */
.deck-area-mobile {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 15px;
    background: linear-gradient(135deg, rgba(206, 17, 65, 0.1) 0%, rgba(19, 39, 79, 0.15) 100%);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(206, 17, 65, 0.2);
}

@media (max-width: 768px) {
    .deck-area-mobile {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        padding: 12px;
    }
    
    .deck-area-mobile .deck,
    .deck-area-mobile .discard-pile {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

.mobile-drawn-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(206, 17, 65, 0.2) 0%, rgba(19, 39, 79, 0.3) 100%);
    border-radius: 10px;
    border: 1px solid rgba(206, 17, 65, 0.3);
}

.mobile-drawn-card .card {
    width: 70px;
    height: 105px;
}

.mobile-drawn-card .btn {
    padding: 8px 16px;
    font-size: 0.9em;
}

.mobile-selected-card {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(206, 17, 65, 0.2) 0%, rgba(19, 39, 79, 0.3) 100%);
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(206, 17, 65, 0.3);
}

.mobile-selected-card h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
    color: #EAAA00;
}

.mobile-selected-card p {
    margin: 0;
    font-size: 0.9em;
}

.right-panel {
    min-width: 200px;
}

@media (max-width: 1024px) {
    .right-panel {
        min-width: auto;
        width: 100%;
    }
}

.deck-area-top {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .deck-area-top {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .deck, .discard-pile {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

.drawn-card-bottom {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

@media (max-width: 768px) {
    .drawn-card-bottom {
        gap: 10px;
        padding: 0 10px;
    }
    
    .drawn-card-bottom .card {
        width: 70px;
        height: 105px;
    }
    
    .drawn-card-bottom .btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

.selected-card-area {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(206, 17, 65, 0.2) 0%, rgba(19, 39, 79, 0.3) 100%);
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(206, 17, 65, 0.3);
}

@media (max-width: 768px) {
    .selected-card-area {
        margin-top: 15px;
        padding: 12px;
        font-size: 0.9em;
    }
    
    .selected-card-area h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
}

.player-cards-view {
    background: linear-gradient(135deg, rgba(19, 39, 79, 0.3) 0%, rgba(30, 41, 59, 0.4) 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cards-header h3 {
    color: #CE1141;
    margin: 0;
}

.round-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-items: center;
    margin-bottom: 15px;
}

.score-breakdown {
    text-align: center;
    font-size: 1.2em;
    color: #EAAA00;
    margin: 0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.player-names-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.player-names-section h3 {
    margin-bottom: 15px;
    color: #CE1141;
}

.player-name-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.player-name-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.player-name-input label {
    font-weight: bold;
    color: white;
}

.player-name-input input {
    padding: 8px 12px;
    border: 2px solid #13274F;
    border-radius: 5px;
    font-size: 1em;
    background: white;
    color: #13274F;
}

.player-name-input input:focus {
    border-color: #CE1141;
    outline: none;
}

.player-setup {
    margin: 0;
}

.player-setup label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #1e3a8a;
}

.player-setup input {
    width: 100%;
    padding: 8px;
    border: 2px solid #1e3a8a;
    border-radius: 5px;
    font-size: 1em;
}

.music-toggle {
    padding: 8px 16px;
    background: linear-gradient(135deg, #CE1141 0%, #a00e35 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    margin-bottom: 10px;
}

.music-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(206, 17, 65, 0.5);
}

.player-area {
    background: linear-gradient(135deg, rgba(19, 39, 79, 0.3) 0%, rgba(30, 41, 59, 0.4) 100%);
    padding: 20px;
    border-radius: 15px;
    min-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-area.active {
    background: linear-gradient(135deg, rgba(206, 17, 65, 0.3) 0%, rgba(19, 39, 79, 0.4) 100%);
    border: 3px solid #CE1141;
    box-shadow: 0 0 25px rgba(206, 17, 65, 0.6);
}

.player-header {
    text-align: center;
    margin-bottom: 15px;
}

.player-name {
    font-size: 1.3em;
    font-weight: bold;
}

.player-score {
    font-size: 1.1em;
    margin-top: 5px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .card-grid {
        gap: 8px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        gap: 6px;
        margin-bottom: 10px;
    }
}

.card {
    width: 80px;
    height: 120px;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}

@media (max-width: 768px) {
    .card {
        width: 70px;
        height: 105px;
    }
    
    .card-face {
        font-size: 1.6em;
    }
}

@media (max-width: 480px) {
    .card {
        width: 60px;
        height: 90px;
    }
    
    .card-face {
        font-size: 1.4em;
    }
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    border: 2px solid white;
}

.card-back {
    background: linear-gradient(135deg, #13274F 0%, #CE1141 50%, #13274F 100%);
    background-image: url('https://sportslogohistory.com/wp-content/uploads/2018/01/atlanta_braves_1987-pres_a.png');
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;
}

.card-front {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #c92a2a 100%);
    color: white;
    transform: rotateY(180deg);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.card-front.red {
    color: white;
}

.card.selectable:hover {
    transform: translateY(-5px);
}

.card.flip-option {
    border: 2px solid #EAAA00;
    box-shadow: 0 0 15px rgba(234, 170, 0, 0.6);
}

.center-area {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.deck-area {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 20px;
}

.drawn-card-display {
    text-align: center;
}

.discard-button-area {
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck, .discard-pile {
    text-align: center;
}

.deck h3, .discard-pile h3 {
    margin-bottom: 10px;
}

.drawn-card-area {
    margin: 20px 0;
}

.action-choice {
    margin-top: 20px;
}

.action-option {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.action-option h4 {
    margin-bottom: 10px;
    color: #fbbf24;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.no-cards-msg {
    color: #fbbf24;
    font-style: italic;
    margin-top: 10px;
}

.action-menu {
    text-align: center;
    padding: 20px;
}

.action-menu h2 {
    margin-bottom: 20px;
    font-size: 1.8em;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.action-grid-two {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.card.clickable {
    cursor: pointer;
    transition: transform 0.2s;
}

.card.clickable:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(234, 170, 0, 0.8);
}

.action-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #EAAA00;
    transform: scale(1.05);
}

.action-card h3 {
    color: #EAAA00;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.action-card p {
    font-size: 1em;
    line-height: 1.4;
}

.drawn-card-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.option-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    flex: 1;
    max-width: 300px;
}

.option-box h4 {
    color: #EAAA00;
    margin-bottom: 10px;
}

.instruction-text {
    font-size: 1.2em;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.scoreboard {
    background: rgba(255, 255, 255, 0.95);
    color: #1e3a8a;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.scoreboard h2 {
    text-align: center;
    margin-bottom: 20px;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.score-table th,
.score-table td {
    padding: 8px 6px;
    border: 1px solid #1e3a8a;
    text-align: center;
}

.score-table th {
    background: #1e3a8a;
    color: white;
    font-size: 0.85em;
    font-weight: bold;
}

.player-name-cell {
    font-weight: bold;
    text-align: left !important;
    background: rgba(206, 17, 65, 0.1);
}

.round-score-cell {
    font-weight: bold;
    min-width: 35px;
}

.total-score-cell {
    font-weight: bold;
    background: rgba(234, 170, 0, 0.2);
    color: #1e3a8a;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .score-table {
        font-size: 0.8em;
    }
    
    .score-table th,
    .score-table td {
        padding: 6px 4px;
    }
    
    .score-table th {
        font-size: 0.75em;
    }
    
    .round-score-cell {
        min-width: 30px;
    }
}

.winner {
    background: #fbbf24;
    font-weight: bold;
}
