:root {
    /* Color Palette */
    --bg-main: #09090b;
    --bg-panel: rgba(24, 24, 27, 0.6);
    --bg-panel-hover: rgba(39, 39, 42, 0.8);
    --border-color: rgba(63, 63, 70, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa;
    
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;

    --font-family: 'Outfit', sans-serif;
    --font-family-body: 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
}

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

body {
    font-family: var(--font-family-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 5px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-family); font-weight: 600; }

/* Glassmorphism */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-container { display: flex; height: 100vh; width: 100vw; }

/* Auth Layout State */
.app-container.hide-sidebar .sidebar {
    display: none;
}
.app-container.hide-sidebar .main-content {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar */
.sidebar {
    width: 280px;
    height: 100vh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
}

.logo { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; font-family: var(--font-family); margin-bottom: 48px; justify-content: flex-start; }
.logo-icon { color: var(--accent-primary); font-size: 32px; }

.nav-links { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.nav-item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; color: var(--text-secondary); text-decoration: none; border-radius: 12px; transition: var(--transition); font-weight: 500; }
.nav-item i { font-size: 20px; }
.nav-item:hover, .nav-item.active { background: var(--bg-panel-hover); color: var(--text-primary); }
.nav-item.active { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); border-left: 3px solid var(--accent-primary); }

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Custom Dropdown (Translate Icon) */
.custom-dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 8px 12px;
    transition: var(--transition);
    border-radius: 8px;
    font-family: var(--font-family-body);
}
.dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.dropdown-btn i {
    font-size: 20px;
    color: var(--accent-primary);
}
.dropdown-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    width: 160px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 100;
}
.dropdown-menu.show {
    display: block;
    animation: slideUp 0.2s ease-out forwards;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
    padding: 10px 12px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.dropdown-item:hover, .dropdown-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

.user-profile { display: flex; align-items: center; gap: 12px; }
.avatar img { border-radius: 50%; width: 40px; height: 40px; border: 2px solid var(--border-color); }
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 14px; font-weight: 600; }
.user-plan { font-size: 12px; color: var(--text-secondary); }

/* Main Content */
.main-content { flex: 1; padding: 40px 48px; overflow-y: auto; position: relative; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.page-title { font-size: 32px; margin-bottom: 8px; }
.page-subtitle { color: var(--text-secondary); }

/* Buttons */
.btn { padding: 12px 24px; border-radius: 12px; border: none; cursor: pointer; font-weight: 600; font-family: var(--font-family); transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; }
.btn-primary { background: var(--accent-primary); color: white; }
.btn-primary:hover { background: var(--accent-primary-hover); transform: translateY(-2px); }
.btn-secondary { background: var(--bg-panel); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-panel-hover); }
.btn-small { padding: 6px 12px; border-radius: 8px; font-size: 13px; background: var(--bg-panel-hover); color: var(--text-primary); border: 1px solid var(--border-color); cursor: pointer; transition: var(--transition); }
.btn-small:hover { background: var(--accent-primary); color: white; }
.w-full { width: 100%; }
.glow-effect { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }

/* Auth Views */
.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    text-align: center;
}
.auth-wrapper .logo { justify-content: center; margin-bottom: 24px; }
.auth-header { margin-bottom: 32px; }
.auth-header h1 { font-size: 28px; margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); }
.auth-form { display: flex; flex-direction: column; gap: 20px; text-align: left; margin-bottom: 24px; }
.auth-link { color: var(--text-secondary); cursor: pointer; transition: var(--transition); font-size: 14px; }
.auth-link:hover { color: var(--accent-primary); text-decoration: underline; }

