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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: white;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.brand {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.brand-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ui-left {
    position: absolute;
    left: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 5;
}

.ui-right {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.score-display {
    text-align: center;
    font-size: 18px;
    color: #888;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 24px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 160px;
    max-width: 240px;
    min-height: 80px;
    cursor: pointer;
}

.score-display:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.flip-container {
    perspective: 1000px;
    width: 100%;
    height: 100%;
    min-height: 80px;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 80px;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

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

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    min-height: 80px;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.flip-card-back {
    transform: rotateY(180deg);
}

.score-text {
    line-height: 1.3;
    word-wrap: break-word;
    text-align: center;
    font-size: inherit;
    max-width: 100%;
    white-space: normal;
}

.best-scores {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
}

.scores-title {
    font-size: 18px;
    font-weight: 600;
    color: #f1c40f;
    text-align: center;
    margin-bottom: 20px;
}

.scores-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.score-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

.score-item.current {
    border-color: #66bb6a;
    background: rgba(102, 187, 106, 0.1);
}

.level-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.level-number {
    font-size: 14px;
    font-weight: 600;
    color: #66bb6a;
}

.level-score {
    font-size: 12px;
    color: #888;
}

.play-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover:not(:disabled) {
    transform: scale(1.05);
    background: #7c3aed;
}

.play-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #666;
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    height: 100%;
    position: relative;
}

.battle-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.mega-explosion {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,240,180,0.95) 0%, rgba(255,120,0,0.8) 40%, rgba(255,0,0,0.0) 60%);
    filter: blur(1px) drop-shadow(0 0 16px rgba(255,160,0,0.7));
    animation: explosion-bloom 0.5s ease-out forwards;
    z-index: 2;
}

@keyframes explosion-bloom {
    0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.4); }
    70% { opacity: 1; transform: translate(-50%, -50%) scale(2.6); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(3.2); }
}

.laser-beam {
    position: absolute;
    background: linear-gradient(90deg, rgba(255,255,255,0.0) 0%, rgba(255,80,80,0.85) 25%, rgba(255,80,80,0.85) 75%, rgba(255,255,255,0.0) 100%);
    box-shadow: 0 0 18px rgba(255,80,80,0.8);
    opacity: 0.85;
    z-index: 2;
    animation: beam-flash 0.4s ease-out forwards;
}

@keyframes beam-flash {
    0% { opacity: 0; }
    15% { opacity: 1; }
    100% { opacity: 0; }
}

.fighter {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e0e0, #9e9e9e);
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    transform: translate(-50%, -50%);
}

.fighter.dead {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.fighter.red {
    background: linear-gradient(135deg, #ff6b6b, #d84343);
}

.fighter.blue {
    background: linear-gradient(135deg, #66bb6a, #3f9151);
}

.bullet {
    position: absolute;
    width: 10px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
    transform: translate(-50%, -50%);
}

.hit-spark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,255,200,0.9) 0%, rgba(255,180,0,0.8) 45%, rgba(255,0,0,0.0) 60%);
    border-radius: 50%;
    filter: drop-shadow(0 0 6px rgba(255,200,0,0.6));
    animation: spark-pop 0.25s ease-out forwards;
    pointer-events: none;
}

@keyframes spark-pop {
    0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.6); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

.fighter.strike-right {
    animation: strike-right 0.22s ease-out;
}

.fighter.strike-left {
    animation: strike-left 0.22s ease-out;
}

.fight-pair {
    position: absolute;
    transform: translate(-50%, -50%);
}

.hit-spark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,255,200,0.9) 0%, rgba(255,180,0,0.8) 45%, rgba(255,0,0,0.0) 60%);
    border-radius: 50%;
    filter: drop-shadow(0 0 6px rgba(255,200,0,0.6));
    animation: spark-pop 0.25s ease-out forwards;
    pointer-events: none;
}

@keyframes fight-bob {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-3px); }
}

@keyframes fight-swing {
    0%, 100% { transform: translateY(-50%) rotate(-15deg); }
    50% { transform: translateY(-50%) rotate(15deg); }
}

@keyframes strike-right {
    0% { transform: translate(-50%, -50%) translateX(0); }
    60% { transform: translate(-50%, -50%) translateX(8px); }
    100% { transform: translate(-50%, -50%) translateX(0); }
}

@keyframes strike-left {
    0% { transform: translate(-50%, -50%) translateX(0); }
    60% { transform: translate(-50%, -50%) translateX(-8px); }
    100% { transform: translate(-50%, -50%) translateX(0); }
}

