@keyframes starAnimation {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

@keyframes shipHover {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes powerUpGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.5) drop-shadow(0 0 10px #fff); }
}

@keyframes damageFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scorePopup {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0; }
}

@keyframes explosion {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

@keyframes firework {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes cardShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-5px, -5px) rotate(-2deg); }
    20% { transform: translate(5px, 5px) rotate(2deg); }
    30% { transform: translate(-7px, 2px) rotate(-3deg); }
    40% { transform: translate(7px, -2px) rotate(3deg); }
    50% { transform: translate(-5px, 5px) rotate(-2deg); }
    60% { transform: translate(5px, -5px) rotate(2deg); }
    70% { transform: translate(-3px, 3px) rotate(-1deg); }
    80% { transform: translate(3px, -3px) rotate(1deg); }
    90% { transform: translate(-2px, 2px) rotate(-0.5deg); }
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-10px, -10px); }
    20% { transform: translate(10px, 10px); }
    30% { transform: translate(-15px, 5px); }
    40% { transform: translate(15px, -5px); }
    50% { transform: translate(-10px, 10px); }
    60% { transform: translate(10px, -10px); }
    70% { transform: translate(-5px, 5px); }
    80% { transform: translate(5px, -5px); }
    90% { transform: translate(-2px, 2px); }
}

@keyframes cardTear {
    0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    40% { clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%); }
    60% { clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%); }
    80% { clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%); }
    100% { clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%); }
}

@keyframes cardReveal {
    0% { transform: scale(0.8) translateY(100%); opacity: 0; }
    50% { transform: scale(1.2) translateY(-20%); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes shatterPiece {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot));
        opacity: 0;
    }
}

@keyframes cardEntrance {
    0% {
        transform: scale(2) rotate(180deg);
        filter: brightness(2);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(-10deg);
        filter: brightness(1.5);
        opacity: 0.8;
    }
    75% {
        transform: scale(1.1) rotate(5deg);
        filter: brightness(1.2);
        opacity: 0.9;
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
        opacity: 1;
    }
}

.game-sector {
    width: 100%;
    min-height: calc(100vh - 150px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-panel {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 200px);
    position: relative;
    padding: 30px;
    background: var(--panel-bg);
    border-radius: 15px;
    box-shadow: var(--panel-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#gameContainer {
    width: 100%;
    height: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

#gameContainer canvas {
    width: 100% !important;
    height: 100% !important;    
    outline: none;
    display: none;
}

#gameContainer canvas.active {
    display: block;
}

.gallery-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    text-align: center;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.gallery-instructions.hidden {
    opacity: 0;
}

.controls-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-size: 14px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.7;
    pointer-events: none;
}

.loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 24px;
    z-index: 1000;
}

.loading-screen.hidden {
    display: none;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, #000033, #000066);
    overflow: hidden;
    cursor: none;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    z-index: 101;
}

.score {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.health-bar {
    margin-top: 10px;
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    border-radius: 10px;
    overflow: hidden;
}

.health-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff6b6b);
    transition: width 0.3s ease;
}

.player {
    position: absolute;
    width: 60px;
    height: 60px;
    transform-origin: center;
    transition: transform 0.1s ease;
    z-index: 10;
}

.player img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: shipHover 2s infinite ease-in-out;
}

.enemy {
    position: absolute;
    width: 50px;
    height: 50px;
    transform-origin: center;
}

.enemy img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.projectile {
    position: absolute;
    width: 10px;
    height: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px #fff;
}

.power-up {
    position: absolute;
    width: 30px;
    height: 30px;
    animation: powerUpGlow 1.5s infinite ease-in-out;
}

.explosion {
    position: absolute;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #ff6b6b, transparent);
    border-radius: 50%;
    animation: explosion 0.5s forwards;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    z-index: 1000;
    display: none;
}

.game-over h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.game-over button {
    padding: 15px 30px;
    font-size: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ff0000);
    border: none;
    border-radius: 25px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.game-over button:hover {
    transform: scale(1.1);
}

.level-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.power-up-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.power-up-slot {
    width: 40px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.power-up-slot img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    opacity: 0.5;
}

.power-up-slot.active img {
    opacity: 1;
    animation: powerUpGlow 1.5s infinite ease-in-out;
}

