/**
 * CreatorMatch v2.1 - Main Stylesheet
 * Dark, cinematic UI inspired by Instagram/modern streaming apps
 */

/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */

/* Base (Light) Theme */
:root {
    /* Backgrounds */
    --bg: #f5f7fb;
    --bg-muted: #ffffff;
    --bg-soft: #edf1f7;
    --bg-page: #f5f7fb;
    --bg-elevated: #ffffff;
    --bg-hover: #e5e9f0;

    /* Legacy aliases */
    --bg-primary: #f5f7fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf1f7;

    /* Text */
    --fg: #0f172a;
    --fg-muted: #6b7280;
    --fg-subtle: #9ca3af;

    /* Legacy aliases */
    --text-primary: #0f172a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* Borders */
    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;
    --border-medium: #cbd5e1;

    /* Legacy aliases */
    --border-color: #e2e8f0;
    --border-color-strong: #cbd5e1;

    /* Primary - Blue-based */
    --primary: #2563eb;
    --primary-soft: #e7f3ff;
    --primary-strong: #1d4ed8;
    --on-primary: #ffffff;

    /* Legacy aliases */
    --accent: #2563eb;
    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-secondary: #60a5fa;
    --accent-secondary-hover: #2563eb;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);

    /* States */
    --success: #16a34a;
    --success-soft: rgba(22, 163, 74, 0.08);
    --success-strong: #15803d;

    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.1);
    --warning-strong: #d97706;

    --danger: #e11d48;
    --danger-soft: rgba(225, 29, 72, 0.12);
    --danger-strong: #be123c;
    --on-danger: #ffffff;

    --info: #2563eb;
    --info-soft: rgba(37, 99, 235, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.10), 0 10px 10px rgba(0, 0, 0, 0.03);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 999px;
}

/* Dark Mode Theme */
:root[data-theme="dark"] {
    /* Backgrounds */
    --bg: #020617;
    --bg-muted: #0b1220;
    --bg-soft: #0f1729;
    --bg-page: #020617;
    --bg-elevated: #0b1220;
    --bg-hover: #1a2332;

    /* Legacy aliases */
    --bg-primary: #020617;
    --bg-secondary: #0b1220;
    --bg-tertiary: #0f1729;

    /* Text */
    --fg: #e5e7eb;
    --fg-muted: #9ca3af;
    --fg-subtle: #6b7280;

    /* Legacy aliases */
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #9ca3af;

    /* Borders */
    --border-subtle: #1f2937;
    --border-strong: #374151;
    --border-medium: #374151;

    /* Legacy aliases */
    --border-color: #1f2937;
    --border-color-strong: #374151;

    /* Primary - Brighter blue for dark bg */
    --primary: #60a5fa;
    --primary-soft: #0b1a32;
    --primary-strong: #2563eb;
    --on-primary: #0b1120;

    /* Legacy aliases */
    --accent: #60a5fa;
    --accent-primary: #60a5fa;
    --accent-primary-hover: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-secondary-hover: #60a5fa;
    --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);

    /* States */
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.16);
    --success-strong: #16a34a;

    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.18);
    --warning-strong: #f59e0b;

    --danger: #fb7185;
    --danger-soft: rgba(248, 113, 113, 0.16);
    --danger-strong: #f43f5e;
    --on-danger: #020617;

    --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, 0.16);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.app-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.main-content {
    min-height: calc(100vh - 200px);
    padding: var(--spacing-lg) 0;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

.nav-bar {
    background: rgba(16, 19, 32, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link-messages,
.nav-link-notifications {
    position: relative;
}

.unread-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--accent-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.nav-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-left: var(--spacing-md);
    border-left: 1px solid var(--border-color);
}

.user-name {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 79, 112, 0.3);
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 79, 112, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-secondary);
    border: 2px solid var(--accent-secondary);
}