@keyframes spark-pop {
    0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.6); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

@keyframes fight-duel {
    0%, 100% { transform: translate(-50%, -50%) translateX(-6px); }
    50% { transform: translate(-50%, -50%) translateX(6px); }
}

.draggable-object {
    position: absolute;
    cursor: grab;
    transition: none;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.draggable-object:hover {
    transform: scale(1.05);
}

.draggable-object:active {
    cursor: grabbing;
    transform: scale(1.02);
}

.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.success-content {
    text-align: center;
    margin-bottom: 40px;
}

.success-ring {
    width: 200px;
    height: 200px;
    border: 8px solid #66bb6a;
    border-radius: 50%;
    margin: 0 auto 30px;
    position: relative;
    box-shadow: 0 0 30px rgba(102, 187, 106, 0.3);
}

.success-score {
    font-size: 48px;
    font-weight: bold;
    color: #66bb6a;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.success-text {
    font-size: 18px;
    color: white;
    opacity: 0.9;
    margin-bottom: 10px;
}

.level-complete {
    font-size: 24px;
    color: #f1c40f;
    font-weight: bold;
    margin-bottom: 20px;
}

.level-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.replay-btn, .next-level-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.replay-btn {
    background: #666;
    color: white;
}

.replay-btn:hover {
    background: #777;
}

.next-level-btn {
    background: #66bb6a;
    color: white;
}

.next-level-btn:hover {
    background: #5aaf5a;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.copy-btn {
    padding: 10px 20px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #7c3aed;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1002;
}

.celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1001;
}

.confetti {
    position: absolute;
    top: -12px;
    opacity: 0.95;
    border-radius: 2px;
    transform: translateY(0) rotate(0deg);
    animation: confetti-fall 4s linear forwards;
    will-change: transform, opacity;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0.9;
    }
    100% {
        transform: translateY(100vh) rotate(540deg);
        opacity: 0.6;
    }
}

.celebration-particle {
    position: absolute;
    opacity: 0.85;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
    animation: particle-pop 2s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes particle-pop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.perfect-text {
    position: absolute;
    color: #f1c40f;
    font-size: 48px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 6px 18px rgba(241, 196, 15, 0.35);
    pointer-events: none;
    animation: perfect-float 2s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes perfect-float {
    0% {
        transform: translateY(20px) scale(0.98);
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    100% {
        transform: translateY(-60px) scale(1.02);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .brand {
        top: 20px;
        left: 20px;
    }
    
    .brand-text {
        font-size: 16px;
    }
    
    .ui-left {
        left: 20px;
        bottom: 20px;
    }
    
    .ui-right {
        right: 20px;
    }
    
    .score-display {
        font-size: 20px;
        max-width: 180px;
    }
    
    .best-scores {
        min-width: 180px;
    }
    
    .success-ring {
        width: 150px;
        height: 150px;
    }
    
    .success-score {
        font-size: 36px;
    }
    
    .level-actions {
        flex-direction: column;
        gap: 15px;
    }
} 

.zollner-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: #000;
    overflow: hidden;
}

.zollner-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 25px,
            #333 25px,
            #333 28px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent 0px,
            transparent 25px,
            #333 25px,
            #333 28px
        );
    background-size: 50px 50px, 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.25;
    animation: zollner-move 30s linear infinite;
}

.zollner-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            30deg,
            transparent 0px,
            transparent 20px,
            #444 20px,
            #444 23px
        ),
        repeating-linear-gradient(
            -30deg,
            transparent 0px,
            transparent 20px,
            #444 20px,
            #444 23px
        );
    background-size: 40px 40px, 40px 40px;
    background-position: 20px 20px, 0 0;
    opacity: 0.15;
    animation: zollner-move 25s linear infinite reverse;
}

@keyframes zollner-move {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(30px, 30px);
    }
}

.zollner-bg.level-5::before,
.zollner-bg.level-5::after {
    background-size: 45px 45px, 45px 45px;
    animation-duration: 25s, 35s;
}

.zollner-bg.level-6::before,
.zollner-bg.level-6::after {
    background-size: 40px 40px, 40px 40px;
    animation-duration: 20s, 30s;
}

.zollner-bg.level-7::before,
.zollner-bg.level-7::after {
    background-size: 35px 35px, 35px 35px;
    animation-duration: 18s, 25s;
}

.zollner-bg.level-8::before,
.zollner-bg.level-8::after {
    background-size: 30px 30px, 30px 30px;
    animation-duration: 15s, 22s;
} 