.combo-counter {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.combo-counter.active {
    opacity: 1;
}

.achievement {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 20px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.achievement.show {
    opacity: 1;
    animation: achievementSlide 3s forwards;
}

@keyframes achievementSlide {
    0% { transform: translate(-50%, 100%); }
    10% { transform: translate(-50%, 0); }
    90% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 0); opacity: 0; }
}

.pause-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.pause-menu.active {
    display: flex;
}

.pause-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: #fff;
}

.pause-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.pause-content button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 18px;
    background: linear-gradient(45deg, #ff6b6b, #ff0000);
    border: none;
    border-radius: 15px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pause-content button:hover {
    transform: scale(1.1);
}

.play-button {
    background: linear-gradient(45deg, #ff6b6b, #ff0000);
    border: none;
    border-radius: 50px;
    padding: 20px 60px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.play-button i {
    font-size: 28px;
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
}

[data-theme="dark"] .play-button {
    background: linear-gradient(45deg, #0A84FF, #30cfd0);
    box-shadow: 0 0 20px rgba(10, 132, 255, 0.3);
}

[data-theme="dark"] .play-button:hover {
    box-shadow: 0 0 30px rgba(10, 132, 255, 0.5);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    margin: auto;
}

.surprise-card {
    width: 100%;
    aspect-ratio: 2.5/3.5;
    position: relative;
    cursor: pointer;
    perspective: 1500px;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.surprise-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.surprise-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 18px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(15px);
}

.surprise-card:hover::before {
    opacity: 0.5;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.surprise-card.revealed .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-front {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transform: rotateY(0deg);
    z-index: 2;
}

.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.1) 45%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.1) 55%,
        transparent 100%
    );
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.surprise-card:hover .card-front::before {
    transform: translateX(100%) rotate(45deg);
}

.card-back {
    background: radial-gradient(circle at center, #ffffff, #f0f0f0);
    transform: rotateY(180deg);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--primary-color);
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
}

.card-back img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: 3;
}

.surprise-card.revealed .card-back img {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.card-design {
    width: 85%;
    height: 85%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.card-logo {
    font-size: 48px;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 20px var(--primary-color),
                     0 0 30px var(--secondary-color);
        transform: scale(1.1);
    }
}

.card-shine {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 45%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.1) 55%,
        transparent 100%
    );
    transform: rotate(45deg);
    animation: shineEffect 5s infinite;
}

@keyframes shineEffect {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    50% {
        transform: translateX(100%) rotate(45deg);
    }
    100% {
        transform: translateX(-100%) rotate(45deg);
    }
}

.card-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.particle {
    position: absolute;
    background: radial-gradient(circle at center, 
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 50%;
    animation: particleFade 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes particleFade {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

.card-reveal-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
        rgba(255, 255, 255, 0.8),
        transparent 70%
    );
    opacity: 0;
    z-index: 5;
    animation: revealShine 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes revealShine {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

.explosion-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: gold;
    border-radius: 50%;
    pointer-events: none;
}

.card-reveal-effect {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.explosion-effect {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0) 70%
    );
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    z-index: 1;
    mix-blend-mode: overlay;
}

.explosion-effect.active {
    opacity: 1;
    transform: scale(2);
}

.magical-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    pointer-events: none;
    mix-blend-mode: screen;
}

.firework {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(255,215,0,0.8) 0%,
        rgba(255,215,0,0.4) 50%,
        transparent 70%
    );
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 4;
}

.light-beam {
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.2) 10deg,
        transparent 20deg,
        transparent 340deg,
        rgba(255, 255, 255, 0.2) 350deg,
        transparent 360deg
    );
    animation: rotate 4s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 768px) {
    .game-sector {
        min-height: calc(100vh - 100px);
        padding: 10px;
    }

    .game-panel {
        padding: 15px;
        min-height: calc(100vh - 150px);
    }

    .cards-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 10px;
    }

    .remaining-cards-info {
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 16px;
        padding: 8px 16px;
    }

    .countdown-info {
        position: absolute;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 16px;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .cards-container {
        grid-template-columns: repeat(1, 1fr);
        max-width: 300px;
        gap: 20px;
        margin-top: 120px;
    }

    .remaining-cards-info {
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 14px;
        padding: 6px 12px;
        width: auto;
    }

    .countdown-info {
        position: absolute;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 14px;
        padding: 6px 12px;
        width: auto;
    }
}

