.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ff1b1b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.content-section {
    position: relative;
    z-index: 1;
    padding: 100px 20px;
    border-top: 1px solid rgba(255, 27, 27, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #ff1b1b;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.8);
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 2px solid transparent;
}

.cta-button:hover {
    transform: translateY(-3px);
}

.cta-button {
    background-color: #ff1b1b;
    color: #ffffff;
}

.cta-button.secondary {
    background-color: transparent;
    color: #ff1b1b;
    border-color: #ff1b1b;
}

.cta-button.secondary:hover {
    background-color: #ff1b1b;
    color: #ffffff;
}

.cta-button.discord {
    background-color: #5865F2;
    border-color: #5865F2;
    color: #ffffff;
}

#uslugi {
    background:
        linear-gradient(to right, rgba(255, 27, 27, 0.07) 1px, transparent 1px) 0 0 / 50px 50px,
        linear-gradient(to bottom, rgba(255, 27, 27, 0.07) 1px, transparent 1px) 0 0 / 50px 50px,
        rgba(10, 10, 10, 0.75);
}

#realizacje {
    background:
        linear-gradient(135deg, rgba(255, 27, 27, 0.1) 0%, rgba(10, 10, 10, 0) 60%),
        rgba(10, 10, 10, 0.75);
}

#kontakt {
    text-align: center;
    background: 
        repeating-linear-gradient(0deg, rgba(255,27,27, 0.1) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, rgba(255,27,27, 0.1) 1px, transparent 1px, transparent 40px),
        radial-gradient(ellipse at center, rgba(255, 27, 27, 0.2) 0%, transparent 70%),
        rgba(10, 10, 10, 0.75);
}

.service-card, .event-item {
    background-color: rgba(20, 20, 20, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(255, 27, 27, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 27, 27, 0.2);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    padding: 40px 30px;
    text-align: center;
}

.service-card i {
    font-size: 3rem;
    color: #ff1b1b;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.event-item {
    overflow: hidden;
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.event-item h3 {
    font-size: 1.5rem;
    color: #ff1b1b;
    margin: 20px 20px 10px 20px;
}

.event-item p {
    padding: 0 20px 20px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.contact-section p {
    max-width: 600px;
    margin: 0 auto 30px auto;
}

#footer {
    position: relative;
    z-index: 1;
    padding: 60px 20px 40px 20px;
    text-align: center;
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 15px,
            rgba(255, 27, 27, 0.05) 15px,
            rgba(255, 27, 27, 0.05) 16px
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 15px,
            rgba(255, 27, 27, 0.05) 15px,
            rgba(255, 27, 27, 0.05) 16px
        ),
        #080808;
    box-shadow: 0 -5px 20px rgba(255, 27, 27, 0.15);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-nav a {
    color: #aaa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ff1b1b;
}

#footer p {
    color: #888;
    font-size: 0.9rem;
}

.back-to-top {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    
    width: 50px;
    height: 50px;
    background-color: #ff1b1b;
    color: #fff;
    border-radius: 50%;
    
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    text-decoration: none;
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #fff;
    color: #ff1b1b;
    transform: translateX(-50%) translateY(-3px);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}
