/* RankGenius CMS — Main Stylesheet */
:root {
    --bg: #06060b;
    --bg2: #0c0c14;
    --surface: #111119;
    --surface2: #1a1a26;
    --surface3: #222233;
    --border: #2a2a3d;
    --border2: #3a3a50;
    --text: #ebebf5;
    --text2: #9494b0;
    --text3: #6a6a85;
    --accent: #6c5ce7;
    --accent2: #a29bfe;
    --accent-glow: rgba(108,92,231,.15);
    --green: #00b894;
    --green-bg: rgba(0,184,148,.1);
    --red: #e17055;
    --red-bg: rgba(225,112,85,.1);
    --orange: #fdcb6e;
    --orange-bg: rgba(253,203,110,.1);
    --blue: #74b9ff;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 30px rgba(0,0,0,.4);
    --font: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* Navbar */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(6,6,11,.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 32px; }
.nav-logo { display: flex; align-items: center; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.logo-rank { color: var(--text); }
.logo-genius { color: var(--green); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text2); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; border: none; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(108,92,231,.3); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { opacity: .9; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent2); }
.btn-ghost { background: transparent; color: var(--text2); }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }

/* Hero Section */
.hero { padding: 100px 0 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 800px; height: 800px; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); pointer-events: none; }
.hero h1 { font-size: 56px; font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 20px; position: relative; }
.hero h1 .highlight { background: linear-gradient(135deg, var(--accent2), var(--green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 19px; color: var(--text2); max-width: 600px; margin: 0 auto 36px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius-lg); overflow: hidden; margin: 60px auto 0; max-width: 800px; }
.stat-item { background: var(--surface); padding: 28px 20px; text-align: center; }
.stat-num { font-size: 32px; font-weight: 800; color: var(--accent2); }
.stat-label { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* Section */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 36px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 12px; }
.section-header p { font-size: 17px; color: var(--text2); max-width: 600px; margin: 0 auto; }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--accent2); margin-bottom: 12px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: all .3s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text2); line-height: 1.6; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-glow); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 20px; }

/* Tool Cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; cursor: pointer; transition: all .25s; text-decoration: none; display: block; }
.tool-card:hover { border-color: var(--green); background: var(--surface2); transform: translateY(-2px); }
.tool-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.tool-card p { font-size: 13px; color: var(--text3); }

/* Tool Page Layout */
.tool-layout { display: grid; grid-template-columns: 260px 1fr 320px; gap: 0; min-height: calc(100vh - 68px); }
.tool-sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 24px 16px; overflow-y: auto; }
.tool-sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text2); transition: all .2s; margin-bottom: 2px; }
.tool-sidebar a:hover, .tool-sidebar a.active { background: var(--accent-glow); color: var(--accent2); }
.tool-sidebar .sidebar-section { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text3); padding: 16px 14px 8px; }
.tool-main { padding: 32px; overflow-y: auto; }
.tool-right { background: var(--surface); border-left: 1px solid var(--border); padding: 24px; overflow-y: auto; }

/* Search Box */
.search-box { display: flex; gap: 12px; margin-bottom: 32px; }
.search-box input { flex: 1; padding: 14px 20px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 15px; transition: border-color .2s; }
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-box select { padding: 14px 16px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 14px; min-width: 120px; }
.search-box button { padding: 14px 28px; }

/* Region Tabs */
.region-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.region-tab { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--surface2); color: var(--text3); cursor: pointer; border: 1px solid transparent; transition: all .2s; }
.region-tab:hover, .region-tab.active { border-color: var(--accent); color: var(--accent2); background: var(--accent-glow); }

/* Results Table */
.results-table { width: 100%; border-collapse: collapse; }
.results-table th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); border-bottom: 1px solid var(--border); }
.results-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.results-table tr:hover { background: var(--surface2); }
.results-table .check-col { width: 40px; }
.results-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-red { background: var(--red-bg); color: var(--red); }

/* Tag Chips */
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip { padding: 6px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; transition: all .2s; }
.tag-chip:hover, .tag-chip.selected { border-color: var(--green); color: var(--green); background: var(--green-bg); }

