/* 
 * 🎨 Aurora Design System v2.0
 * 요굴봇 통합 디자인 시스템
 */

:root {
    /* ── Colors (Light) ── */
    --bg-main: #ffffff;
    --bg-sub: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #0f172a;
    --text-sub: #475569;
    --text-muted: #94a3b8;
    --brand-primary: #5865f2;
    --brand-secondary: #eb459e;
    --brand-gradient: linear-gradient(135deg, #5865f2 0%, #7c3aed 100%);
    --border-color: rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    /* ... (생략) ... */
}

/* ── 🌌 Dynamic Background (Light optimized) ── */
.blob-1 { top: -100px; right: -100px; background: radial-gradient(circle, rgba(88, 101, 242, 0.12) 0%, transparent 70%); }
.blob-2 { bottom: 100px; left: -200px; background: radial-gradient(circle, rgba(235, 69, 158, 0.08) 0%, transparent 70%); animation-delay: -5s; }
.blob-3 { top: 40%; left: 30%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%); animation-delay: -2s; }

[data-theme="dark"] {
    --bg-main: #090b16;
    --bg-sub: #13172a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-main: #f1f5f9;
    --text-sub: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* ── Base ── */
html {
    overflow-y: scroll;
    background-color: var(--bg-main);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
    line-height: 1.6;
    letter-spacing: -0.02em;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* ── Layout ── */
.container-narrow {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.yg-section {
    padding: var(--section-gap) 0;
}

/* ── Badge / Label ── */
.hero-badge {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    background: rgba(88, 101, 242, 0.1);
    color: var(--brand-primary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
}

.display-title {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sub-title {
    font-size: 1.1rem;
    color: var(--text-sub);
    max-width: 650px;
    margin-bottom: 3rem;
}

/* ── Glassmorphism ── */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* ── Components ── */
.btn-yg {
    padding: 0.75rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-yg-primary {
    background: var(--brand-primary);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(88, 101, 242, 0.39);
}

.btn-yg-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.45);
}

.btn-yg-outline {
    background: transparent;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
}

.btn-yg-outline:hover {
    background: var(--bg-sub);
    border-color: var(--text-main);
}

/* ── Cards ── */
.feature-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-sub);
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* ── Animations ── */
.animate-fade-up {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    transition-property: opacity, transform;
    transition-duration: 0.48s;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.animate-fade-up.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.delay-100 { --reveal-delay: 100ms; }
.delay-200 { --reveal-delay: 200ms; }
.delay-300 { --reveal-delay: 300ms; }

/* ── Hero Background ── */
.hero-bg-visual {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}

/* ── 🍱 Bento Grid Layout ── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 150px;
    gap: 1.2rem;
}

.bento-item {
    grid-column: span 1;
    grid-row: span 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 1.8rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.bento-item:hover {
    border-color: var(--brand-primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.bento-item.wide { grid-column: span 2; }
.bento-item.tall { grid-row: span 2; }

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        gap: 1rem;
    }

    .bento-item.wide { grid-column: span 2; }
    .bento-item.tall { grid-row: span 1; }
    .bento-item { padding: 1.5rem; border-radius: 1.5rem; }
}

@media (max-width: 576px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .bento-item.wide { grid-column: span 1; }
    .bento-item { padding: 1.25rem; border-radius: 1.25rem; }
}

/* ── 💬 Discord UI Mockup ── */
.discord-mockup {
    background: #313338;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    text-align: left;
    margin-top: 3rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.discord-header {
    background: #2b2d31;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.2);
}

.discord-body {
    padding: 20px;
    font-size: 0.95rem;
}

.msg-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-primary);
    flex-shrink: 0;
}

.msg-content {
    color: #dbdee1;
}

.msg-author {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.msg-embed {
    background: #2b2d31;
    border-left: 4px solid var(--brand-primary);
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 8px;
    max-width: 400px;
}

/* ── 💎 Premium Glows ── */
.glow-text {
    text-shadow: 0 0 15px rgba(88, 101, 242, 0.5);
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.08) 1px, transparent 0);
    background-size: 3px 3px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 9999;
}
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(88, 101, 242, 0); }
    100% { box-shadow: 0 0 0 0 rgba(88, 101, 242, 0); }
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 30% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@keyframes shine {
    from { left: -100%; }
    to { left: 100%; }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.pulse-primary {
    animation: pulse-glow 2s infinite;
}

/* ── 🌌 Dynamic Background ── */
.hero-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.2) 0%, transparent 70%);
    filter: blur(80px);
    animation: morph 15s linear infinite alternate;
    z-index: -1;
    will-change: transform;
}

