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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html, body {
    width: 100%;
    height: 100%;
}

main {
    flex: 1;
}

header {
    background-color: #000;
    color: #fff;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
}

.home-link {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid #fff;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.home-link:hover {
    background-color: #fff;
    color: #000;
}

footer {
    background-color: #000;
    color: #fff;
    padding: 20px 40px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

footer p {
    margin: 0;
}

.hero {
    background-image: url('assets/img/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 40px;
}

.hero-content h2 {
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto 40px;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
    max-width: 900px;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

.start-training-btn {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 30px 80px;
    font-size: 32px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    display: inline-block;
}

.start-training-btn:hover {
    background-color: #000;
    color: #fff;
    transform: scale(1.05);
}

.levels-main {
    flex: 1;
    background-image: url('assets/img/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.levels-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.levels-hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.levels-hero h2 {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.5px;
}

.levels-grid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.level-card {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.level-card:hover {
    transform: translateX(10px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.level-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-card h2 {
    font-size: 24px;
    margin: 0;
    color: #000;
    min-width: 80px;
}

.level-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    margin-left: 15px;
}

.level-difficulty {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.level-speed {
    font-size: 12px;
    color: #333;
    font-weight: bold;
}

.level-stars {
    font-size: 18px;
    white-space: nowrap;
}

.star.filled {
    color: #FFD700;
}

.star.empty {
    color: #ccc;
}

.level-btn {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 8px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.level-btn:hover {
    background-color: #333;
    transform: scale(1.05);
}

.description-black {
    background-color: #000;
    color: #fff;
    padding: 60px 40px;
}

.description-black h2 {
    max-width: 1000px;
    margin: 0 auto 35px;
    font-size: 38px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.3;
    color: #fff;
}

.description-black h3 {
    max-width: 1000px;
    margin: 45px auto 25px;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    color: #fff;
    position: relative;
    padding-bottom: 15px;
}

.description-black h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #fff;
}

.description-black p {
    max-width: 1000px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    text-align: center;
}

.description-white {
    background-color: #fff;
    color: #000;
    padding: 60px 40px;
}

.description-white h2 {
    max-width: 1000px;
    margin: 0 auto 35px;
    font-size: 38px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.3;
    color: #000;
}

.description-white h3 {
    max-width: 1000px;
    margin: 45px auto 25px;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    color: #000;
    position: relative;
    padding-bottom: 15px;
}

.description-white h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #000;
}

.description-white p {
    max-width: 1000px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    text-align: center;
}

.description-white .platform-info {
    margin-top: 30px;
    font-style: italic;
    color: #555;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.instagram-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #000;
    transition: all 0.3s ease;
    padding: 15px 20px;
    border-radius: 10px;
}

.instagram-link:hover {
    transform: translateY(-5px);
    background-color: #f0f0f0;
}

.instagram-link svg {
    margin-bottom: 10px;
    stroke: #E4405F;
}

.instagram-link:hover svg {
    stroke: #C13584;
}

.instagram-link span {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.game-main {
    flex: 1;
    padding: 20px;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.rotate-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.rotate-btn:hover {
    background-color: #fff;
    transform: scale(1.1);
}

.game-screen-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-screen {
    position: relative;
    width: 100%;
    max-width: calc(95vh * 16 / 9);
    max-height: 95vh;
    aspect-ratio: 16 / 9;
    background-image: url('assets/img/background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.game-screen.rotated {
    transform: rotate(90deg);
    width: 97.5vh;
    height: 54.8vh;
    max-width: none;
    max-height: none;
}

.game-start-btn {
    background-color: rgba(255, 255, 255, 0.95);
    color: #000;
    border: none;
    padding: 1.5vw 4.5vw;
    font-size: 2.5vw;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.game-start-btn:hover {
    background-color: #000;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Countdown animations */
.countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 10vw;
    font-weight: bold;
    color: #fff;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.6),
        0 0 60px rgba(255, 255, 255, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.8);
    animation: countdownPulse 1s ease-out forwards;
    z-index: 1000;
}

.countdown-start {
    font-size: 8vw;
    color: #FFD700;
    text-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.6),
        0 0 90px rgba(255, 215, 0, 0.4),
        0 5px 20px rgba(0, 0, 0, 0.9);
    animation: startExplosion 0.8s ease-out forwards;
}

/* Attack animations */
.attack-animation {
    position: absolute;
    z-index: 500;
}

.attack-right-punch {
    right: 25%;
    top: 20%;
    transform: translate(0, -50%);
}

.attack-left-punch {
    left: 25%;
    top: 20%;
    transform: translate(0, -50%);
}

.attack-lower-right-punch {
    right: 25%;
    bottom: 30%;
    transform: translate(0, 50%);
}

.attack-lower-left-punch {
    left: 25%;
    bottom: 30%;
    transform: translate(0, 50%);
}

.attack-right-pad {
    right: 30%;
    top: 30%;
    transform: translate(0, -50%);
}

.attack-left-pad {
    left: 30%;
    top: 30%;
    transform: translate(0, -50%);
}

.attack-lower-right-pad {
    right: 30%;
    bottom: 25%;
    transform: translate(0, 50%);
}

.attack-lower-left-pad {
    left: 30%;
    bottom: 25%;
    transform: translate(0, 50%);
}

.attack-side-right-pad {
    right: 30%;
    top: 50%;
    transform: translate(0, -50%);
}

.attack-side-left-pad {
    left: 30%;
    top: 50%;
    transform: translate(0, -50%);
}

.attack-upper-side-right-pad {
    right: 35%;
    top: 30%;
    transform: translate(0, -50%) rotate(-45deg);
}

.attack-upper-side-left-pad {
    left: 35%;
    top: 30%;
    transform: translate(0, -50%) rotate(45deg);
}

.attack-default {
    right: 10%;
    top: 20%;
    transform: translate(0, -50%);
}

.attack-animation img {
    width: 6vw;
    min-width: 60px;
    max-width: 120px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.6));
}

@keyframes rightPunchZoom {
    0% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, -50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, -50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, -50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, -50%) scale(3.5);
        opacity: 0;
    }
}

@keyframes leftPunchZoom {
    0% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, -50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, -50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, -50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, -50%) scale(3.5);
        opacity: 0;
    }
}

@keyframes lowerRightPunchZoom {
    0% {
        transform: translate(0, 50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, 50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, 50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, 50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, 50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, 50%) scale(3.5);
        opacity: 0;
    }
}

@keyframes lowerLeftPunchZoom {
    0% {
        transform: translate(0, 50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, 50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, 50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, 50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, 50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, 50%) scale(3.5);
        opacity: 0;
    }
}

@keyframes rightPadZoom {
    0% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, -50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, -50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, -50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, -50%) scale(3);
        opacity: 0;
    }
}

@keyframes leftPadZoom {
    0% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, -50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, -50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, -50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, -50%) scale(3);
        opacity: 0;
    }
}

