/* 
 * LostFound Design System (2026) - Neon Glow Edition
 * Theme: Safety, Trust, Humanity + High Tech/Neon
 */

:root {
    /* -----------------------------------------------------------------
     * Color Palette
     * ----------------------------------------------------------------- */

    /* Brand Colors - High Saturation for Neon Effect */
    --color-primary: #0066FF;
    /* Electric Blue */
    --color-primary-dark: #004ECC;
    --color-secondary: #FF4757;
    /* Neon Red (Urgency) */
    --color-action: #2ED573;
    /* Cyber Green (Found) */
    --color-warning: #FFA502;
    /* Bright Yellow */

    /* Glow Colors (RGBA) */
    /* Glow Colors (Heavy - Dark Mode Default) */
    --glow-primary: rgba(30, 144, 255, 0.8);
    --glow-secondary: rgba(255, 71, 87, 0.8);
    --glow-action: rgba(46, 213, 115, 0.8);

    /* Neutral / Surface (Dark Mode Default) */
    --color-bg-body: #0f172a;
    --page-background: linear-gradient(135deg, #0f172a, #1e293b);
    --color-bg-surface: #1e293b;
    --color-bg-card: rgba(30, 41, 59, 0.7);
    --color-text-main: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: #334155;

    /* -----------------------------------------------------------------
     * Typography
     * ----------------------------------------------------------------- */
    --font-family-base: 'Inter', 'Nirmala UI', 'Mangal', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
    --font-size-base: 16px;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --container-max-width: 1200px;

    /* Base Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* -----------------------------------------------------------------
 * Dark Mode Theme (Neon Optimized)
 * ----------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg-body: #0f172a;
        --page-background: linear-gradient(135deg, #0f172a, #1e293b);
        /* Deepest Charcoal/Black */
        --color-bg-surface: #1e293b;
        /* Slate 800 */
        --color-bg-card: rgba(30, 41, 59, 0.7);
        /* Slate 800 with opacity */
        --color-text-main: #f1f5f9;
        /* Slate 100 */
        --color-text-muted: #94a3b8;
        /* Slate 400 */
        --color-border: #334155;
        /* Slate 700 */

        /* Enhance glows in dark mode */
        --glow-primary: rgba(30, 144, 255, 0.8);
        --glow-secondary: rgba(255, 71, 87, 0.8);
        --glow-action: rgba(46, 213, 115, 0.8);
    }
}

/* -----------------------------------------------------------------
 * Manual Theme Overrides (Triggers via JS)
 * ----------------------------------------------------------------- */
[data-theme="dark"] {
    --color-bg-body: #0f172a;
    --page-background: linear-gradient(135deg, #0f172a, #1e293b);
    --color-bg-surface: #1e293b;
    --color-bg-card: rgba(30, 41, 59, 0.7);
    --color-text-main: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: #334155;

    /* Enhanced Glows */
    --glow-primary: rgba(30, 144, 255, 0.8);
    --glow-secondary: rgba(255, 71, 87, 0.8);
    --glow-action: rgba(46, 213, 115, 0.8);
}

[data-theme="light"] {
    --color-bg-body: #F8F9FA;
    --page-background: #F8F9FA;
    --color-bg-surface: #FFFFFF;
    --color-bg-card: #FFFFFF;
    --color-text-main: #1A1A1A;
    --color-text-muted: #5F6368;
    --color-border: #E0E0E0;

    /* Soft Glows */
    --glow-primary: rgba(30, 144, 255, 0.6);
    --glow-secondary: rgba(255, 71, 87, 0.6);
    --glow-action: rgba(46, 213, 115, 0.6);
}

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

body {
    font-family: var(--font-family-base);
    background: var(--page-background);
    background-color: var(--color-bg-body);
    /* Fallback */
    min-height: 100vh;
    /* Ensure gradient stretches */
    color: var(--color-text-main);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-shadow: 0 0 8px var(--glow-primary);
    text-decoration: none;
}

h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}


