/* ============================================================
   LoveAIMade — Next-Gen AI Studio Design System
   Dark & Light Theme CSS with Glassmorphism & High-End Polish
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* Dynamic glowing border property */
@property --border-glow {
    syntax: '<color>';
    inherits: true;
    initial-value: #10b981;
}

/* ============================================================
   THEME VARIABLES & DESIGN TOKENS
   ============================================================ */

:root,
[data-theme="dark"] {
    --bg-page: #090d16;
    --bg-secondary: #0d1322;
    --bg-surface: #131b2e;
    --bg-surface-elevated: #1e293b;
    --bg-glass: rgba(19, 27, 46, 0.75);
    --bg-glass-nav: rgba(13, 19, 34, 0.85);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(16, 185, 129, 0.4);
    --border-glow: #10b981;

    --primary-color: #10b981;
    --primary-hover: #34d399;
    --accent-indigo: #6366f1;
    --accent-orange: #f59e0b;
    --accent-emerald: #10b981;

    --gradient-brand: linear-gradient(135deg, #10b981 0%, #6366f1 100%);
    --gradient-brand-short: linear-gradient(90deg, #10b981, #3b82f6, #6366f1);
    --gradient-warm: linear-gradient(135deg, #f59e0b, #10b981);
    --gradient-vivid: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6, #ec4899, #10b981);

    --chat-user-bg: #1e293b;
    --chat-ai-bg: #0f172a;
    --sidebar-width: 280px;

    --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);
}

[data-theme="light"] {
    --bg-page: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-nav: rgba(255, 255, 255, 0.92);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-color: #e2e8f0;
    --border-hover: rgba(5, 150, 105, 0.4);
    --border-glow: #059669;

    --primary-color: #059669;
    --primary-hover: #047857;
    --accent-indigo: #4f46e5;
    --accent-orange: #d97706;
    --accent-emerald: #059669;

    --gradient-brand: linear-gradient(135deg, #059669 0%, #4f46e5 100%);
    --gradient-brand-short: linear-gradient(90deg, #059669, #2563eb, #4f46e5);
    --gradient-warm: linear-gradient(135deg, #d97706, #059669);
    --gradient-vivid: linear-gradient(90deg, #059669, #2563eb, #7c3aed, #db2777, #059669);

    --chat-user-bg: #e2e8f0;
    --chat-ai-bg: #ffffff;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.15);
}

/* Base Resets */
* {
    box-sizing: border-box;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -0.025em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* ============================================================
   TOP NAVIGATION BAR
   ============================================================ */

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    height: 64px;
    background: var(--bg-glass-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-tabs {
    display: flex;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

.nav-tab.active {
    color: #ffffff;
    background: var(--gradient-brand);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.nav-icon {
    font-size: 1rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-credit-badge {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--gradient-brand);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-surface-elevated);
    transform: scale(1.05);
}

.theme-icon {
    width: 20px;
    height: 20px;
}

/* User Avatar & Dropdown */
.user-menu-wrapper {
    position: relative;
}

.user-menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3);
    background: var(--gradient-brand);
    transition: all 0.2s ease;
}

.user-menu-trigger:hover .user-avatar {
    transform: scale(1.06);
    box-shadow: var(--shadow-glow);
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 260px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
}

.user-dropdown.open {
    display: block;
    animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 8px 8px;
}

.user-dropdown-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.user-dropdown-plan {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 0.05em;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.user-dropdown-balance {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 8px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.balance-label {
    color: var(--text-secondary);
}

.balance-value {
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-action-btn {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.dropdown-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.dropdown-action-btn.upgrade-btn {
    background: var(--gradient-brand);
    color: #ffffff;
    border: none;
}

.dropdown-action-btn.upgrade-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.dropdown-action-btn.logout-btn {
    color: #ef4444;
}

.dropdown-action-btn.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* ============================================================
   LANDING / HOME HERO
   ============================================================ */

.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.home-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.15;
}

.home-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 2.5rem;
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    width: 100%;
    margin-top: 3rem;
}

.home-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2rem 1.25rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.home-card-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.home-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;

}

.home-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-brand);
    color: #ffffff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    filter: brightness(1.08);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: var(--bg-surface-elevated);
    transform: translateY(-2px);
}

/* ============================================================
   AUTH PAGES (LOGIN & REGISTER)
   ============================================================ */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 64px);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.92rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.auth-submit-btn {
    width: 100%;
    padding: 0.85rem;
    margin-top: 0.75rem;
}

/* ============================================================
   DASHBOARD & CORE FEATURE LAYOUTS
   ============================================================ */

.page-content {
    flex: 1;
    padding: 2.5rem 3rem;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}

.gen-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    box-shadow: var(--shadow-md);
    max-width: 1000px;
    margin: 0 auto 3rem auto;
}

.gen-header {
    margin-bottom: 1.75rem;
}

.gen-header h2 {
    font-size: 1.85rem;
    margin-bottom: 0.4rem;
}

.gen-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.gen-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gen-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gen-input-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.gen-input-group textarea,
.gen-input-group input[type="text"] {
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.gen-input-group textarea:focus,
.gen-input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.gen-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.gen-option {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gen-option label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.gen-option select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gen-option select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.gen-info-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.gen-btn {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 12px;
    margin-top: 0.5rem;
}

.gen-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    margin-top: 2rem;
    font-size: 0.95rem;
}

.gen-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1.2rem;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-input-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-surface-elevated);
}

.dashboard-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.6rem;
    margin: 0;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Chat Layout */
.chat-layout {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 128px);
}

.chat-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.chat-history-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.new-chat-btn {
    width: 100%;
    padding: 0.7rem;
    border: 1px dashed var(--border-color);
    background: transparent;
    color: var(--text-primary);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.new-chat-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-surface-elevated);
    color: var(--primary-color);
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.history-item:hover, .history-item.active {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
}

.chat-main {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.chat-bubble {
    max-width: 78%;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--gradient-brand);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
    align-self: flex-start;
    background: var(--chat-ai-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    gap: 10px;
}

.chat-textarea {
    flex: 1;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    resize: none;
    outline: none;
}

.chat-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Generator Panels (Image, Music, Video) */
.generator-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 128px);
}

.generator-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow-y: auto;
}

.generator-output {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* ============================================================
   MODALS (SUBSCRIPTION & PRICING)
   ============================================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.25rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.subscription-modal-content {
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.plan-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.plan-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.75rem 1.25rem;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    transition: all 0.25s ease;
}

.plan-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.plan-card.current {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 800;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.plan-points {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.plan-features li {
    padding: 4px 0;
}

.plan-features li::before {
    content: '✓ ';
    color: var(--primary-color);
    font-weight: 700;
}

.plan-btn {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.plan-btn.upgrade {
    background: var(--gradient-brand);
    border: none;
    color: #ffffff;
}

.plan-btn.upgrade:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.topup-section {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
}

.topup-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.topup-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 1.5rem;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    transition: all 0.25s ease;
}

.topup-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* Loading screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1rem;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 900px) {
    .home-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .generator-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .chat-layout {
        flex-direction: column;
        height: auto;
    }
    .chat-sidebar {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .home-cards {
        grid-template-columns: 1fr;
    }
    .plan-list {
        grid-template-columns: 1fr;
    }
}
