/* Basic Reset & Body Styling */
:root {
    --primary-bg-color: #1a1a1a;
    --secondary-bg-color: #2a2a2a;
    --text-color: #e0e0e0;
    --accent-color: #8be9fd; /* A lighter, more vibrant accent for dark theme */
    --link-color: #50fa7b; /* Greenish for links */
    --link-hover-color: #ff79c6; /* Pinkish for link hover */
    --border-color: #444;
    --card-bg-color: #282a36; /* Darker background for cards/categories */
    --font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--primary-bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styling */
.header {
    background-color: var(--secondary-bg-color);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    /* text-align: center; Removed for flexbox alignment */
}

.header .container {
    display: flex; /* Enable flexbox for the container */
    justify-content: space-between; /* Space out left group and right nav */
    align-items: center; /* Vertically align items */
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    gap: 20px; /* Gap between left group and right nav */
}

.header-left-group {
    display: flex; /* Flex container for h1 and board-nav */
    align-items: center; /* Vertically align h1 and board-nav */
    gap: 20px; /* Space between h1 and board-nav */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.header h1 {
    margin: 0; /* Reset margin for flexbox */
    color: var(--accent-color);
    font-size: 2.5em;
    text-shadow: 0 0 5px rgba(139, 233, 253, 0.5); /* Subtle glow */
    flex-shrink: 0; /* Prevent h1 from shrinking too much */
}

/* Board Navigation Styling (Top-Left) */
.board-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Horizontal layout */
    gap: 10px; /* Space between board menu items */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.board-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1em; /* Slightly smaller for board nav */
    padding: 8px 12px; /* Padding for box effect */
    border-radius: 6px; /* Slightly rounded corners for the box */
    background-color: var(--primary-bg-color); /* Background for the box */
    border: 1px solid var(--border-color); /* Border for the box */
    display: inline-block;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.board-nav a:hover {
    background-color: var(--accent-color);
    color: var(--primary-bg-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Main Navigation Styling (Top-Right) */
.main-nav {
    margin-left: auto; /* Push nav to the right */
    flex-shrink: 0; /* Prevent nav from shrinking too much */
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex; /* Horizontal layout */
    gap: 25px; /* Space between menu items */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: flex-end; /* Align items to the right when wrapped */
}

.main-nav a {
    color: var(--text-color); /* Changed to text-color for better contrast on background */
    text-decoration: none;
    font-size: 1.1em;
    padding: 10px 15px; /* Increased padding for box effect */
    border-radius: 8px; /* Slightly rounded corners for the box */
    background-color: var(--primary-bg-color); /* Background for the box */
    border: 1px solid var(--border-color); /* Border for the box */
    display: inline-block; /* Ensure padding and border are applied correctly */
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.main-nav a:hover {
    background-color: var(--accent-color); /* Accent color on hover */
    color: var(--primary-bg-color); /* Dark text on accent background */
    border-color: var(--accent-color);
    transform: translateY(-2px);
}


/* Main Content Styling */
.main-content {
    padding: 40px 0;
    min-height: 60vh; /* Ensure some height for content */
}

.main-content .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.category-section {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.category-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.category-section h2 {
    color: var(--accent-color);
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-list li {
    margin-bottom: 10px;
}

.link-list a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 1.1em;
    display: block; /* Make the whole area clickable */
    padding: 5px 0;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.link-list a:hover {
    color: var(--link-hover-color);
    transform: translateX(5px); /* Slight movement on hover */
    text-decoration: underline;
}


/* Footer Styling */
.footer {
    background-color: var(--secondary-bg-color);
    color: var(--text-color);
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
}

/* Basic Responsiveness */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    .main-content .container {
        grid-template-columns: 1fr; /* Stack categories on smaller screens */
    }
    .ad-banners .container {
        flex-direction: column; /* Stack ad banners vertically on smaller screens */
    }
    .ad-banner-item {
        width: 100%; /* Full width for stacked banners */
        margin-bottom: 15px; /* Space between stacked banners */
    }
    .ad-banner-item:last-child {
        margin-bottom: 0; /* No margin after the last stacked banner */
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }
    .container {
        padding: 15px;
    }
    .category-section {
        padding: 20px;
    }
    .category-section h2 {
        font-size: 1.5em;
    }
    .link-list a {
        font-size: 1em;
    }
}
/* Ad Banners Styling */
.ad-banners {
    background-color: var(--card-bg-color);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.ad-banners .container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap; /* Allow banners to wrap on smaller screens before stacking */
}

.ad-banner-item {
    flex: 1; /* Distribute space evenly */
    min-width: 250px; /* Minimum width for each banner before wrapping */
    background-color: #444;
    color: #eee;
    padding: 30px 10px;
    border-radius: 8px;
    border: 1px dashed var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    height: 100px; /* Fixed height for banners */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ad-banner-item:hover {
    background-color: #555;
    border-color: var(--link-hover-color);
    cursor: pointer;
}

/* Feature Input Section (배고광코칸) Styling */
.feature-input-section {
    padding: 40px 0; /* Add some vertical spacing */
    background-color: var(--secondary-bg-color); /* A slightly different background */
    border-bottom: 1px solid var(--border-color);
}

.feature-input-section .input-container {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center;
    gap: 15px; /* Space between input and button */
    flex-wrap: wrap; /* Allow elements to wrap on small screens */
    max-width: 800px; /* Limit width for better appearance */
}

.feature-input {
    flex-grow: 1; /* Allow input to take available space */
    max-width: 500px; /* Max width for input */
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--primary-bg-color);
    color: var(--text-color);
    font-size: 1.1em;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-input::placeholder {
    color: #888;
}

.feature-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(139, 233, 253, 0.5);
}

.feature-button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: var(--primary-bg-color);
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.feature-button:hover {
    background-color: var(--link-hover-color);
    transform: translateY(-2px);
}

/* Responsive adjustments for feature input section */
@media (max-width: 600px) {
    .feature-input-section .input-container {
        flex-direction: column; /* Stack input and button vertically */
        gap: 10px;
    }
    .feature-input,
    .feature-button {
        width: 100%; /* Full width when stacked */
        max-width: none;
    }
}