/* -----------------------------------------------------------------
 * Enhanced Form Layouts & Elements (Premium)
 * ----------------------------------------------------------------- */

input,
select,
textarea {
    font-family: inherit;
    background: var(--color-bg-surface);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
    /* Increased padding */
    font-size: 1rem;
    /* readable size */
    transition: all 0.3s ease;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    /* Larger gap between fields */
}

@media (min-width: 768px) {
    .form-grid-2 {
        grid-template-columns: repeat(2, 1fr);
        column-gap: var(--spacing-xl);
        /* More breathing room horizontally */
        row-gap: var(--spacing-lg);
    }

    .form-group-full {
        grid-column: 1 / -1;
    }
}

.form-section-title {
    grid-column: 1 / -1;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-top: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--spacing-sm);
}

/* Big Radio Tiles */
.radio-group {
    display: flex;
    gap: var(--spacing-md);
}

.radio-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px;
    height: 120px;
    /* Taller touch target */
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg-surface);
    color: var(--color-text-muted);
    transition: all 0.3s ease;
    text-align: center;
}

.radio-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.radio-label {
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.radio-option input:checked+.radio-tile {
    border-color: var(--color-primary);
    background: rgba(0, 102, 255, 0.05);
    color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.2);
    transform: translateY(-2px);
}

.radio-option:hover .radio-tile {
    border-color: var(--color-primary);
    background: rgba(0, 102, 255, 0.02);
}

/* File Upload Zone */
.file-upload-wrapper {
    position: relative;
    height: 150px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-surface);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.file-upload-wrapper:hover {
    border-color: var(--color-primary);
    background: rgba(0, 102, 255, 0.02);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    padding: 0;
}

.file-upload-content {
    text-align: center;
    pointer-events: none;
    color: var(--color-text-muted);
}


input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 15px var(--glow-primary);
    /* Neon Focus */
}

/* -----------------------------------------------------------------
 * Neon Components
 * ----------------------------------------------------------------- */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Buttons with Neon Glow on Hover */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 0 20px var(--glow-primary), 0 0 40px var(--glow-primary);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--color-secondary);
    color: #fff;
    box-shadow: 0 0 20px var(--glow-secondary), 0 0 40px var(--glow-secondary);
    transform: translateY(-2px);
}

/* Cards with Lift & Glow */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px var(--glow-primary);
}

/* Specific Card variants for Lost/Found */
.card[style*="var(--color-secondary)"]:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px var(--glow-secondary);
}

.card[style*="var(--color-action)"]:hover {
    border-color: var(--color-action);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px var(--glow-action);
}

/* Images in Cards */
.card img {
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.card:hover img {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Navbar */
nav {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(var(--color-bg-body), 0.8);
}

.logo {
    text-shadow: 0 0 10px var(--glow-primary);
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Utility */

/* -----------------------------------------------------------------
 * Tabular Form Design
 * ----------------------------------------------------------------- */
.form-tabular {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-surface);
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    border-bottom: 1px solid var(--color-border);
}

.form-row:last-child {
    border-bottom: none;
}

.form-label-col {
    background: var(--color-bg-body);
    /* Slightly distinct background */
    padding: 24px;
    font-weight: 600;
    color: var(--color-text-main);
    border-right: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.form-input-col {
    padding: 24px;
    background: var(--color-bg-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-input-col input,
.form-input-col select,
.form-input-col textarea {
    width: 100%;
    margin: 0;
    /* Override default margins if any */
}

/* Responsive Switch */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-label-col {
        border-right: none;
        border-bottom: 1px dashed var(--color-border);
        padding: 16px 24px;
        color: var(--color-text-muted);
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 0.05em;
    }

    .form-input-col {
        padding: 16px 24px;
    }
}


.text-neon:hover {
    text-shadow: 0 0 10px currentColor;
}