:root {
    --bg-main: #0f172a;
    --bg-secondary: #1e293b;
    --accent-primary: #6366f1;
    --accent-hover: #4f46e5;
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    --danger: #ef4444;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(51, 65, 85, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(51, 65, 85, 0.5);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    background-image: radial-gradient(circle at 10% 40%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
                      radial-gradient(circle at 90% 60%, rgba(16, 185, 129, 0.15) 0%, transparent 45%);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism utility */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.highlight {
    color: var(--accent-primary);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1rem 2rem;
    position: sticky;
    top: 1rem;
    z-index: 100;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links .nav-item {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links .nav-item:hover {
    color: var(--text-main);
}

/* Main Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-section {
    margin-bottom: 3rem;
    text-align: center;
}

.hero-section .title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.hero-section .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.app-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Controls Panel */
.controls-panel {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.row {
    display: flex;
    gap: 1rem;
}

.row .input-group {
    flex: 1;
}

label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

input, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

/* Date Pickers specific styling */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.quick-dates {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-quick {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quick:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--text-muted);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #000;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
}

/* Right Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent-gradient);
}

.card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 1.8rem;
    font-weight: 800;
}

.roi-badge {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 700;
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-primary);
}

.roi-badge.negative {
    background: rgba(255, 71, 87, 0.1);
    color: var(--danger);
}

/* Emotional Hook */
.emotional-hook {
    padding: 1.5rem;
    border-left: 4px solid var(--accent-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

#hook-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-share {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.btn-share:hover {
    background: #1DA1F2; /* Twitter Blue */
    border-color: #1DA1F2;
}

/* Chart */
.chart-container {
    padding: 1.5rem;
    height: 400px;
    width: 100%;
}

/* Ad Placements */
.ad-slot {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}
.sidebar-ad {
    margin-top: 1rem;
    height: 250px;
}
.content-ad {
    margin-top: 1rem;
    height: 120px;
}
.ad-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.2);
    border-bottom-color: #000;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

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

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-section {
    animation: fadeInUp 0.6s ease-out forwards;
}
.app-grid {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}
.emotional-hook {
    animation: fadeInUp 1.0s ease-out forwards;
    opacity: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
    .summary-cards {
        grid-template-columns: 1fr;
    }
    .emotional-hook {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .hero-section .title {
        font-size: 2.2rem;
    }
    .navbar {
        margin: 0.5rem;
        padding: 1rem;
    }
}
