/* ─── MyAICEO — Premium Design System ─── */

:root {
    --primary: #6C3CE9;
    --primary-light: #8B5CF6;
    --primary-dark: #5521CC;
    --primary-glow: rgba(108, 60, 233, 0.25);
    --bg-dark: #0B0D17;
    --bg-card: #13152A;
    --bg-card-hover: #1A1D35;
    --bg-input: #1A1D35;
    --border: #2A2D45;
    --text: #E8E8F0;
    --text-muted: #9394A5;
    --text-heading: #FFFFFF;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gradient: linear-gradient(135deg, #6C3CE9 0%, #9333EA 50%, #A855F7 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px var(--primary-glow);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 { color: var(--text-heading); font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { color: var(--text-muted); }
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: #A78BFA; }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-wrapper { min-height: calc(100vh - 80px); padding: 40px 0; }

/* ─── Nav ─── */
.navbar {
    background: rgba(11, 13, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.nav-brand {
    font-size: 1.4rem; font-weight: 800; color: var(--text-heading);
    display: flex; align-items: center; gap: 8px;
}
.nav-brand span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
    color: var(--text-muted); padding: 8px 16px; border-radius: 8px;
    font-size: 0.9rem; font-weight: 500; transition: var(--transition);
}
.nav-links a:hover { color: var(--text-heading); background: rgba(108,60,233,0.1); }
.nav-links a.active { color: var(--primary-light); background: rgba(108,60,233,0.15); }

.mobile-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius); font-weight: 600;
    font-size: 0.95rem; border: none; cursor: pointer; transition: var(--transition);
    text-decoration: none;
}
.btn-primary {
    background: var(--gradient); color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px var(--primary-glow); color: #fff; }
.btn-secondary {
    background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); background: var(--bg-card-hover); color: var(--text-heading); }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }

/* ─── Cards ─── */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px; transition: var(--transition);
}
.card:hover { border-color: rgba(108,60,233,0.3); box-shadow: var(--shadow-glow); }
.card-header { margin-bottom: 24px; }
.card-header h3 { margin-bottom: 8px; }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 1.5rem;
    background: rgba(108,60,233,0.15); margin-bottom: 16px;
}

/* ─── Forms ─── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block; font-size: 0.9rem; font-weight: 600;
    color: var(--text); margin-bottom: 8px;
}
.form-control {
    width: 100%; padding: 12px 16px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); font-size: 0.95rem; transition: var(--transition);
    font-family: inherit;
}
.form-control:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239394A5' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

/* ─── Hero ─── */
.hero {
    text-align: center; padding: 100px 0 80px;
    background: radial-gradient(ellipse at 50% 0%, rgba(108,60,233,0.15) 0%, transparent 60%);
}
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; letter-spacing: -0.02em; }
.hero h1 span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; max-width: 600px; margin: 0 auto 40px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── Features Grid ─── */
.features { padding: 80px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { margin-bottom: 12px; }

/* ─── Dashboard ─── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; text-align: center;
}
.stat-value { font-size: 2.5rem; font-weight: 800; color: var(--text-heading); }
.stat-value.purple { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 40px; }
.tool-card {
    display: flex; align-items: center; gap: 16px; padding: 20px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); transition: var(--transition); text-decoration: none;
}
.tool-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.tool-card .icon { font-size: 1.8rem; }
.tool-card .info h4 { color: var(--text-heading); font-size: 0.95rem; }
.tool-card .info p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

/* ─── Results ─── */
.result-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px; margin-top: 32px;
    line-height: 1.8; overflow-x: auto;
}
.result-box h1, .result-box h2, .result-box h3 { margin: 20px 0 10px; }
.result-box p { color: var(--text); margin-bottom: 12px; }
.result-box ul, .result-box ol { margin: 12px 0; padding-left: 24px; color: var(--text); }
.result-box table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.result-box th, .result-box td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.result-box th { background: rgba(108,60,233,0.1); color: var(--text-heading); }
.result-box pre { background: #0D0F1A; padding: 16px; border-radius: 8px; overflow-x: auto; margin: 16px 0; }
.result-box code { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; }

/* ─── Pricing ─── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 40px 32px; text-align: center;
    position: relative; transition: var(--transition);
}
.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.03);
}
.pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--gradient); color: #fff; font-size: 0.75rem;
    font-weight: 700; padding: 4px 20px; border-radius: 20px;
    letter-spacing: 0.05em;
}
.pricing-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.pricing-price { font-size: 3rem; font-weight: 800; color: var(--text-heading); margin: 16px 0; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-features { list-style: none; margin: 24px 0; text-align: left; }
.pricing-features li { padding: 8px 0; color: var(--text-muted); display: flex; align-items: center; gap: 10px; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; }

/* ─── Recent Table ─── */
.recent-table { width: 100%; border-collapse: collapse; }
.recent-table th {
    text-align: left; padding: 12px 16px; font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.recent-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.badge {
    display: inline-block; padding: 4px 10px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.badge-purple { background: rgba(108,60,233,0.15); color: var(--primary-light); }
.badge-green { background: rgba(34,197,94,0.15); color: var(--success); }

/* ─── Alerts ─── */
.alert {
    padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px;
    font-size: 0.9rem; border: 1px solid;
}
.alert-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: var(--success); }
.alert-danger { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: var(--danger); }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: var(--warning); }
.alert-info { background: rgba(108,60,233,0.1); border-color: rgba(108,60,233,0.3); color: var(--primary-light); }

/* ─── Auth Forms ─── */
.auth-wrapper {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - 80px); padding: 40px 0;
}
.auth-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 48px 40px;
    width: 100%; max-width: 440px; box-shadow: var(--shadow-md);
}
.auth-card h2 { text-align: center; margin-bottom: 8px; }
.auth-card .subtitle { text-align: center; margin-bottom: 32px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--text-muted); }

/* ─── Page Header ─── */
.page-header { margin-bottom: 40px; }
.page-header h1 { font-size: 2rem; margin-bottom: 8px; }
.page-header p { font-size: 1.05rem; }

/* ─── Usage Bar ─── */
.usage-bar-container { margin: 16px 0; }
.usage-bar {
    height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden;
}
.usage-bar-fill {
    height: 100%; background: var(--gradient); border-radius: 4px;
    transition: width 0.5s ease;
}
.usage-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }

/* ─── Footer ─── */
.footer {
    border-top: 1px solid var(--border); padding: 40px 0; margin-top: 80px;
    text-align: center; color: var(--text-muted); font-size: 0.85rem;
}

/* ─── Loading Spinner ─── */
.spinner { display: none; text-align: center; padding: 40px; }
.spinner.active { display: block; }
.spinner::after {
    content: ''; display: inline-block; width: 40px; height: 40px;
    border: 3px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Two Column Layout ─── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ─── Mobile ─── */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--bg-dark); border-bottom: 1px solid var(--border); flex-direction: column; padding: 16px; gap: 4px; }
    .nav-links.open { display: flex; }
    .mobile-toggle { display: block; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .tool-grid { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .pricing-card.featured { transform: none; }
    .pricing-grid { grid-template-columns: 1fr; }
    .card { padding: 24px; }
    .auth-card { padding: 32px 24px; margin: 0 16px; }
    h1 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .hero { padding: 60px 0 40px; }
    .hero h1 { font-size: 1.8rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
}
