:root {
    /* Primary Colors */
    --primary-purple: #9333ea;
    --primary-purple-dark: #7c3aed;
    --primary-purple-medium: #a78bfa;
    --primary-purple-light: #c084fc;

    /* Background Gradients */
    --bg-gradient-1: #f3e7ff;
    --bg-gradient-2: #e7f0ff;
    --bg-gradient-3: #ede9fe;

    /* Light Backgrounds */
    --bg-light-purple: #faf5ff;
    --bg-light-lavender: #f5f3ff;
    --bg-light-periwinkle: #ede9fe;

    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-lavender: #8b5cf6;

    /* Text Colors */
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light-gray: #9ca3af;

    /* Border Colors */
    --border-gray: #d1d5db;
    --border-light: #e5e7eb;
    --border-purple: #e9d5ff;

    /* Shadow Colors */
    --shadow-purple: rgba(147, 51, 234, 0.2);
    --shadow-purple-light: rgba(147, 51, 234, 0.1);
}

/* Base Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Heading styles removed - defined per page to avoid conflicts */

/* Common Container Styles */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Common Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-purple);
}

.btn-secondary {
    background: white;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--bg-light-purple);
    transform: translateY(-2px);
}

/* Common Card Styles */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Common Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-light-purple);
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* Common Animated Background Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(48px);
    opacity: 0.7;
    animation: float 20s infinite ease-in-out;
}

.blob1 {
    top: -160px;
    right: -160px;
    width: 320px;
    height: 320px;
    background: var(--primary-purple-light);
}

.blob2 {
    bottom: -160px;
    left: -160px;
    width: 320px;
    height: 320px;
    background: var(--primary-purple-medium);
    animation-delay: 7s;
}

.blob3 {
    top: 50%;
    left: 50%;
    width: 320px;
    height: 320px;
    background: var(--accent-blue);
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(10px) translateX(-10px); }
    75% { transform: translateY(-10px) translateX(15px); }
}

.animate-blob {
    animation: blob-float 20s infinite ease-in-out;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(30px, 10px) scale(1.02); }
}

/* Common Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

/* Form styles removed - defined per page to avoid conflicts */

/* Common Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Common Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Footer Spacer - Common pattern */
.footer-spacer {
    height: 80px;
}

/* Glassmorphism Card Pattern */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
}

/* Common Page Container */
.page-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    position: relative;
    overflow: visible;
}

/* Standardized Animated Blob */
.animated-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    animation: blob-float 7s infinite;
}

/* Show More Button Pattern */
.show-more-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 2px solid var(--primary-purple-light);
    color: var(--primary-purple);
    padding: 14px 36px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.show-more-btn:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-purple);
}

/* Icon Wrapper Pattern */
.icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-wrapper i {
    color: white;
    font-size: 20px;
}

/* Plot Description Pattern */
.plot-description {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.plot-description p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin: 0;
    text-align: justify;
}

/* Spinner Container */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 100%;
}

/* Alternative blob animation keyframe */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* Responsive Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -12px;
}

.col-md-4,
.col-md-6,
.col-md-8,
.col-12 {
    padding: 12px;
}

.col-12 { width: 100%; }

@media (min-width: 768px) {
    .col-md-4 { width: 33.333%; }
    .col-md-6 { width: 50%; }
    .col-md-8 { width: 66.666%; }
}

/* Page Container Backgrounds */
.react-form-container,
.trends-container,
.geo-container,
.dss-container,
.browser-container,
.lifetime-container {
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Chart Card Styles */
.chart-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    position: relative;
}

.chart-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Trend Chart Container */
.trend-chart-container {
    margin-bottom: 24px;
}

/* Filter Wrapper */
.filter-wrapper {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Success/Error States */
.success-message {
    color: #10b981;
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.error-message {
    color: #ef4444;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* Blob Container and Positioning */
.blob-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob-base {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(48px);
    opacity: 0.7;
}

.blob-top-right {
    top: -160px;
    right: -160px;
    background: var(--primary-purple-light);
}

.blob-bottom-left {
    bottom: -160px;
    left: -160px;
    background: var(--primary-purple-medium);
}

.blob-center {
    top: 160px;
    left: 50%;
    background: var(--accent-blue);
}

/* Content Layer */
.content-layer {
    position: relative;
    z-index: 10;
}

/* Width Utilities */
.w-100px { width: 100px; }
.w-200px { width: 200px; }
.max-w-896 { max-width: 896px; }
.max-w-1200 { max-width: 1200px; }

/* Gap Utilities */
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

/* Icon Utilities */
.icon-inline-8 {
    display: inline-block;
    margin-right: 8px;
}

.icon-inline-16 {
    display: inline-block;
    margin-right: 16px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 16px;
    }

    .filter-wrapper {
        position: static;
        margin-bottom: 24px;
    }
}