/* Copy Box */
.copy-box { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.copy-box textarea { width: 100%; background: transparent; border: none; color: var(--text); font-size: 13px; resize: none; min-height: 100px; }
.copy-box textarea:focus { outline: none; }
.copy-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.copy-header span { font-size: 13px; color: var(--text3); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 960px; margin: 0 auto; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; text-align: center; position: relative; }
.pricing-card.featured { border-color: var(--accent); box-shadow: 0 0 40px rgba(108,92,231,.15); }
.pricing-card.featured::before { content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 4px 18px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.pricing-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-size: 48px; font-weight: 800; margin-bottom: 4px; }
.pricing-price span { font-size: 16px; color: var(--text3); font-weight: 500; }
.pricing-desc { font-size: 14px; color: var(--text3); margin-bottom: 24px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 28px; }
.pricing-features li { padding: 8px 0; font-size: 14px; color: var(--text2); display: flex; gap: 10px; align-items: center; }
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 700; }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; max-width: 480px; margin: 40px auto; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 16px; background: var(--surface2); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); font-size: 14px; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error { color: var(--red); font-size: 13px; margin-top: 4px; }
.alert { padding: 14px 18px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(0,184,148,.2); }
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid rgba(225,112,85,.2); }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.testimonial-text { font-size: 15px; color: var(--text2); line-height: 1.7; margin-bottom: 16px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-glow); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent2); font-size: 16px; }
.testimonial-name { font-size: 14px; font-weight: 700; }
.testimonial-role { font-size: 12px; color: var(--text3); }

/* Info Panel (right sidebar) */
.info-panel { margin-bottom: 20px; }
.info-panel .info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-panel .info-label { color: var(--text3); }
.info-panel .info-value { font-weight: 600; }

/* Trend Chart Placeholder */
.trend-chart { background: var(--surface2); border-radius: var(--radius); padding: 20px; height: 180px; display: flex; align-items: flex-end; gap: 6px; }
.trend-bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; transition: height .3s; min-height: 8px; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 32px; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.dash-card .dash-num { font-size: 32px; font-weight: 800; color: var(--accent2); }
.dash-card .dash-label { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 68px); }
.admin-sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 24px 16px; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--text2); margin-bottom: 4px; transition: all .2s; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--accent-glow); color: var(--accent2); }
.admin-main { padding: 32px; }
.admin-main h1 { font-size: 28px; font-weight: 800; margin-bottom: 24px; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.data-table th { text-align: left; padding: 14px 18px; background: var(--surface2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); }
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:hover td { background: var(--surface2); }

/* Footer */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-tagline { color: var(--text3); font-size: 14px; max-width: 280px; margin-top: 8px; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--text3); padding: 4px 0; transition: color .2s; }
.footer-col a:hover { color: var(--accent2); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 13px; color: var(--text3); }
.footer-disclaimer { font-size: 11px !important; color: var(--text3); opacity: .6; }

/* CTA Section */
.cta-section { text-align: center; padding: 80px 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 40px auto; max-width: 800px; }
.cta-section h2 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.cta-section p { color: var(--text2); margin-bottom: 28px; font-size: 17px; }

/* Loading skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--surface2); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tab { padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text3); cursor: pointer; transition: all .2s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #fff; }

/* Volume bar */
.volume-bar { height: 6px; border-radius: 3px; background: var(--surface3); overflow: hidden; min-width: 80px; }
.volume-fill { height: 100%; border-radius: 3px; transition: width .3s; }

/* Responsive */
@media (max-width: 1024px) {
    .tool-layout { grid-template-columns: 1fr; }
    .tool-sidebar, .tool-right { display: none; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 36px; }
    .hero p { font-size: 16px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; padding: 20px; gap: 12px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .nav-actions .btn-ghost, .nav-actions .btn-outline { display: none; }
    .pricing-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 28px; }
}

/* Utility */
.text-center { text-align: center; }
.text-green { color: var(--green); }
.text-accent { color: var(--accent2); }
.text-muted { color: var(--text3); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.hidden { display: none; }