.btn-secondary:hover {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Pills & Badges
   ========================================================================== */

.pill {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pill-platform {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.pill-status {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.pill-status.pill-draft {
    background: rgba(156, 163, 175, 0.15);
    color: #9CA3AF;
}

.pill-status.pill-closed {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
}

.pill-type {
    background: rgba(168, 85, 247, 0.15);
    color: #C084FC;
}

.pill-brand {
    background: rgba(255, 79, 112, 0.15);
    color: var(--accent-primary);
}

.pill-creator {
    background: rgba(62, 201, 167, 0.15);
    color: var(--accent-secondary);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color-strong);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

/* ==========================================================================
   Page Headers
   ========================================================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--spacing-xl) 0 var(--spacing-lg) 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   KPI Cards
   ========================================================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0 var(--spacing-xl) 0;
}

.kpi-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.kpi-card {
    background: linear-gradient(135deg, rgba(255, 79, 112, 0.1) 0%, rgba(62, 201, 167, 0.1) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.kpi-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ==========================================================================
   Campaign Cards
   ========================================================================== */

.campaign-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.3s;
}

.campaign-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-md);
}

.campaign-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.campaign-brand-name {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.campaign-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.campaign-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: var(--spacing-sm) 0;
}

.campaign-objective {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.campaign-brief {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: var(--spacing-md) 0;
}

.campaign-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: var(--spacing-md) 0;
}

.tag {
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tag-budget {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.campaign-badge {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.badge-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.campaign-stats-row {
    display: flex;
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.stat-mini {
    flex: 1;
    text-align: center;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.stat-mini-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.stat-mini-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Progress Bars
   ========================================================================== */

.progress-section {
    margin: var(--spacing-md) 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress-percent {
    color: var(--accent-secondary);
}

.progress-bar {
    width: 100%;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 20px;
    transition: width 0.5s ease;
}

.progress-footer {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.auth-container {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.auth-form, .campaign-form, .submit-form {
    margin-top: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Select/Dropdown specific styles */
select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23F9FAFB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

select.form-input option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

select.form-input option:hover,
select.form-input option:focus,
select.form-input option:checked {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Ensure options are visible in dropdown list */
select.form-input:focus option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    justify-content: flex-end;
}

.radio-group {
    display: flex;
    gap: var(--spacing-md);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.radio-label:hover {
    border-color: var(--accent-primary);
}

.radio-label input[type="radio"] {
    accent-color: var(--accent-primary);
}

.radio-text {
    color: var(--text-primary);
    font-weight: 500;
}

.auth-footer {
    margin-top: var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
}

.link-primary {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* ==========================================================================
   Filters
   ========================================================================== */

.filters-bar {
    display: flex;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.filter-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.filter-pill {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

.filter-pill.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ==========================================================================
   Submissions
   ========================================================================== */

.submissions-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.submission-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-md);
}

.submission-campaign {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.submission-meta {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.submission-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.submission-score {
    text-align: right;
}

.score-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.submission-url {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.submission-stats {
    display: flex;
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-icon {
    font-size: 1rem;
}

.stat-icon.success {
    color: var(--success);
}

.stat-icon.danger {
    color: var(--danger);
}

.submission-summary {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Hero Section (Home)
   ========================================================================== */

.hero-section {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

.stat-box {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.feature-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==========================================================================
   Leaderboard
   ========================================================================== */

.leaderboard-container {
    margin: var(--spacing-lg) 0;
}

.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.3s;
}

.leaderboard-row:hover {
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.leaderboard-row.top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 79, 112, 0.1));
    border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-row.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(62, 201, 167, 0.1));
    border-color: rgba(192, 192, 192, 0.3);
}

.leaderboard-row.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(168, 85, 247, 0.1));
    border-color: rgba(205, 127, 50, 0.3);
}

.rank-cell {
    min-width: 60px;
    text-align: center;
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 800;
}

.creator-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
}

.creator-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.creator-username {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.creator-handle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stats-cell {
    display: flex;
    gap: var(--spacing-xl);
}

.stat-box-inline {
    text-align: center;
}

.stat-value-inline {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label-inline {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Campaign Detail
   ========================================================================== */

.campaign-hero {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.campaign-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-lg);
}

.campaign-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: var(--spacing-sm) 0;
}

.campaign-hero-progress {
    text-align: center;
}

.progress-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 79, 112, 0.2), rgba(62, 201, 167, 0.2));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--accent-primary);
}

.progress-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.campaign-hero-stats {
    display: flex;
    gap: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.hero-stat {
    flex: 1;
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-secondary);
    margin-bottom: 0.25rem;
}

.hero-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.campaign-content {
    display: grid;
    gap: var(--spacing-lg);
}

.campaign-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.content-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
}

.campaign-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.overview-item {
    padding: var(--spacing-sm);
}

.overview-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.overview-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.brief-content {
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.brief-content h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.brief-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.submissions-table {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.submission-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.submission-creator {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.creator-name {
    font-weight: 600;
    color: var(--text-primary);
}

.creator-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.submission-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.submission-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.submission-link:hover {
    color: var(--accent-primary-hover);
}

.submission-metrics {
    display: flex;
    gap: var(--spacing-sm);
}

.metric {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.metric.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.metric.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ==========================================================================
   Admin
   ========================================================================== */

.admin-table {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.admin-row-main {
    flex: 1;
}

.admin-row-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.admin-row-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-row-tags {
    display: flex;
    gap: 0.5rem;
}

.admin-row-stats {
    display: flex;
    gap: var(--spacing-sm);
}

.stat-badge {
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ==========================================================================
   Alerts & Flash Messages
   ========================================================================== */

.flash-messages {
    margin: var(--spacing-md) 0;
}

.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success);
    color: #6EE7B7;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger);
    color: #FCA5A5;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--info);
    color: #93C5FD;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning);
    color: #FCD34D;
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .nav-user {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: var(--spacing-sm);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .stats-row {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .hero-buttons {
        flex-direction: column;
    }

    .page-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-cell {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .campaign-overview {
        grid-template-columns: 1fr;
    }

    .submission-row {
        flex-direction: column;
        align-items: start;
        gap: var(--spacing-md);
    }

    .submission-details {
        align-items: start;
    }
}