.cards-container.locked .surprise-card {
    filter: blur(3px);
    pointer-events: none;
}

.cards-container.locked .card-lock {
    display: flex;
}

.card-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.card-lock i {
    color: white;
    font-size: 20px;
}

.wallet-connect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    pointer-events: all;
    z-index: 1000;
}

.connect-wallet-btn {
    background: var(--primary);
    border: 2px solid var(--secondary);
    border-radius: 15px;
    padding: 20px 40px;
    color: white;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 280px;
    justify-content: center;
}

.connect-wallet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: 0.5s;
}

.connect-wallet-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: var(--secondary);
}

.connect-wallet-btn:hover::before {
    left: 100%;
}

.connect-wallet-btn i {
    font-size: 24px;
    animation: pulse 2s infinite;
}

[data-theme="dark"] .connect-wallet-btn {
    background: #0A84FF;
    border-color: #40A9FF;
    box-shadow: 0 4px 20px rgba(10, 132, 255, 0.3);
}

[data-theme="dark"] .connect-wallet-btn:hover {
    background: #40A9FF;
    box-shadow: 0 8px 25px rgba(10, 132, 255, 0.4);
}

@media (max-width: 768px) {
    .connect-wallet-btn {
        padding: 15px 30px;
        font-size: 20px;
        min-width: 240px;
    }
}

@media (max-width: 480px) {
    .connect-wallet-btn {
        padding: 12px 25px;
        font-size: 18px;
        min-width: 200px;
    }
}

.counter-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cards-counter, .time-counter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.time-counter {
    border-left: 2px solid var(--secondary);
    padding-left: 20px;
}

[data-theme="dark"] .time-counter {
    border-left-color: #0A84FF;
}

.remaining-cards-info.no-cards .time-counter {
    border-left-color: #ff0000;
}

.remaining-cards-info {
    position: absolute;
    top: 10px;
    left: calc(50% - 100px);
    transform: translateX(-50%);
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary);
    white-space: nowrap;
}

.countdown-info {
    position: absolute;
    top: 10px;
    left: calc(50% + 100px);
    transform: translateX(-50%);
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    color: var(--text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary);
    white-space: nowrap;
    display: none;
}

.countdown-info .countdown-timer {
    font-weight: bold;
    margin-left: 5px;
}

.cards-container.locked ~ .countdown-info {
    display: block;
}

[data-theme="dark"] .countdown-info {
    background: var(--primary);
    box-shadow: 0 2px 10px rgba(10, 132, 255, 0.2);
    border-color: #0A84FF;
}

.remaining-cards-info.no-cards ~ .countdown-info {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

[data-theme="dark"] .remaining-cards-info.no-cards ~ .countdown-info {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    color: #ff0000;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

[data-theme="dark"] .remaining-cards-info {
    background: var(--primary);
    box-shadow: 0 2px 10px rgba(10, 132, 255, 0.2);
    border-color: #0A84FF;
}

[data-theme="dark"] .remaining-cards-info i {
    color: #0A84FF;
}

.surprise-card.shaking {
    animation: cardShake 0.8s cubic-bezier(0.36, 0, 0.66, -0.56) infinite;
}

.screen-shake {
    animation: screenShake 0.5s cubic-bezier(0.36, 0, 0.66, -0.56);
}

.card-tear {
    position: absolute;
    inset: 0;
    background: inherit;
    animation: cardTear 0.5s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

.card-reveal-animation {
    animation: cardReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.card-piece {
    position: absolute;
    background-size: 500% 500%;
    pointer-events: none;
    animation: shatterPiece 1s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

.card-entrance {
    animation: none !important;
}

.lightning-flash {
    position: absolute;
    inset: 0;
    background: white;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
}

@keyframes lightningStrike {
    0%, 100% { opacity: 0; }
    10%, 30%, 50% { opacity: 0.8; }
    20%, 40%, 60% { opacity: 0.3; }
}

.portal-effect {
    position: absolute;
    inset: 0;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--primary-color),
        var(--secondary-color),
        transparent
    );
    opacity: 0;
    transform: scale(0.5);
    animation: portalSpin 2s linear infinite;
    mix-blend-mode: screen;
    z-index: 1;
}

@keyframes portalSpin {
    from { transform: translate(-50%, -50%) rotate(0deg) scale(0.5); }
    to { transform: translate(-50%, -50%) rotate(360deg) scale(2); }
} 