/* Enhanced Dashboard Grid & Glowing Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 32px; }
.stat-card { padding: 24px; transition: var(--transition); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; opacity: 0.5; transition: opacity 0.3s; }
.stat-glow-green::before { background: var(--accent-green); box-shadow: 0 0 15px var(--accent-green); }
.stat-glow-purple::before { background: var(--accent-purple); box-shadow: 0 0 15px var(--accent-purple); }
.stat-glow-blue::before { background: var(--accent-primary); box-shadow: 0 0 15px var(--accent-primary); }
.stat-glow-orange::before { background: var(--accent-orange); box-shadow: 0 0 15px var(--accent-orange); }

.stat-card:hover { transform: translateY(-5px); border-color: rgba(255, 255, 255, 0.1); }
.stat-card:hover::before { opacity: 1; }

.stat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.stat-title { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.icon-wrapper { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.icon-wrapper.green { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); }
.icon-wrapper.purple { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }
.icon-wrapper.blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); }
.icon-wrapper.orange { background: rgba(245, 158, 11, 0.1); color: var(--accent-orange); }
.stat-value { font-size: 32px; font-weight: 700; margin-bottom: 8px; font-family: var(--font-family); }
.stat-trend { font-size: 13px; display: flex; align-items: center; gap: 4px; }
.stat-trend.positive { color: var(--accent-green); }
.stat-trend.negative { color: var(--accent-red); }
.stat-trend.neutral { color: var(--text-secondary); }

/* Dashboard Split View (Chart + Activity) */
.dashboard-split { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.chart-section { padding: 24px; display: flex; flex-direction: column; }
.chart-container { flex: 1; min-height: 300px; position: relative; }
.section-title { font-size: 20px; margin-bottom: 20px; }
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); gap: 20px; }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.activity-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); }
.activity-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }
.activity-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); }
.activity-details { flex: 1; display: flex; flex-direction: column; }
.activity-name { font-weight: 500; margin-bottom: 4px; }
.activity-time { font-size: 13px; color: var(--text-secondary); }
.activity-status { padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.activity-status.success { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.activity-status.pending { background: rgba(245, 158, 11, 0.1); color: var(--accent-orange); border: 1px solid rgba(245, 158, 11, 0.2); }

/* SEO Analyzer */
.scanner-card { padding: 32px; margin-bottom: 32px; }
.input-group { display: flex; gap: 16px; align-items: center; }
.input-group i { font-size: 24px; color: var(--text-secondary); }
.glass-input { flex: 1; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border-color); padding: 16px 20px; border-radius: 12px; color: var(--text-primary); font-size: 16px; font-family: var(--font-family-body); transition: var(--transition); }
.glass-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
.results-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.score-card { padding: 32px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.score-circle { width: 150px; margin: 24px 0; }
.circular-chart { display: block; margin: 0 auto; max-width: 80%; max-height: 250px; }
.circle-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 3.8; }
.circle { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke: var(--accent-green); animation: progress 1s ease-out forwards; }
@keyframes progress { 0% { stroke-dasharray: 0 100; } }
.percentage { fill: var(--text-primary); font-family: var(--font-family); font-size: 10px; font-weight: 700; text-anchor: middle; }
.score-status { font-size: 18px; font-weight: 600; }
.text-green { color: var(--accent-green); }
.issues-card { padding: 32px; }
.issues-card h3, .score-card h3 { margin-bottom: 24px; font-size: 20px; }
.issue-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.issue-item { display: flex; align-items: center; gap: 16px; padding: 16px; background: rgba(0,0,0,0.2); border-radius: 12px; border: 1px solid var(--border-color); }
.issue-item span { flex: 1; }
.issue-item i { font-size: 24px; }
.issue-item.warning i { color: var(--accent-orange); }
.issue-item.error i { color: var(--accent-red); }
.issue-item.success i { color: var(--accent-green); }

/* Review Studio */
.ai-badge { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2)); border: 1px solid rgba(139, 92, 246, 0.3); color: #c4b5fd; padding: 4px 12px; border-radius: 20px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.studio-grid { display: grid; grid-template-columns: 350px 1fr; gap: 24px; }
.config-panel { padding: 32px; }
.results-panel { padding: 32px; min-height: 400px; }
.config-panel h3, .results-panel h3 { margin-bottom: 24px; }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--text-secondary); }
.form-group select.glass-input { width: 100%; appearance: none; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-secondary); text-align: center; padding: 40px; }
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }

/* Maps Publisher */
.map-connect-card { padding: 24px; display: flex; justify-content: space-between; align-items: center; }
.account-status { display: flex; align-items: center; gap: 16px; }
.text-gray { color: var(--text-secondary); }
.mb-6 { margin-bottom: 24px; }
.status-badge { padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.status-badge.connected { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.premium-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.premium-table th { text-align: left; padding: 16px; color: var(--text-secondary); font-weight: 500; border-bottom: 1px solid var(--border-color); }
.premium-table td { padding: 16px; border-bottom: 1px solid rgba(63, 63, 70, 0.2); }
.text-yellow { color: var(--accent-orange); }
.stars { display: flex; gap: 4px; }

/* Utilities & Animations */
.hidden { display: none !important; }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.review-card { background: rgba(0,0,0,0.2); border: 1px solid var(--border-color); padding: 20px; border-radius: 12px; margin-bottom: 16px; animation: fadeIn 0.4s ease-out forwards; }
.review-header { display: flex; justify-content: space-between; margin-bottom: 12px; }
.review-author { font-weight: 600; }
.review-text { color: var(--text-secondary); font-size: 15px; line-height: 1.5; margin-bottom: 16px; }
.review-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Responsive Dashboard Layout */
@media (max-width: 1200px) {
    .dashboard-split { grid-template-columns: 1fr; }
}
