* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: #000000 url('bg.jpg') center center no-repeat fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* iOS Background Fix */
@supports (-webkit-touch-callout: none) {
    body {
        background-attachment: scroll;
        background-position: center top;
        min-height: 100vh;
    }
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(4, 18, 83, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 16, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(3, 15, 69, 0.2) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-20px) translateY(-20px); }
    50% { transform: translateX(20px) translateY(20px); }
    75% { transform: translateX(-10px) translateY(10px); }
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(50px);
    overflow: hidden;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
}

/* Username Screen */
.welcome-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(45deg, #00d4ff, #ffd700, #ff6b6b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6)); }
}

.subtitle {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

#username-input {
    width: 100%;
    max-width: 300px;
    padding: 15px 20px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    text-align: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

#username-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

#username-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Primary Button */
.primary-btn {
    position: relative;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 180px;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.primary-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.primary-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.2);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.primary-btn:hover:not(.disabled) .btn-glow {
    left: 100%;
}

/* Settings Button */
.settings-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Settings Screen */
.settings-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.settings-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.settings-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.settings-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.settings-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 25px;
}

.player-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.player-toggle {
    position: relative;
}

.player-toggle input[type="checkbox"] {
    display: none;
}

.player-toggle label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.player-toggle label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.player-toggle input:checked + label {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.player-toggle label img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.player-toggle label span {
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.player-toggle input:checked + label span {
    color: #00d4ff;
}

/* Loading Screen */
.loading-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    animation: cardFloat 6s ease-in-out infinite;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

.loading-text {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
}

.loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #ffd700);
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out forwards;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Cards Screen */
.player-greeting {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 25px;
}

.player-greeting h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.player-greeting .subtitle-text {
    font-size: 1.3rem;
    color: white;
    font-weight: 600;
    font-family: 'Rajdhani', sans-serif;
    display: block;
    margin-top: 5px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(1, 392px); /* Fixed row height */
    gap: 25px;
    margin-bottom: 50px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    align-items: start; /* Align items to top of grid cells */
}

.card-item {
    cursor: pointer;
    height: 280px; 
    width: 200px; 
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    box-sizing: border-box;
}

.card-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    perspective: 1000px; /* Add perspective for 3D effect */
    overflow: visible; /* Changed from hidden to visible */
    box-sizing: border-box;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-sizing: border-box;
    transition: transform 0.8s ease-in-out; /* Smooth transition for flip */
    transform-style: preserve-3d; /* Maintain 3D space for child elements */
    /* Remove overflow hidden to allow 3D transforms to be visible */
}

.card-front, .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-sizing: border-box;
    -webkit-backface-visibility: hidden; /* Hide back of card during flip */
    backface-visibility: hidden; /* Hide back of card during flip */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Add shadow for 3D effect */
    will-change: transform; /* Performance optimization for animations */
    /* Remove overflow hidden to allow images to be visible */
}

.card-back {
    /* Visible by default - show the card back initially */
    transform: rotateY(0deg);
}

.card-front {
    /* Hidden initially by rotating it 180 degrees */
    transform: rotateY(180deg);
}

/* When card is flipped, rotate the inner container to show the front */
.card-item.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-image, .card-back-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    padding: 0;
    margin: 0;
    display: block;
    position: relative;
    transition: transform 0.3s ease; /* Add subtle hover animation */
}

/* Add a subtle hover effect - but ONLY for non-flipped cards */
.card-item:not(.flipped):hover .card-inner {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-5px) scale(1.02);
}

/* When card is flipped, ensure the flip transform is maintained */
.card-item.flipped .card-inner {
    transform: rotateY(180deg) !important;
}

/* When card is selected, add a visual indicator with blue border */
.card-item.selected {
    position: relative;
    /* Add a simple border as fallback */
    outline: 4px solid #00d4ff !important;
    outline-offset: 2px;
    /* Temporary debugging background */
    background: rgba(0, 212, 255, 0.1) !important;
}

