/* ===== CSS Variables ===== */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #f472b6;
    --accent: #fbbf24;
    --gold: #d4af37;
    --dark: #0c0a1d;
    --dark-lighter: #1a1730;
    --dark-card: #231f3d;
    --gray: #9ca3af;
    --light: #f3f4f6;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f59e0b 100%);
    --gradient-mystic: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    --shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    --radius: 16px;
    --radius-lg: 24px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--dark);
    color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(12, 10, 29, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.4rem;
}

.logo-icon {
    font-size: 1.8rem;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--gray);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    position: relative;
    transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.stars {
    position: absolute;
    inset: 0;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.mystic-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.title-korean {
    display: block;
    font-family: 'Noto Serif KR', serif;
    font-size: 2rem;
    color: var(--gold);
    letter-spacing: 8px;
    margin-bottom: 16px;
}

.gradient-text {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--gray);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 60px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.85rem;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--gray);
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {

    0%,
    100% {
        opacity: 1;
        top: 8px;
    }

    50% {
        opacity: 0;
        top: 20px;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

/* ===== Sections ===== */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--gray);
    font-size: 1.1rem;
}

/* ===== About ===== */
.about {
    background: var(--dark-lighter);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.about-card {
    background: var(--dark-card);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    transition: all 0.4s ease;
}

.about-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--gold);
}

.about-card p {
    color: var(--gray);
    line-height: 1.8;
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.5);
}

.feature-card:hover::before {
    opacity: 0.08;
}

.feature-card>* {
    position: relative;
    z-index: 1;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== Fortune Demo ===== */
.fortune {
    background: var(--gradient-mystic);
}

.section-header.light .section-title {
    color: var(--white);
}

.fortune-demo {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.bagua-symbol {
    font-size: 2rem;
    letter-spacing: 12px;
    margin-bottom: 40px;
    opacity: 0.6;
}

.fortune-input {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 1rem;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group select option {
    background: var(--dark);
    color: var(--white);
}

.btn-fortune {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.fortune-result {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius);
    padding: 30px;
    min-height: 100px;
    display: none;
}

.fortune-result.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== Download ===== */
.download {
    background: var(--dark-lighter);
}

.download-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.download-text h2 {
    font-size: 2.5rem;
    margin: 16px 0;
}

.download-text p {
    color: var(--gray);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.download-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.store-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.store-icon {
    font-size: 2rem;
}

.store-btn small {
    font-size: 0.75rem;
    color: var(--gray);
}

.store-btn strong {
    font-size: 1.1rem;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    margin: 0 auto;
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--dark);
    border-radius: 32px;
    overflow: hidden;
}

.app-preview {
    padding: 40px 20px;
    text-align: center;
}

.app-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.fortune-card-mini {
    background: var(--gradient);
    padding: 30px;
    border-radius: var(--radius);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.fortune-stars {
    font-size: 1.5rem;
    letter-spacing: 4px;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--gray);
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--gray);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--dark-lighter);
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
        gap: 24px;
        transform: translateY(-150%);
        transition: transform 0.3s;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-toggle {
        display: block;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .download-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .download-buttons {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}