:root {
    --primary-color: #0056b3;
    --primary-light: #e7f1ff;
    --primary-dark: #003d80;
    --accent-color: #00a8cc;
    --text-color: #333333;
    --text-muted: #6c757d;
    --bg-color: #ffffff;
    --bg-alt: #f8fbff;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

/* Header */
header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

/* Main Ad Section */
.main-ad {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.main-ad h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.main-ad p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Section Common */
section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
}

.view-more {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.gallery-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.gallery-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .gallery-img img {
    transform: scale(1.1);
}

.gallery-info {
    padding: 20px;
}

.gallery-category {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 8px;
}

.gallery-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* Sub Ad Section */
.sub-ad {
    background: var(--primary-light);
    padding: 60px 0;
    text-align: center;
    border-radius: 20px;
    margin: 40px 0;
}

.sub-ad h3 {
    color: var(--primary-dark);
    font-size: 24px;
    margin-bottom: 15px;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 80px 0 40px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-info .logo {
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-info p {
    color: #999;
    font-size: 14px;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 25px;
    font-size: 18px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #999;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .header-inner {
        height: 70px;
    }
    .nav-links, .header-utils, .mega-menu {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block;
    }
    .main-ad h1 {
        font-size: 36px;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .main-ad {
        padding: 60px 0;
    }
    .main-ad h1 {
        font-size: 28px;
    }
    .main-ad p {
        font-size: 16px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Auth Pages */
.auth-wrapper {
    min-height: calc(100vh - 80px - 400px); /* Adjust based on header/footer */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background-color: var(--bg-alt);
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 28px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.auth-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.social-login {
    margin-top: 30px;
    position: relative;
    text-align: center;
}

.social-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.social-login span {
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.social-btns {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    gap: 10px;
    transition: var(--transition);
}

.btn-kakao {
    background: #FEE500;
    color: #191919;
}

.btn-kakao:hover {
    background: #EED200;
}

.btn-naver {
    background: #03C75A;
    color: white;
}

.btn-naver:hover {
    background: #02B351;
}

.social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile Menu Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    z-index: 2000;
    transition: var(--transition);
    padding: 40px 20px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

.mobile-overlay.active {
    right: 0;
}

.mobile-overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
}

.mobile-overlay-bg.active {
    display: block;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.mobile-nav-links a {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.mobile-nav-links a:hover {
    color: var(--primary-color);
}

.mobile-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

/* Dynamic Menu Dropdown */
.nav-links {
    position: relative;
}

.nav-item {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: -20px;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 10px 0;
    display: none;
    z-index: 1001;
    border: 1px solid var(--border-color);
}

.nav-item:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown a:hover {
    background: var(--bg-alt);
    color: var(--primary-color);
}

/* Mega Menu Styles */
.nav-links {
    display: flex;
    gap: 40px;
    height: 100%;
    align-items: center;
}

.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-top: 1px solid var(--border-color);
    display: none;
    z-index: 1000;
    padding: 40px 0;
}

header:hover .mega-menu {
    display: block;
}

.mega-menu-inner {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.mega-menu-column h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--bg-alt);
    padding-bottom: 10px;
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-column ul li {
    margin-bottom: 10px;
}

.mega-menu-column ul li a {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: var(--transition);
}

.mega-menu-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Hide individual dropdowns if any */
.nav-item .dropdown {
    display: none !important;
}