.card-item.selected::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 4px solid #00d4ff;
    border-radius: 0;
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.8),
        0 0 40px rgba(0, 212, 255, 0.5),
        inset 0 0 25px rgba(0, 212, 255, 0.2);
    z-index: 999;
    pointer-events: none;
    animation: selectedPulse 2s ease-in-out infinite;
    background: transparent;
}

@keyframes selectedPulse {
    0% { 
        box-shadow: 
            0 0 20px rgba(0, 212, 255, 0.8),
            0 0 40px rgba(0, 212, 255, 0.5),
            inset 0 0 25px rgba(0, 212, 255, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 
            0 0 30px rgba(0, 212, 255, 1),
            0 0 60px rgba(0, 212, 255, 0.7),
            inset 0 0 35px rgba(0, 212, 255, 0.3);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: 
            0 0 20px rgba(0, 212, 255, 0.8),
            0 0 40px rgba(0, 212, 255, 0.5),
            inset 0 0 25px rgba(0, 212, 255, 0.2);
        transform: scale(1);
    }
}

/* Add a shine effect on hover */
.card-wrapper::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(-45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.card-item:hover .card-wrapper::after {
    opacity: 1;
    animation: shine 1.5s ease forwards;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(-45deg);
    }
    100% {
        transform: translateX(100%) rotate(-45deg);
    }
}

.card-overlay {
    display: none;
}

.card-overlay h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.card-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat {
    background: linear-gradient(45deg, #ff1744, #f50057);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Add rating diamond */
.card-rating {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #2196f3, #64b5f6);
    transform: rotate(45deg);
    border: 2px solid white;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-rating span {
    color: white;
    font-weight: 900;
    font-size: 0.9rem;
    font-family: 'Orbitron', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transform: rotate(-45deg);
}

/* Add MLB logo styling */
.card-wrapper .mlb-logo {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 20px;
    background: white;
    border-radius: 3px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 900;
    color: #1976d2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Add red chevron pattern */
.card-wrapper .chevron-pattern {
    position: absolute;
    top: 50%;
    right: -20px;
    width: 40px;
    height: 100px;
    background: linear-gradient(45deg, #ff1744, #f50057);
    transform: translateY(-50%) skew(-20deg);
    z-index: 1;
    opacity: 0.8;
}

/* Add geometric pattern overlay */
.card-wrapper .pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

#continue-btn {
    display: block;
    margin: 0 auto;
    z-index: 100;
    position: relative;
    margin-top: 38px;
}

/* Success Screen */
.success-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin: 0 auto 30px;
    animation: successPulse 2s ease-in-out infinite;
}

.error-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin: 50px auto 30px;
    animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.success-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.error-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ff6b35;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.error-message {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 500;
}

.verify-instruction {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-weight: 500;
    text-align: center;
}

.selected-card-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    animation: cardReveal 1s ease-out forwards;
}

@keyframes cardReveal {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.success-card-image {
    width: 150px;
    height: 200px;
    object-fit: contain;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.success-card-info h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffd700;
}

.success-card-info p {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: bold;
}

/* Fix for verify button link styling */
#verify-btn {
    text-decoration: none !important;
    color: white !important;
    display: inline-block;
}

#verify-btn:hover, #verify-btn:focus, #verify-btn:active, #verify-btn:visited {
    text-decoration: none !important;
    color: white !important;
    outline: none !important;
}

#verify-btn::before, #verify-btn::after {
    display: none !important;
}

/* Remove any list-style or bullet points */
#verify-btn {
    list-style: none !important;
    list-style-type: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* iPad specific styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 45px 20px 20px;
        padding-top: max(45px, env(safe-area-inset-top) + 25px);
        padding-bottom: max(20px, env(safe-area-inset-bottom) + 10px);
        min-height: 100vh;
        min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow: visible;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        background: transparent;
    }
    
    .logo-container {
        top: max(15px, env(safe-area-inset-top) + 5px);
    }
    
    .logo {
        height: 60px;
    }
    
    .player-greeting {
        margin-bottom: 8px;
        margin-top: 8px;
        text-align: center;
        width: 100%;
        flex-shrink: 0;
    }
    
    .player-greeting h1 {
        font-size: 2.2rem;
        margin-bottom: 5px;
        text-align: center;
        line-height: 1.2;
    }
    
    .player-greeting .subtitle-text {
        font-size: 1.4rem;
        font-weight: 600;
        color: white;
        display: block;
        margin-top: 5px;
        font-family: 'Rajdhani', sans-serif;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        margin-bottom: 5px;
        max-width: 380px;
        width: 100%;
        flex-shrink: 0;
        justify-items: stretch;
        padding: 8px;
        grid-template-rows: repeat(2, auto);
        align-content: center;
        overflow: visible !important;
    }
    
    .card-item {
        height: 250px;
        width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        aspect-ratio: 2.5 / 3.5;
        background: transparent;
        position: relative;
        overflow: visible !important;
    }
    
    .card-wrapper {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        background: transparent !important;
        overflow: hidden;
    }
    
    .card-image {
        object-fit: contain;
        object-position: center;
        width: 100%;
        height: 100%;
        background: transparent !important;
    }
    
    /* Remove any blue background from flipped cards */
    .card-item.flipped,
    .card-item.flipped .card-wrapper,
    .card-item.flipped .card-front,
    .card-item.flipped .card-back {
        background: transparent !important;
    }
    
    /* Ensure no background colors on card inner elements */
    .card-inner,
    .card-front,
    .card-back {
        background: transparent !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Override any iPad specific background bleeding */
    .cards-grid {
        background: transparent !important;
    }
    
    .card-item,
    .card-item * {
        background: transparent !important;
    }
    
    /* Remove blue background from selected cards on iPad */
    .card-item.selected {
        background: transparent !important;
        outline: none !important;
        position: relative !important;
        overflow: visible !important;
    }
    
    .card-item.selected::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border: 3px solid #00d4ff;
        border-radius: 0;
        z-index: 1000;
        pointer-events: none;
        background: transparent;
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
        animation: none !important;
        transform: none !important;
    }
    
    @keyframes selectedPulse {
        0% { 
            box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
            transform: scale(1);
        }
        50% { 
            box-shadow: 0 0 25px rgba(0, 212, 255, 0.9);
            transform: scale(1.02);
        }
        100% { 
            box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
            transform: scale(1);
        }
    }
    
    /* iPad card selection effects - removed to prevent jumping */
    .card-item.selected .card-wrapper {
        /* All transforms and borders removed */
        transform: none !important;
        position: relative;
    }
    
    .card-item:hover .card-wrapper,
    .card-item:focus .card-wrapper {
        transform: none !important;
        /* Removed box-shadow and border changes */
    }
    
    /* Override any mobile-specific animations for iPad */
    .card-item:nth-child(1).selected .card-wrapper,
    .card-item:nth-child(2).selected .card-wrapper,
    .card-item:nth-child(3).selected .card-wrapper,
    .card-item:nth-child(4).selected .card-wrapper {
        transform: none !important;
        /* Removed all borders and shadows */
    }
    
    /* Focus state for accessibility */
    .card-item:focus {
        outline: 2px solid #00d4ff;
        outline-offset: 2px;
    }
    
    /* Removed checkmark indicator to prevent layout shifts */
    
    #continue-btn {
        margin-top: 20px;
        margin-bottom: 20px;
        position: relative;
        z-index: 1001;
        flex-shrink: 0;
    }
    
    /* Cards screen specific adjustments for iPad */
    #cards-screen .container {
        align-items: center;
        justify-content: center;
        text-align: center;
        padding-top: 140px;
        padding-bottom: 30px;
        overflow: hidden;
    }
    
    #cards-screen {
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
}

