* {
    font-family: "Roboto", sans-serif;
    color: #f0f0f0;
}

h1, h2 {
    font-family: 'Alegreya', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-weight: 400;
    font-style: normal;
    overflow: hidden;
    background-color: rgba(33, 33, 33);
}

body {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

body#home { background-image: url('img/home_bg.jpg'); }
body#music { background-image: url('img/music_bg.jpg'); }
body#graphics { background-image: url('img/graphics_bg.jpg'); }
body#mods { background-image: url('img/mods_bg.jpg'); }
body#games { background-image: url('img/games_bg.jpg'); }
body#contact { background-image: url('img/contact_bg.jpg'); }

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    font-family: 'Alegreya', serif;
    color: white;
    text-decoration: none;
    padding: 15px 10px;
    display: block;
    font-size: 1.1em;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

nav ul li a.active {
    background-color: rgba(250, 100, 100, 0.2);
    border-bottom: 2px solid red;
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.content-container {
    width: 800px;
    height: 600px;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    color: #f0f0f0;
    padding: 20px;
    box-sizing: border-box;
}

.page {
    min-height: 100%;
}

footer {
    background-color: rgba(0, 0, 0, 0.7);
    color: #E0E0E0;
    padding: 15px 0;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.copyright {
    font-size: 0.9em;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
}

/* Scrollbar styling for webkit browsers */
.content-container::-webkit-scrollbar {
    width: 10px;
}

.content-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.content-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

/* Styles for music page */
.album {
    margin-bottom: 40px;
}

.album-title {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 1.3em;
    font-family: 'Alegreya', serif;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.album-subtitle {
    font-size: 1.0em;
    font-family: 'Alegreya', serif;
    font-weight: 300;
    color: #c0c0c0;
}

.track-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.track {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
}

.track-cover {
    width: 100px;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
}

.track-info {
    flex-grow: 1;
    padding: 10px 20px;
}

.track-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-style: italic;
    color: #E0E0E0;
}

/* Updated styles for custom audio player */
.custom-audio-player {
    background-color: #222;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-audio-player button {
    background-color: #333;
    border: none;
    color: #fff;
    padding: 10px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 25px;
    transition: background-color 0.3s, box-shadow 0.3s;
    min-width: 100px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.custom-audio-player button:hover {
    background-color: #444;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.custom-audio-player .seek-bar {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 5px;
    background: #555;
    outline: none;
    border-radius: 5px;
}

.custom-audio-player .seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
}

.custom-audio-player .seek-bar::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
}

.custom-audio-player span {
    font-size: 14px;
    color: #ddd;
}

/* Styles for contact form */
hr {
    border: none;
    height: 1px;
    background-color: #444;
    box-shadow: 0 1px 0 #000;
    margin: 20px 0;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-group {
    margin-bottom: 15px;
    width: 95%;
}

.form-row .form-group {
    width: 48%;
}

.separator {
    color: #444;
    font-size: 20px;
    margin: 0 10px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #f0f0f0;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 95%;
    padding: 5px;
    border: 1px solid #333;
    background-color: rgba(0, 0, 0, 0.7);
    color: #f0f0f0;
    border-radius: 4px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

textarea {
    height: 100px;
    resize: vertical;
}

button[type="submit"] {
    background-color: #444;
    color: #f0f0f0;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #447744;
}

.success-message {
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid #0f0;
    color: #0f0;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.error-list {
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid #f00;
    color: #f00;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    list-style-type: none;
}

.error-list li {
    margin-bottom: 5px;
}

/* Styles for graphics page */
.graphics-category {
    margin-bottom: 40px;
}

.category-title {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 1.3em;
    font-family: 'Alegreya', serif;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.thumbnails-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px; /* Zwiększony odstęp między miniaturkami */
    max-width: 656px; /* (120px * 5) + (8px * 4) */
    margin: 0 auto;
}

.thumbnail-wrapper {
    flex: 0 0 calc(20% - 6.4px); /* 20% szerokości z uwzględnieniem odstępu */
    max-width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 4px; /* Dodatkowy padding wewnątrz miniaturki */
    box-sizing: border-box; /* Aby padding nie zwiększał rozmiaru */
    background-color: rgba(255, 255, 255, 0.05); /* Opcjonalne tło dla widoczności paddingu */
}

.thumbnail-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    border-radius: 3px; /* Opcjonalnie, dla zaokrąglonych rogów obrazka */
}

/* Styles for image popup */
.image-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.popup-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 80%;
    max-width: 700px;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-popup {
    color: #f1f1f1;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

#popupImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Responsive design for smaller screens */
@media (max-width: 600px) {
    .track {
        flex-direction: column;
        align-items: stretch;
    }

    .track-cover {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .social-links {
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        width: 100%;
    }

    .separator {
        display: none;
    }

    .thumbnails-container {
        max-width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .thumbnail-wrapper {
        flex: 0 0 calc(33.333% - 5.33px); /* 3 thumbnails per row on smaller screens */
        max-width: 100px;
        height: 100px;
    }
}

@media (max-width: 400px) {
    .thumbnail-wrapper {
        flex: 0 0 calc(50% - 4px); /* 2 thumbnails per row on very small screens */
    }
}

/* Styles for games page */
.games-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.game-item {
    flex: 0 0 300px;
    max-width: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.game-thumbnail {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 5px;
}

/* Responsive design for games */
@media (max-width: 600px) {
    .game-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}