.blob-1 { top: -100px; right: -100px; background: radial-gradient(circle, rgba(88, 101, 242, 0.25) 0%, transparent 70%); }
.blob-2 { bottom: 100px; left: -200px; background: radial-gradient(circle, rgba(235, 69, 158, 0.15) 0%, transparent 70%); animation-delay: -5s; }
.blob-3 { top: 40%; left: 30%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%); animation-delay: -2s; }

/* ── 💳 Advanced Cards ── */
.feature-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: 0.5s;
}

.feature-card:hover::after {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--brand-primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: var(--brand-primary);
    color: white;
    transform: rotateY(360deg);
}

/* ── 텍스트 그라데이션 애니메이션 ── */
.text-gradient {
    background: linear-gradient(135deg, #5865f2, #7c3aed, #eb459e, #5865f2);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Navbar Fix ── */
.modern-navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
}

.modern-navbar .nav-link {
    color: var(--text-sub) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.modern-navbar .nav-link:hover, 
.modern-navbar .nav-link.active {
    color: var(--brand-primary) !important;
}

.nav-brand-text {
    font-weight: 850;
    letter-spacing: -0.05em;
    font-size: 1.25rem;
}

/* ── Components (Backward Compatibility) ── */
.card-custom {
    padding: 2rem;
    border-radius: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-5px);
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-xl);
}

.btn-custom {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-custom.btn-primary { background: var(--brand-primary); color: #fff !important; }
.btn-custom.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-custom.btn-outline { border: 1px solid var(--border-color); color: var(--text-main) !important; background: transparent; }
.btn-custom.btn-outline:hover { background: var(--bg-sub); border-color: var(--text-main); }

/* ── Search Bar ── */
.search-group {
    position: relative;
    max-width: 500px;
    margin: 0 auto 3rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-sub);
    color: var(--text-main);
    transition: all 0.2s;
}

.search-input:focus { 
    outline: none; 
    border-color: var(--brand-primary); 
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.1);
    background: var(--bg-main);
}

/* ── Animations (Backward Compatibility) ── */
.animate-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-up.visible, .animate-up {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    padding: 100px 0 60px;
    text-align: center;
}

/* ── 📱 Global Mobile Responsive ── */
@media (max-width: 768px) {
    .display-title {
        font-size: clamp(1.8rem, 6vw, 2.8rem);
    }

    .sub-title {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .section-header {
        padding: 60px 0 40px;
    }

    .yg-section {
        padding: 60px 0;
    }

    .btn-yg {
        padding: 0.65rem 1.4rem;
        font-size: 0.95rem;
    }

    .legal-header {
        padding: 120px 0 50px !important;
    }

    .legal-card {
        padding: 2rem !important;
        border-radius: 1.5rem !important;
    }

    .simple-footer {
        padding: 60px 0 !important;
    }
}

@media (max-width: 576px) {
    .display-title {
        font-size: clamp(1.6rem, 5.5vw, 2.2rem);
    }

    .sub-title {
        font-size: 0.95rem;
        max-width: 100% !important;
    }

    .hero-badge {
        font-size: 0.72rem;
        padding: 0.3rem 0.85rem;
    }

    .legal-header {
        padding: 100px 0 40px !important;
    }

    .legal-card {
        padding: 1.5rem !important;
        border-radius: 1.25rem !important;
    }

    .container-narrow {
        padding: 0 1rem;
    }

    .yg-section {
        padding: 40px 0;
    }

    .section-header {
        padding: 40px 0 30px;
    }

    .btn-yg {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .simple-footer {
        padding: 50px 0 !important;
    }

    /* 카드 그리드 갭 축소 */
    .bento-grid {
        gap: 0.75rem;
    }

    /* CTA 버튼 행 */
    .d-flex.gap-4 {
        gap: 0.75rem !important;
    }
}


/* ── Navbar Scroll Reaction ── */
.modern-navbar {
    transition: background-color 0.25s ease, backdrop-filter 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.modern-navbar.navbar-scrolled {
    background: color-mix(in srgb, var(--glass-bg) 92%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: color-mix(in srgb, var(--brand-primary) 18%, var(--glass-border));
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

/* ── Page Transition (Crossfade) ── */
body.page-leaving {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

/* ── Stagger Utility ── */
.stagger-item {
    animation-fill-mode: both;
}


/* ── Scroll Feedback Effects ── */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: calc(var(--scroll-progress, 0) * 100%);
    background: linear-gradient(90deg, #5865f2, #7c3aed, #eb459e);
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.35);
    z-index: 10000;
    pointer-events: none;
    transition: width 0.08s linear;
}

.hero-bg-visual .hero-blob {
    will-change: transform;
    transform: translateY(var(--blob-shift, 0px));
}

@media (prefers-reduced-motion: reduce) {
    body::after { transition: none; }
    .hero-bg-visual .hero-blob { transform: none !important; }
    .animate-fade-up {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}
