/* Podstawowe style */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f9;
    color: #333;
    width: 100%;
    overflow-x: hidden; /* Zatrzymanie przewijania w poziomie */
    box-sizing: border-box; /* Zapobieganie wyjściu elementów poza obszar */
}

/* Sekcja główna z wideo */
main {
    position: relative;
    width: 100%;
    min-height: 100vh; /* Wysokość co najmniej ekranu */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Zmiana z center na flex-start */
    padding-top: 2rem; /* Dodanie przestrzeni nad tytułem */
    overflow: hidden;
    z-index: 1; /* Treść nad wideo */
}

/* Tło wideo w sekcji głównej */
main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('1.mp4') no-repeat center center / cover;
    z-index: -1; /* Wideo za treścią */
    filter: brightness(0.6); /* Przyciemnienie dla lepszej widoczności tekstu */
}

/* Overlay dla animacji ładowania */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0288d1, #ff9800);
    z-index: 1000;
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 1.5s ease-in-out;
}

/* Ukrycie overlay, po zakończeniu ładowania */
.hidden-overlay {
    transform: scaleX(0);
}

/* Nagłówek */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background:rgb(190, 246, 248);
    color: white;
    padding: 1rem;
    position: relative;
    z-index: 2; /* Nagłówek nad wideo */
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* Narzędzia */
.tools-menu {
    position: relative;
}

.tools-button {
    background: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}

.tools-list {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: black;
    color: white;
    padding: 10px;
    border-radius: 5px;
    display: none; /* Ukryte domyślnie */
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.tools-list.visible {
    display: flex; /* Pokazuje menu po kliknięciu */
}

.tools-list button {
    background: #f4f4f9;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
}

.tools-list button:hover {
    background: #02d11a;
    color: white;
}

/* Opis sekcji */
.description-section {
    padding: 2rem;
    text-align: center;
    z-index: 2; /* Zapewnienie, że tekst będzie nad wideo */
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #b4bed8;
    padding-bottom: 10%;
}

/* Responsywność */

/* Mobile first - dla urządzeń o szerokości ekranu do 600px */
@media (max-width: 600px) {
    /* Nagłówek */
    header {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    header h1 {
        font-size: 1.25rem;
    }

    /* Tło wideo */
    main::before {
        background-position: center;
        filter: brightness(0.5);
    }

    /* Menu narzędzi */
    .tools-menu {
        margin-top: 1rem;
    }

    .tools-button {
        font-size: 1.25rem;
    }

    /* Opis sekcji */
    .description-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Tablety - dla urządzeń o szerokości ekranu od 601px do 1024px */
@media (min-width: 601px) and (max-width: 1024px) {
    header {
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
    }

    .tools-button {
        font-size: 1.75rem;
    }

    .description-section {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* Desktopy - dla urządzeń o szerokości ekranu powyżej 1024px */
@media (min-width: 1025px) {
    header {
        padding: 1.5rem 3rem;
        justify-content: space-between;
    }

    header h1 {
        font-size: 2rem;
    }

    /* Tło wideo */
    main::before {
        background-position: center;
        filter: brightness(0.6);
    }

    .tools-button {
        font-size: 2rem;
    }

    /* Opis sekcji */
    .description-section {
        padding: 2rem 5rem;
    }

    .section-title {
        font-size: 2.25rem;
    }
}
