/* ==========================================================================
   YieldPulse - Modern Dark Glassmorphism CSS Design System
   WebsiteLumiere Integrated Tool Suite
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #0a0d14;
    --bg-card: rgba(18, 24, 38, 0.7);
    --bg-card-hover: rgba(26, 35, 56, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.4);

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

    /* Accent Gradients & Neon Glows */
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.25);
    --accent-indigo: #6366f1;
    --accent-indigo-glow: rgba(99, 102, 241, 0.25);
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-amber: #f59e0b;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #10b981 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(16, 185, 129, 0.3) 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);

    /* Typography */
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Layout & Shadows */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-subtle: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Animated Ambient Glows */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

.bg-glow-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, rgba(0,0,0,0) 70%);
}

.bg-glow-2 {
    bottom: -15%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(0,0,0,0) 70%);
}

.bg-glow-3 {
    top: 40%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0,0,0,0) 70%);
}

/* App Container */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-subtle);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-indigo-glow);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

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

.brand-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-indigo-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Panel Styles */
.panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.panel-header h2 i {
    color: var(--accent-indigo);
}

/* Form Controls */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-row {
    display: flex;
    gap: 14px;
}

.col-6 {
    flex: 1;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    padding-left: 28px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 600;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px var(--accent-indigo-glow);
}

.currency-symbol, .unit-symbol {
    position: absolute;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    pointer-events: none;
}

.currency-symbol {
    left: 12px;
}

.unit-symbol {
    right: 12px;
}

/* Range Sliders */
.range-slider {
    width: 100%;
    margin-top: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    height: 6px;
    border-radius: 3px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-emerald);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-emerald-glow);
    transition: var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Preset Chips */
.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.preset-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preset-chip i {
    font-size: 0.9rem;
}

.preset-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.preset-chip.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-indigo);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* Switches & Toggles */
.advanced-toggles {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-label {
    display: flex;
    flex-direction: column;
}

.toggle-label strong {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.toggle-label span {
    font-size: 0.73rem;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--gradient-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Metrics Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.metric-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.metric-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.metric-primary {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.metric-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent-cyan);
}

.metric-primary .metric-icon {
    background: var(--accent-emerald);
    color: #fff;
}

.metric-content {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.metric-value {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.metric-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.highlight-green {
    color: var(--accent-emerald);
    font-weight: 600;
}

/* Milestones Section */
.milestones-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.milestones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.milestones-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-amber);
}

.milestone-current {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.15);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.milestone-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 900px) {
    .milestone-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.milestone-badge {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
    transition: var(--transition);
}

.milestone-badge.unlocked {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
}

.milestone-badge .icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.milestone-badge.unlocked .icon {
    color: var(--accent-emerald);
}

.milestone-badge .title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.milestone-badge .req {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Charts Section */
.charts-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-title h3 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-controls {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: var(--radius-sm);
}

.chart-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.chart-tab.active {
    background: var(--accent-indigo);
    color: #fff;
}

.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

/* Table Section */
.table-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.table-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-wrapper {
    max-height: 280px;
    overflow-y: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.82rem;
}

.data-table th {
    position: sticky;
    top: 0;
    background: #111625;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Ad Placement Slots (Simulated Monetization) */
.ad-slot {
    border: 1px dashed rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.05);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 20px;
    position: relative;
    transition: var(--transition);
}

.ad-slot.hidden {
    display: none;
}

.ad-badge {
    position: absolute;
    top: -9px;
    left: 14px;
    background: var(--accent-amber);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ad-slot-banner .ad-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 4px;
}

.ad-icon {
    font-size: 1.8rem;
    color: var(--accent-amber);
}

.ad-btn {
    background: var(--accent-amber);
    color: #000;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    white-space: nowrap;
}

.ad-slot-sidebar {
    margin-top: 20px;
}

.ad-box {
    text-align: center;
    padding-top: 10px;
}

.ad-box-icon {
    font-size: 2rem;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.ad-box h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.ad-box p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.ad-slot-native {
    margin-top: 24px;
}

.native-ad-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
}

.native-ad-thumb {
    width: 48px;
    height: 48px;
    background: var(--gradient-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

.native-ad-text h4 {
    font-size: 0.95rem;
}

.native-ad-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Footer */
.main-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.main-footer a {
    color: var(--accent-indigo);
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: var(--transition);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    background: #111625;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.code-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.code-box textarea {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--accent-emerald);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 10px;
    resize: none;
}

/* FAQ Accordion Styling */
.faq-section {
    margin-top: 24px;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.faq-trigger {
    width: 100%;
    background: transparent;
    border: none;
    padding: 14px 18px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
}

.faq-trigger i {
    color: var(--accent-indigo);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-trigger i {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 18px;
}

.faq-item.active .faq-content {
    max-height: 300px;
    padding: 0 18px 16px 18px;
}

.faq-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
