/* ============================================
   NSFW Site - Standalone Styles
   Independent brand - separate brand
   ============================================ */

:root {
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --primary-light: #ef4444;
    --accent: #be123c;
    --secondary: #fbbf24;
    --background: #0a0a0f;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-light: rgba(255, 255, 255, 0.08);
    --text: #fff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --border: rgba(255, 255, 255, 0.06);
    --tier-0: #64748b;
    --tier-1: #22c55e;
    --tier-2: #3b82f6;
    --tier-3: #dc2626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Age Gate
   ============================================ */

.age-gate {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    text-align: center;
    padding: 24px;
}

.age-gate.hidden {
    display: none;
}

.age-gate h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.age-gate p {
    color: var(--text-muted);
    max-width: 400px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.age-gate-buttons {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.age-gate-buttons .btn-confirm {
    padding: 14px 40px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.age-gate-buttons .btn-confirm:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.age-gate-buttons .btn-deny {
    padding: 14px 40px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.age-gate-buttons .btn-deny:hover {
    border-color: var(--text-muted);
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-link.active {
    color: var(--primary);
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-nav-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-nav-outline:hover {
    background: rgba(220, 38, 38, 0.1);
}

.balance-badge {
    background: var(--surface);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(220, 38, 38, 0.05);
}

/* ============================================
   Pricing Section
   ============================================ */

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 48px;
    font-size: 1.05rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s;
}

.pricing-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.15);
}

.pricing-card.featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(190, 18, 60, 0.05));
}

.pricing-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 16px 0;
}

.pricing-card .price span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-card .features {
    list-style: none;
    margin: 20px 0;
    text-align: left;
}

.pricing-card .features li {
    padding: 6px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pricing-card .features li::before {
    content: '✓ ';
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   Features Section
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: rgba(220, 38, 38, 0.3);
}

.feature-card .icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   Studio (try.html)
   ============================================ */

.studio-container {
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.studio-main {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 40px 24px;
}

.prompt-area {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.prompt-area textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.prompt-area textarea:focus {
    border-color: var(--primary);
}

.prompt-area textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.prompt-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-generate {
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.3);
}

.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cost-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 600;
}

/* Settings panel */
.settings-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.settings-panel h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.setting-row select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text);
    font-size: 0.85rem;
    outline: none;
}

/* Result display */
.result-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    display: none;
}

.result-container.visible {
    display: block;
}

.result-container img {
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 16px;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

/* Loading */
.loading-overlay {
    display: none;
    text-align: center;
    padding: 60px 24px;
}

.loading-overlay.visible {
    display: block;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary);
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 12px;
}

/* ============================================
   Dashboard Styles
   ============================================ */

.dashboard-container {
    padding-top: 80px;
    min-height: 100vh;
}

.dashboard-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
}

.dashboard-card h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.api-key-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--secondary);
    word-break: break-all;
    margin-top: 8px;
}

.btn-copy {
    padding: 8px 20px;
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-copy:hover {
    border-color: var(--primary);
}

/* ============================================
   Auth Callback
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero .subtitle {
        font-size: 1rem;
    }
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    .nav-links {
        gap: 4px;
    }
    .nav-link {
        padding: 6px 10px;
        font-size: 13px;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .prompt-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-generate {
        justify-content: center;
    }
}