@keyframes lowerRightPadZoom {
    0% {
        transform: translate(0, 50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, 50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, 50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, 50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, 50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, 50%) scale(3);
        opacity: 0;
    }
}

@keyframes lowerLeftPadZoom {
    0% {
        transform: translate(0, 50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, 50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, 50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, 50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, 50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, 50%) scale(3);
        opacity: 0;
    }
}

@keyframes sideRightPadZoom {
    0% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, -50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, -50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, -50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, -50%) scale(3);
        opacity: 0;
    }
}

@keyframes sideLeftPadZoom {
    0% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, -50%) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, -50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, -50%) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, -50%) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, -50%) scale(3);
        opacity: 0;
    }
}

@keyframes upperSideRightPadZoom {
    0% {
        transform: translate(0, -50%) rotate(-45deg) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, -50%) rotate(-45deg) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, -50%) rotate(-45deg) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, -50%) rotate(-45deg) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, -50%) rotate(-45deg) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, -50%) rotate(-45deg) scale(3);
        opacity: 0;
    }
}

@keyframes upperSideLeftPadZoom {
    0% {
        transform: translate(0, -50%) rotate(45deg) scale(0.3);
        opacity: 0;
    }
    10% {
        transform: translate(0, -50%) rotate(45deg) scale(0.3);
        opacity: 1;
    }
    70% {
        transform: translate(0, -50%) rotate(45deg) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(0, -50%) rotate(45deg) scale(1.5);
        opacity: 1;
    }
    96% {
        transform: translate(0, -50%) rotate(45deg) scale(3);
        opacity: 1;
    }
    100% {
        transform: translate(0, -50%) rotate(45deg) scale(3);
        opacity: 0;
    }
}

@keyframes attackSlide {
    0% {
        right: -200px;
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
    50% {
        right: 50%;
        opacity: 1;
        transform: translateY(-50%) translateX(50%) scale(1.2);
    }
    100% {
        right: 50%;
        opacity: 0;
        transform: translateY(-50%) translateX(50%) scale(1.5);
    }
}

@keyframes countdownPulse {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(0deg);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5) rotate(0deg);
        opacity: 0;
    }
}

@keyframes startExplosion {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
        filter: blur(10px);
    }
    30% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
        filter: blur(0px);
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
        filter: blur(15px);
    }
}

/* Mobile devices - smaller attack icons */
@media (max-width: 768px) {
    header {
        padding: 10px 20px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .home-link {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .hero {
        min-height: 500px;
        background-attachment: scroll;
    }
    
    .hero-content {
        padding: 40px 20px;
    }
    
    .hero-content h2 {
        font-size: 32px;
        margin-bottom: 30px;
    }
    
    .start-training-btn {
        padding: 20px 50px;
        font-size: 24px;
    }
    
    .description-black,
    .description-white {
        padding: 40px 20px;
    }
    
    .description-black h2,
    .description-white h2 {
        font-size: 28px;
        margin-bottom: 25px;
    }
    
    .description-black h3,
    .description-white h3 {
        font-size: 22px;
        margin: 35px auto 20px;
    }
    
    .description-black h3::after,
    .description-white h3::after {
        width: 60px;
        height: 2px;
    }
    
    .description-black p,
    .description-white p {
        font-size: 16px;
    }
    
    .game-main {
        padding: 10px;
    }
    
    .levels-hero {
        padding: 10px;
    }
    
    .levels-hero h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .levels-grid {
        gap: 15px;
        padding: 0 10px;
    }
    
    .level-card {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 15px;
    }
    
    .level-card:hover {
        transform: none;
    }
    
    .level-card h2 {
        font-size: 28px;
        min-width: auto;
        text-align: center;
    }
    
    .level-header {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .level-info {
        margin-left: 0;
        gap: 8px;
        text-align: center;
        width: 100%;
    }
    
    .level-difficulty {
        font-size: 14px;
    }
    
    .level-speed {
        font-size: 13px;
    }
    
    .level-stars {
        font-size: 20px;
        text-align: center;
    }
    
    .level-btn {
        padding: 15px 30px;
        font-size: 16px;
        width: 100%;
        text-align: center;
    }
    
    .attack-animation img {
        width: 3vw;
        min-width: 30px;
        max-width: 60px;
    }
    
    .rotate-btn {
        display: block;
    }
}
