/* ===== 네비스 스튜디오 - Dark Creative Theme ===== */
:root {
    --bg: #0a0a0f;
    --bg-card: #14141f;
    --bg-input: #1a1a2e;
    --border: #2a2a3e;
    --text: #e8e8f0;
    --text-dim: #8888aa;
    --accent: #7c5cff;
    --accent-glow: rgba(124,92,255,0.3);
    --accent2: #ff6b9d;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* ===== NAV ===== */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,15,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 18px; color: var(--text);
}
.logo-icon {
    color: var(--accent); font-size: 22px;
}
.nav-menu {
    display: flex; align-items: center; gap: 24px;
}
.nav-link {
    color: var(--text-dim); font-size: 14px; font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }
.nav-btn {
    background: var(--accent); color: #fff;
    padding: 8px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    transition: all 0.2s;
}
.nav-btn:hover { background: #6a4de6; color: #fff; }
.nav-user {
    display: flex; align-items: center; gap: 12px;
}
.nav-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--accent);
}
.nav-credits {
    background: var(--bg-input); padding: 4px 12px;
    border-radius: 20px; font-size: 13px; font-weight: 600;
    color: var(--accent);
}
.nav-name { font-size: 14px; color: var(--text-dim); }
.nav-logout { font-size: 12px; color: var(--danger) !important; }

/* ===== MAIN ===== */
.main {
    max-width: 1200px; margin: 0 auto;
    padding: 40px 24px;
    min-height: calc(100vh - 130px);
}

/* ===== HERO ===== */
.hero {
    text-align: center; padding: 80px 0 60px;
}
.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    font-weight: 700; font-size: 14px; letter-spacing: 2px;
    text-transform: uppercase; margin-bottom: 16px;
}
.hero h1 {
    font-size: 48px; font-weight: 900; line-height: 1.2;
    margin-bottom: 20px;
}
.hero h1 .gradient {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 18px; color: var(--text-dim);
    max-width: 500px; margin: 0 auto 40px;
}
.hero-actions {
    display: flex; gap: 16px; justify-content: center;
}

/* ===== CARDS ===== */
.cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px; margin-top: 40px;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px; transition: all 0.3s;
}
.card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}
.card-icon { font-size: 40px; margin-bottom: 16px; }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 14px; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent); color: #fff;
}
.btn-primary:hover { background: #6a4de6; color: #fff; }
.btn-outline {
    background: transparent; color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block; font-size: 14px; font-weight: 600;
    margin-bottom: 8px; color: var(--text);
}
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 12px 16px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 14px; font-family: inherit;
    transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea { min-height: 120px; resize: vertical; }

/* ===== GENERATE PAGE ===== */
.gen-layout {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 32px; align-items: start;
}
.gen-form { position: sticky; top: 88px; }
.gen-result {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 400px; display: flex;
    align-items: center; justify-content: center;
    overflow: hidden;
}
.gen-result img, .gen-result video {
    max-width: 100%; max-height: 600px;
    border-radius: var(--radius);
}
.gen-placeholder {
    color: var(--text-dim); text-align: center; padding: 40px;
}
.gen-placeholder .icon { font-size: 60px; margin-bottom: 16px; }

/* ===== FILE UPLOAD ===== */
.file-drop {
    border: 2px dashed var(--border);
    border-radius: var(--radius); padding: 32px;
    text-align: center; cursor: pointer;
    transition: all 0.2s;
}
.file-drop:hover, .file-drop.dragover {
    border-color: var(--accent);
    background: rgba(124,92,255,0.05);
}
.file-drop input[type="file"] { display: none; }
.file-preview {
    max-width: 200px; max-height: 200px;
    border-radius: var(--radius-sm); margin-top: 12px;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.gallery-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: all 0.3s;
}
.gallery-item:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
.gallery-item img, .gallery-item video {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
}
.gallery-meta {
    padding: 12px; font-size: 12px; color: var(--text-dim);
}

/* ===== LOADING ===== */
.loading {
    display: none; align-items: center; gap: 12px;
    color: var(--accent);
}
.loading.active { display: flex; }
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ALERT ===== */
.alert {
    padding: 14px 20px; border-radius: var(--radius-sm);
    margin-bottom: 20px; font-size: 14px;
}
.alert-error { background: rgba(248,113,113,0.15); color: var(--danger); border: 1px solid rgba(248,113,113,0.3); }
.alert-success { background: rgba(74,222,128,0.15); color: var(--success); border: 1px solid rgba(74,222,128,0.3); }
.alert-info { background: rgba(124,92,255,0.15); color: var(--accent); border: 1px solid rgba(124,92,255,0.3); }

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    text-align: center; color: var(--text-dim);
    font-size: 13px;
}

/* ===== PRICING ===== */
.pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px; margin-top: 40px;
}
.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px; text-align: center;
}
.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}
.pricing-price {
    font-size: 36px; font-weight: 900; margin: 16px 0;
}
.pricing-price .unit { font-size: 14px; font-weight: 400; color: var(--text-dim); }
.pricing-features { list-style: none; text-align: left; margin: 20px 0; }
.pricing-features li { padding: 8px 0; font-size: 14px; color: var(--text-dim); }
.pricing-features li::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .gen-layout { grid-template-columns: 1fr; }
    .nav-menu { gap: 12px; }
    .nav-name { display: none; }
    .cards { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
}
