/* Basic Reset and Font Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Noto Sans KR', sans-serif; /* Prioritize Montserrat for English text */
    line-height: 1.6;
    color: #e0e0e0; /* Light text color */
    background: linear-gradient(135deg, #1a0033 0%, #000000 100%); /* Mysterious gradient background */
    min-height: 100vh; /* Minimum height for full viewport */
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.main-header {
    text-align: center;
    padding: 40px 20px;
    background-color: rgba(0, 0, 0, 0.5); /* Transparent background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.main-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8em;
    color: #b3e0ff; /* Light pastel color */
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.main-header p {
    font-size: 1.1em;
    color: #cceeff;
}

---

/* Category Navigation Styles */
.category-nav {
    text-align: center;
    padding: 20px 20px;
    background-color: rgba(0, 0, 0, 0.6); /* Dark transparent background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-top: -1px; /* Overlap with header border */
}

.category-nav ul {
    list-style: none; /* Remove list markers */
    display: flex; /* Horizontal alignment */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: center; /* Center align items */
    gap: 15px; /* Spacing between items */
    margin: 0;
    padding: 0;
}

.category-nav li a {
    text-decoration: none; /* Remove underline */
    color: #e0e0e0; /* Text color */
    font-weight: 500;
    font-size: 1.05em;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px; /* Rounded button shape */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    display: block; /* Make the entire area clickable */
}

.category-nav li a:hover {
    background-color: #555; /* Background color on hover */
    color: #fff; /* Text color on hover */
    border-color: #fff;
}

---

/* Video Gallery Layout */
.video-gallery {
    display: grid; /* Grid layout */
    gap: 30px; /* Gap between items */
    padding: 30px;
    max-width: 1200px; /* Max width constraint */
    margin: 30px auto; /* Center alignment */
    flex-grow: 1; /* Allows footer to stick to the bottom */
}

.video-item {
    background-color: rgba(255, 255, 255, 0.05); /* Transparent background */
    border-radius: 12px;
    overflow: hidden; /* Prevent child elements from overflowing */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.video-container {
    position: relative;
    width: 100%;
    /* Maintain 16:9 aspect ratio for video (height / width * 100%) */
    padding-bottom: 56.25%; /* 9 / 16 * 100% */
    height:100%;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px 12px 0 0; /* Rounded top corners only */
}

.video-item h2 {
    font-size: 1.8em;
    color: #b3e0ff;
    padding: 20px 20px 10px;
    text-align: center;
}

.video-item p {
    font-size: 1em;
    color: #cceeff;
    padding: 0 20px 20px;
    text-align: center;
}

---

/* Footer Styles */
.main-footer {
    text-align: center;
    padding: 30px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9em;
}

---

/* Responsive Design (Media Queries) */

/* Tablets and smaller desktops (768px and up) */
@media (min-width: 768px) {
    .video-gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Min 300px, fill available space */
    }

    .main-header h1 {
        font-size: 3.5em;
    }
}

/* Larger desktops (1024px and up) */
@media (min-width: 1024px) {
    .video-gallery {
        grid-template-columns: repeat(3, 1fr); /* 3-column grid */
        gap: 40px;
    }

    .main-header h1 {
        font-size: 4em;
    }
}

/* Mobile (max 767px) */
@media (max-width: 767px) {
    .category-nav ul {
        flex-direction: column; /* Stack category items vertically */
        align-items: center; /* Center align them */
    }
    .category-nav li {
        width: 80%; /* Adjust button width for mobile */
        max-width: 250px;
    }
    .main-header h1 {
        font-size: 2em;
    }
    .main-header p {
        font-size: 0.9em;
    }
    .video-gallery {
        padding: 15px;
    }
    .video-item h2 {
        font-size: 1.5em;
    }
    .video-item p {
        font-size: 0.9em;
    }
}