/* iPad landscape orientation - extra spacing */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
    .container {
        padding: 140px 40px 40px;
        padding-top: max(140px, env(safe-area-inset-top) + 100px);
        padding-bottom: max(40px, env(safe-area-inset-bottom) + 20px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .logo-container {
        top: max(35px, env(safe-area-inset-top) + 25px);
    }
    
    .logo {
        height: 90px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        max-width: 700px;
    }
    
    #continue-btn {
        margin-top: 20px;
        margin-bottom: 20px;
        position: relative;
        z-index: 1001;
    }
}

/* Fallback for any tablet-like device */
@media (min-device-width: 768px) and (max-device-width: 1024px) {
    .container {
        padding-top: 150px !important;
        padding-bottom: 40px !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .logo-container {
        top: 35px !important;
    }
    
    .logo {
        height: 85px !important;
    }
    
    #continue-btn {
        margin-bottom: 30px !important;
        position: relative !important;
        z-index: 1001 !important;
    }
    
    .screen {
        overflow: hidden !important;
    }
}

@media (max-width: 767px) {
    .logo-container {
        top: 0px;
        position: fixed;
        z-index: 1000;
    }
    
    .logo {
        height: 35px;
        width: auto;
    }
    
    .container {
        padding: 60px 10px 15px;
        height: 100vh !important;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .loading-content {
        padding: 40px 20px;
        max-width: 90% !important;
        width: 100% !important;
    }
    
    .loading-text {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .loading-spinner,
    .processing-spinner {
        width: 50px;
        height: 50px;
        border-width: 3px;
        margin-bottom: 20px;
    }
    
    .player-greeting {
        margin-bottom: 10px;
        margin-top: -5px;
        flex-shrink: 0;
    }
    
    .player-greeting h1 {
        font-size: 1.4rem;
        margin-bottom: 0px;
        line-height: 1.2;
    }
    
    .player-greeting .subtitle-text {
        font-size: 0.9rem;
        font-weight: 600;
        color: white;
        display: block;
        margin-top: 3px;
        font-family: 'Rajdhani', sans-serif;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
        margin-bottom: 8px;
        flex-shrink: 0;
        justify-content: center;
        align-items: center;
        min-height: auto;
        max-width: 320px;
        width: 100%;
        grid-template-rows: repeat(2, auto);
    }
    
    .card-item {
        height: 200px;
        max-width: 150px;
        margin: 0 auto;
        min-height: 200px;
        aspect-ratio: 2.5 / 3.5;
        overflow: hidden;
        position: relative;
    }
    
    .card-wrapper {
        width: 100% !important;
        height: 100% !important;
        overflow: visible !important;
    }
    
    .card-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
    }
    
    /* Mobile specific card selection styles */
    .card-item.selected {
        background: transparent !important;
        outline: none !important;
        position: relative !important;
        overflow: hidden !important;
        transform: none !important;
        animation: none !important;
    }
    
    .card-item.selected::before {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        right: 2px;
        bottom: 2px;
        border: 2px solid #00d4ff;
        border-radius: 0;
        z-index: 1000;
        pointer-events: none;
        background: transparent;
        box-shadow: none;
        animation: none !important;
        transform: none !important;
        box-sizing: border-box;
    }
    
    /* Remove any card hover or click animations on mobile */
    .card-item,
    .card-item:hover,
    .card-item:active,
    .card-item:focus,
    .card-item.selected {
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
    
    .card-wrapper,
    .card-wrapper:hover,
    .card-wrapper:active,
    .card-wrapper:focus {
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
    
    .card-inner,
    .card-inner:hover,
    .card-inner:active,
    .card-inner:focus {
        animation: none !important;
        transition: transform 0.6s ease-in-out !important;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .verify-instruction {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    #verify-btn {
        margin-bottom: 40px;
    }
    
    .primary-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
        min-width: 120px;
        z-index: 100;
        position: relative;
    }
    
    #continue-btn {
        margin-top: 1px;
        margin-bottom: 5px;
        flex-shrink: 0;
        position: relative;
        z-index: 1000;
        display: block !important;
        visibility: visible !important;
    }
    
    .selected-card-display {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
        padding: 20px;
        flex-shrink: 0;
    }
    
    .success-card-image {
        width: 100px;
        height: 130px;
    }
    
    .logo {
        height: 80px;
    }
    
    .logo-container {
        top: 30px;
    }
}

@media (max-width: 480px) {
    .welcome-card {
        padding: 30px 15px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
        white-space: normal;
    }
    
    .loading-content {
        padding: 35px 20px;
        max-width: 85% !important;
        width: 100% !important;
    }
    
    .loading-text {
        font-size: 1rem;
        margin-bottom: 18px;
    }
    
    .loading-spinner,
    .processing-spinner {
        width: 45px;
        height: 45px;
        border-width: 2px;
        margin-bottom: 18px;
    }
    
    #username-input {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100%;
        padding: 12px 16px;
    }
    
    .logo {
        height: 70px;
    }
    
    .logo-container {
        top: 25px;
    }
    
    .container {
        padding: 60px 10px 15px;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        height: 100vh !important;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    .player-greeting {
        flex-shrink: 0;
        margin-bottom: 10px;
        margin-top: -5px;
    }
    
    .player-greeting h1 {
        font-size: 1.4rem;
        line-height: 1.2;
    }
    
    .player-greeting .subtitle-text {
        font-size: 0.9rem;
        font-weight: 600;
        color: white;
        display: block;
        margin-top: 3px;
        font-family: 'Rajdhani', sans-serif;
    }
    
    .cards-grid {
        gap: 10px;
        padding: 0 10px;
        flex-shrink: 0;
        justify-content: center;
        align-items: center;
        margin-bottom: 8px;
        max-width: 320px;
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
    }
    
    .card-item {
        height: 200px;
        max-width: 150px;
    }
    
    .error-title {
        font-size: 1.3rem;
    }
    
    .verify-instruction {
        font-size: 0.9rem;
        margin-bottom: 18px;
    }
    
    #verify-btn {
        margin-bottom: 50px;
    }
    
    .primary-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
        min-width: 100px;
        z-index: 100;
        position: relative;
    }
    
    #continue-btn {
        margin-top: 10px;
        margin-bottom: 15px;
        flex-shrink: 0;
    }
    
    .success-title {
        font-size: 1.6rem;
        white-space: nowrap;
    }
    
    .success-card-image {
        width: 80px;
        height: 100px;
    }
    
    .selected-card-display {
        padding: 15px;
        gap: 10px;
        flex-shrink: 0;
    }
    
    /* Use same selection approach as iPad for iPhone */
    .card-item.selected,
    .card-item:nth-child(1).selected,
    .card-item:nth-child(2).selected,
    .card-item:nth-child(3).selected,
    .card-item:nth-child(4).selected {
        background: transparent !important;
        outline: none !important;
        position: relative !important;
        overflow: visible !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .card-item.selected .card-wrapper,
    .card-item:nth-child(1).selected .card-wrapper,
    .card-item:nth-child(2).selected .card-wrapper,
    .card-item:nth-child(3).selected .card-wrapper,
    .card-item:nth-child(4).selected .card-wrapper {
        transform: none !important;
        transition: none !important;
        animation: none !important;
        background: transparent !important;
        outline: none !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .card-item.selected::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border: 3px solid #00d4ff;
        border-radius: 0;
        z-index: 1000;
        pointer-events: none;
        background: transparent;
        box-shadow: none;
        animation: none !important;
        transform: none !important;
        -webkit-tap-highlight-color: transparent !important;
        box-sizing: border-box;
    }
    
    .card-item.selected::after {
        display: none !important;
    }
    
    /* Prevent white transparent overlay effects */
    .card-item.selected .card-front,
    .card-item.selected .card-back,
    .card-item.selected .card-image,
    .card-item.selected img {
        opacity: 1 !important;
        filter: none !important;
        background: none !important;
        -webkit-filter: none !important;
    }
    
    /* Remove any pseudo-elements or overlays that might cause white effects */
    .card-item.selected *::before,
    .card-item.selected *::after {
        display: none !important;
    }
    
    /* Ensure no hover or focus effects on selected cards */
    .card-item.selected:hover,
    .card-item.selected:focus,
    .card-item.selected:active {
        background: transparent !important;
        opacity: 1 !important;
        filter: none !important;
        -webkit-filter: none !important;
    }
    
    /* Remove any webkit appearance that might cause effects */
    .card-item.selected {
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    /* Prevent blue areas during flip */
    .card-item,
    .card-wrapper,
    .card-front,
    .card-back,
    .card-inner,
    .card-item.flipped,
    .card-item.flipped .card-wrapper,
    .card-item.flipped .card-front,
    .card-item.flipped .card-back,
    .card-item.flipped .card-inner,
    .card-item.selected,
    .card-item.selected .card-wrapper,
    .card-item.selected .card-front,
    .card-item.selected .card-back,
    .card-item.selected .card-inner,
    .card-item:hover,
    .card-item:active,
    .card-item:focus {
        background: transparent !important;
        outline: none !important;
        border: none !important;
        box-shadow: none !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .card-item.flipped {
        background: transparent !important;
        outline: none !important;
    }
    
    /* Additional iPhone-specific blue area prevention */
    * {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
    }
    
    .cards-grid *,
    .card-item *,
    .card-item,
    .card-item.selected,
    .card-item.selected * {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        outline: none !important;
        background: transparent !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .card-item.selected {
        -webkit-tap-highlight-color: transparent !important;
        background: transparent !important;
        outline: none !important;
        border: none !important;
        box-shadow: none !important;
        position: relative !important;
    }
    
    /* Force remove any iOS blue highlighting on selected cards */
    .card-item.selected,
    .card-item.selected:active,
    .card-item.selected:focus,
    .card-item.selected:hover {
        -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
        background-color: transparent !important;
        background: none !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-overflow-scrolling: touch;
        background: #000000 !important;
        background-attachment: fixed;
    }
    
    .primary-btn {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
        background: linear-gradient(45deg, #00d4ff, #0099cc) !important;
        color: white !important;
    }
    
    #continue-btn {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
        z-index: 999;
        background: linear-gradient(45deg, #00d4ff, #0099cc) !important;
        color: white !important;
    }
    
    .card-item {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
    
    .card-wrapper {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
        background: linear-gradient(135deg, #1565c0 0%, #1976d2 50%, #1e88e5 100%) !important;
    }
    
    /* Force hardware acceleration for better performance */
    .card-item:hover .card-wrapper,
    .card-item.selected .card-wrapper {
        -webkit-transform: translateZ(0) translateY(-10px) scale(1.02);
        transform: translateZ(0) translateY(-10px) scale(1.02);
    }
    
    /* Bottom row cards (3rd and 4th) zoom down */
    .card-item:nth-child(3).selected .card-wrapper,
    .card-item:nth-child(4).selected .card-wrapper {
        -webkit-transform: translateZ(0) translateY(10px) scale(1.03);
        transform: translateZ(0) translateY(10px) scale(1.03);
        background: linear-gradient(135deg, #1976d2 0%, #2196f3 50%, #42a5f5 100%) !important;
    }
    
    /* Top row cards (1st and 2nd) zoom up */
    .card-item:nth-child(1).selected .card-wrapper,
    .card-item:nth-child(2).selected .card-wrapper {
        -webkit-transform: translateZ(0) translateY(-10px) scale(1.03);
        transform: translateZ(0) translateY(-10px) scale(1.03);
        background: linear-gradient(135deg, #1976d2 0%, #2196f3 50%, #42a5f5 100%) !important;
    }
}

/* iOS viewport fix */
@supports (-webkit-touch-callout: none) {
    .screen {
        min-height: -webkit-fill-available;
    }
    
    .container {
        min-height: -webkit-fill-available;
    }
}

/* iPhone specific fixes */
@supports (-webkit-touch-callout: none) and (orientation: portrait) {
    /* Prevent auto-zoom on iPhone */
    input, select, textarea, button {
        font-size: 16px !important;
        -webkit-text-size-adjust: 100%;
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* Fix iPhone viewport issues */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        position: relative;
        width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        overflow: hidden;
        background: #000000 !important;
    }
    
    .screen {
        height: 100vh;
        height: -webkit-fill-available;
        position: fixed;
        overflow: hidden;
        background: transparent;
    }
    
    .container {
        height: 100vh !important;
        height: -webkit-fill-available !important;
        overflow: hidden;
        background: transparent;
        padding-bottom: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    /* Fix iPhone button issues */
    .primary-btn {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        outline: none;
        border: none;
        font-size: 16px !important;
        background: linear-gradient(45deg, #00d4ff, #0099cc) !important;
        color: white !important;
        padding: 4px 10px !important;
        margin-top: 1px !important;
        margin-bottom: 1px !important;
    }
    
    #continue-btn {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        outline: none;
        border: none;
        font-size: 16px !important;
        position: relative;
        z-index: 9999;
        display: block !important;
        visibility: visible !important;
        background: linear-gradient(45deg, #00d4ff, #0099cc) !important;
        color: white !important;
        margin-top: 10px;
        margin-bottom: 15px;
        flex-shrink: 0;
        padding: 8px 20px !important;
        line-height: 1.2;
        height: auto !important;
        min-height: 28px;
    }
    
    /* Fix iPhone card issues */
    .card-item {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    
    .cards-grid {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        margin-bottom: 20px;
        flex-shrink: 0;
    }
    
    .player-greeting {
        flex-shrink: 0;
        margin-bottom: 15px;
    }
}

/* iPhone landscape fixes */
@supports (-webkit-touch-callout: none) and (orientation: landscape) {
    .container {
        padding: 100px 15px 20px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .card-item {
        height: 200px;
        max-width: 140px;
    }
}

/* Prevent iPhone Safari bounce - iOS only */
@supports (-webkit-touch-callout: none) {
    html, body {
        height: 100%;
        overflow: hidden;
        position: relative;
        width: 100%;
        background: #000000 !important;
    }
    
    .screen {
        height: 100%;
        overflow: hidden;
        position: fixed;
        width: 100%;
        background: transparent;
    }
    
    .screen.active {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        background: transparent;
        overflow: hidden;
    }
    
    /* Ensure animated background works on iPhone */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: 
            radial-gradient(circle at 20% 20%, rgba(63, 81, 181, 0.3) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(26, 35, 126, 0.2) 0%, transparent 50%),
            radial-gradient(circle at 40% 60%, rgba(57, 73, 171, 0.2) 0%, transparent 50%);
        animation: backgroundShift 20s ease-in-out infinite;
        z-index: -1;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Override iPhone fixes for Android */
@supports not (-webkit-touch-callout: none) {
    html, body {
        height: 100% !important;
        overflow: hidden !important;
        position: relative !important;
        width: 100% !important;
        min-height: 100vh;
    }
    
    .screen {
        height: 100% !important;
        min-height: 100vh;
        overflow: hidden !important;
        position: fixed;
        background: transparent;
    }
    
    .screen.active {
        height: 100% !important;
        min-height: 100vh;
        overflow: hidden !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Android specific fixes */
@media screen and (max-width: 767px) {
    .container {
        height: 100vh !important;
        overflow: hidden;
        padding-bottom: 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    .screen {
        height: 100vh !important;
        overflow: hidden;
        position: fixed;
        align-items: center;
        justify-content: center;
        padding-top: 0;
    }
    
    .screen.active {
        overflow: hidden;
        height: 100vh;
        align-items: center;
        justify-content: center;
    }
    
    #continue-btn {
        margin-top: 28px;
        margin-bottom: 20px;
        position: relative;
        z-index: 1000;
        flex-shrink: 0;
    }
    
    .cards-grid {
        margin-bottom: 20px;
        flex-shrink: 0;
        justify-content: center;
        align-items: center;
    }
    
    .player-greeting {
        flex-shrink: 0;
        margin-bottom: 15px;
    }
}

/* Android Chrome specific fixes */
@supports not (-webkit-touch-callout: none) {
    .container {
        height: 100vh !important;
        min-height: 100vh;
        padding-bottom: 20px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    .screen {
        height: 100vh !important;
        min-height: 100vh;
        overflow: hidden;
        align-items: center;
        justify-content: center;
        padding-top: 0;
    }
    
    .screen.active {
        overflow: hidden;
        height: 100vh;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
    }
    
    #continue-btn {
        margin-top: 2px;
        margin-bottom: 2px;
        position: relative;
        z-index: 1000;
        display: block !important;
        visibility: visible !important;
        flex-shrink: 0;
        padding: 10px 30px;
        font-size: 14px;
    }
    
    .cards-grid {
        flex-shrink: 0;
        justify-content: center;
        align-items: center;
    }
    
    .player-greeting {
        flex-shrink: 0;
    }
}
