* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0015, #1a0033, #0f0f23, #150020);
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.is-mobile {
    background: linear-gradient(135deg, #0a0015, #1a0033) !important;
}

@media (min-width: 769px) and (hover: hover) {
    body:not(.is-mobile) {
        background-size: 400% 400%;
        animation: subtleGradient 20s ease infinite;
    }
    
    @keyframes subtleGradient {
        0%, 100% { background-position: 0% 50%; }
        25% { background-position: 100% 50%; }
        50% { background-position: 100% 100%; }
        75% { background-position: 0% 100%; }
    }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    will-change: transform;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, #9d4edd, transparent);
    border-radius: 50%;
    transform: translateZ(0);
}

@media (min-width: 769px) and (hover: hover) {
    .particle:not(.is-mobile .particle) {
        animation: float 15s infinite linear;
    }
    
    @keyframes float {
        0% {
            transform: translateY(100vh) rotate(0deg) translateZ(0);
            opacity: 0;
        }
        10% {
            opacity: 1;
        }
        90% {
            opacity: 1;
        }
        100% {
            transform: translateY(-100px) rotate(360deg) translateZ(0);
            opacity: 0;
        }
    }
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translateZ(0);
}

@media (min-width: 769px) and (hover: hover) {
    .star:not(.is-mobile .star) {
        animation: twinkle 4s infinite ease-in-out;
    }
    
    @keyframes twinkle {
        0%, 100% { 
            opacity: 0.2; 
            transform: scale(1) translateZ(0); 
        }
        50% { 
            opacity: 0.8; 
            transform: scale(1.2) translateZ(0); 
        }
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9d4edd, #c77dff);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px) translateZ(0);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.3);
    will-change: transform, opacity;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

@media (hover: hover) {
    .back-to-top:hover {
        transform: translateY(-5px) scale(1.1) translateZ(0);
        box-shadow: 0 8px 30px rgba(138, 43, 226, 0.5);
    }
}

.header {
    text-align: center;
    padding: 80px 0 60px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 25px;
    margin-bottom: 50px;
    border: 2px solid rgba(138, 43, 226, 0.4);
    box-shadow: 
        0 0 50px rgba(138, 43, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

@media (min-width: 769px) and (hover: hover) {
    .header:not(.is-mobile .header)::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.1), transparent);
        animation: headerShimmer 3s infinite;
        will-change: transform;
    }
    
    @keyframes headerShimmer {
        0% { left: -100%; }
        100% { left: 100%; }
    }
}

.header h1 {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(45deg, #9d4edd, #c77dff, #e0aaff, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 60px rgba(138, 43, 226, 0.6);
    transform: translateZ(0);
}

@media (min-width: 769px) and (hover: hover) {
    .header:not(.is-mobile) h1 {
        background-size: 300% 300%;
        animation: gradientText 4s ease infinite;
    }
    
    @keyframes gradientText {
        0%, 100% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
    }
}

.header .subtitle {
    font-size: 1.8rem;
    color: #c77dff;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.countdown {
    font-size: 1.2rem;
    color: #e0aaff;
    margin: 20px 0;
    padding: 15px;
    background: rgba(138, 43, 226, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.section {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
}

@media (hover: hover) {
    .section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.5), transparent);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .section:hover::before {
        opacity: 1;
    }

    .section:hover {
        transform: translateY(-8px) translateZ(0);
        box-shadow: 
            0 20px 60px rgba(138, 43, 226, 0.15),
            0 1px 0 rgba(255, 255, 255, 0.1);
        border-color: rgba(138, 43, 226, 0.5);
    }
}

.section h2 {
    font-size: 2.5rem;
    color: #e0aaff;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    font-weight: 700;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #9d4edd, #c77dff, #e0aaff);
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(138, 43, 226, 0.4);
}

.section p {
    line-height: 1.8;
    font-size: 1.15rem;
    color: #e8e3f0;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 30px;
}

.step {
    background: rgba(138, 43, 226, 0.12);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #c77dff;
    border: 1px solid rgba(138, 43, 226, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
}

@media (hover: hover) {
    .step::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.08), transparent);
        transition: left 0.6s ease;
    }

    .step:hover::before {
        left: 100%;
    }

    .step:hover {
        transform: translateX(10px) translateZ(0);
        border-left-color: #e0aaff;
        background: rgba(138, 43, 226, 0.18);
    }
}

.step h3 {
    color: #e0aaff;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.step p {
    text-align: left;
    line-height: 1.7;
    color: #d8d0e0;
}

.rules-list {
    list-style: none;
    margin-top: 30px;
    counter-reset: rule-counter;
}

.rules-list li {
    background: rgba(138, 43, 226, 0.12);
    padding: 20px 20px 20px 60px;
    margin: 15px 0;
    border-radius: 12px;
    border-left: 4px solid #9d4edd;
    border: 1px solid rgba(138, 43, 226, 0.2);
    position: relative;
    transition: all 0.3s ease;
    counter-increment: rule-counter;
    color: #e0d0e8;
    transform: translateZ(0);
    will-change: transform;
}

.rules-list li::before {
    content: "⚡";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #9d4edd, #c77dff);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

@media (hover: hover) {
    .rules-list li:hover {
        transform: translateX(8px) translateZ(0);
        background: rgba(138, 43, 226, 0.18);
        border-left-color: #e0aaff;
    }
}

.server-info {
    background: rgba(138, 43, 226, 0.25);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-top: 30px;
    border: 2px solid rgba(138, 43, 226, 0.4);
    box-shadow: 
        0 8px 32px rgba(138, 43, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.server-ip {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 2px solid #9d4edd;
    box-shadow: 
        0 5px 20px rgba(138, 43, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    transform: translateZ(0);
    will-change: transform;
}

@media (hover: hover) {
    .server-ip:hover {
        transform: scale(1.05) translateZ(0);
        box-shadow: 0 8px 30px rgba(138, 43, 226, 0.5);
        border-color: #c77dff;
    }
}

.download-section {
    margin-top: 40px;
    padding: 30px;
    background: rgba(138, 43, 226, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    backdrop-filter: blur(10px);
}

.download-section h3 {
    color: #e0aaff;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 600;
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.download-btn {
    display: flex;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(157, 78, 221, 0.3));
    border: 2px solid rgba(138, 43, 226, 0.4);
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.15);
    transform: translateZ(0);
    will-change: transform;
}

@media (hover: hover) {
    .download-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.6s ease;
    }

    .download-btn:hover::before {
        left: 100%;
    }

    .download-btn:hover {
        transform: translateY(-8px) scale(1.02) translateZ(0);
        border-color: rgba(138, 43, 226, 0.8);
        box-shadow: 0 15px 40px rgba(138, 43, 226, 0.3);
        background: linear-gradient(135deg, rgba(138, 43, 226, 0.35), rgba(157, 78, 221, 0.45));
    }
}

.btn-icon {
    font-size: 3rem;
    margin-right: 20px;
    min-width: 70px;
    text-align: center;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .download-btn:hover .btn-icon {
        transform: scale(1.2) rotate(10deg) translateZ(0);
    }
}

.btn-content {
    flex: 1;
}

.btn-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 8px;
}

.btn-subtitle {
    font-size: 1rem;
    color: #c77dff;
    opacity: 0.9;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    align-items: flex-start; /* od góry */
    justify-content: center;
    padding-top: 15vh; /* 15% wysokości viewportu od góry */
    z-index: 9999;
}

.popup {
    background: #1a0033;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 0 40px rgba(157, 78, 221, 0.6);
    border: 2px solid #9d4edd;
}

.popup h2 {
    margin-bottom: 20px;
    font-size: 2rem;
    color: #e0aaff;
}

.popup p {
    margin-bottom: 30px;
    font-size: 1.2rem;
    color: #fff;
}

.popup button {
    padding: 10px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #9d4edd, #c77dff);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

@media (hover: hover) {
    .popup button:hover {
        transform: scale(1.05) translateZ(0);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 60px 20px 40px;
        margin-bottom: 30px;
    }
    
    .header h1 {
        font-size: 3rem;
    }
    
    .header .subtitle {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }
    
    .container {
        padding: 15px;
    }
    
    .section {
        padding: 25px;
        margin-bottom: 25px;
    }
    
    .section h2 {
        font-size: 2rem;
    }

    .section p {
        font-size: 1rem;
    }

    .download-buttons {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .download-btn {
        padding: 20px;
    }
    
    .btn-icon {
        font-size: 2.5rem;
        min-width: 60px;
        margin-right: 15px;
    }
    
    .btn-title {
        font-size: 1.2rem;
    }

    .btn-subtitle {
        font-size: 0.9rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .step {
        padding: 20px;
    }

    .rules-list li {
        padding: 15px 15px 15px 50px;
    }

    .rules-list li::before {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2.5rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }

    .server-ip {
        font-size: 1.4rem;
        padding: 12px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .header::before,
    .step::before,
    .download-btn::before {
        display: none;
    }
}