/* ============================================
   AdZapp Judge Evaluation System
   Global Stylesheet - Modern Premium Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Premium Light/Mixed Gradient */
    --primary: #6366f1;
    /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.25);
    --secondary: #ec4899;
    /* Pink */
    --secondary-glow: rgba(236, 72, 153, 0.25);
    --tertiary: #10b981;
    /* Emerald */

    --bg-darker: #f8fafc;
    /* Slate 50 */
    --bg-dark: #ffffff;
    --bg-light: #f1f5f9;
    /* Slate 100 */

    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-dim: #94a3b8;
    /* Slate 400 */

    --border: rgba(0, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --input-bg: rgba(255, 255, 255, 0.8);

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

    /* Shadows */
    --shadow-premium: 0 10px 40px -10px rgba(100, 116, 139, 0.2);
    /* Softer shadow */
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Radius */
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* ============================================
   BASE RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darker);
    /* Mixed Gradient Background */
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(251, 146, 60, 0.15) 0px, transparent 50%);
    /* Added Orange hint */
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
.header-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-success {
    color: var(--tertiary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ============================================
   RESPONSIVE LAYOUT HELPERS
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

/* Mobile specific overrides for these grids */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        /* Stack sidebar below main content */
    }
}


/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm {
    max-width: 500px;
}

.container-lg {
    max-width: 1400px;
}

/* ============================================
   CARD & GLASSMORPHISM
   ============================================ */
.card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: var(--space-md);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 50px -10px rgba(100, 116, 139, 0.25);
    background: rgba(255, 255, 255, 0.85);
}

.card-header {
    margin-bottom: var(--space-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Light separation */
    padding-bottom: var(--space-sm);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
    /* Removed gradient text for better readability on light mode unless specific */
    /* Optional: keep gradient but darker */
    background: linear-gradient(to right, #1e293b, #475569);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-md);
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    /* Bolder for visibility */
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Subtle dark border */
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.2s ease;
    font-weight: 500;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: #ffffff;
}

input::placeholder {
    color: #cbd5e1;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #db2777);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--text-muted);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(241, 245, 249, 0.5);
    /* Light grey header */
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    /* slightly thicker */
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

tr:hover td {
    background: rgba(99, 102, 241, 0.03);
    /* subtle primary tint */
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-title {
    font-size: 1.75rem;
    margin: 0;
    /* Dark gradient for light mode */
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
    /* Darker red */
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #047857;
    /* Darker green */
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    background: rgba(255, 255, 255, 0.6);
    /* Light overlay */
    backdrop-filter: blur(8px);
}

.modal {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    /* Softer shadow */
    color: var(--text-main);
}

/* ============================================
   LANDING PAGE EXTRAS
   ============================================ */
.hero-gradient {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 600px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.5);
    /* Light glass */
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slide-in {
    animation: slideInRight 0.5s ease-out forwards;
}

/* Glass Hover Effect */
.glass-hover {
    position: relative;
    overflow: hidden;
}

.glass-hover::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            /* Stronger shine for light mode */
            transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
}

.glass-hover:hover::after {
    left: 100%;
    top: 100%;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

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

.mb-xs {
    margin-bottom: 0.5rem;
}

.mb-sm {
    margin-bottom: 1rem;
}

.mb-md {
    margin-bottom: 1.5rem;
}

.mb-lg {
    margin-bottom: 2rem;
}

.mb-xl {
    margin-bottom: 3rem;
}

.mt-xl {
    margin-top: 3rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    /* Dark Red */
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    /* Dark Green */
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    /* Dark Amber */
}

/* ============================================
   RESPONSIVE DESIGN - Mobile First
   ============================================ */

/* Mobile Devices (< 640px) */
@media (max-width: 640px) {

    /* Typography */
    body {
        font-size: 0.9375rem;
    }

    h1 {
        font-size: 2rem !important;
        letter-spacing: -1px !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    .header-title {
        font-size: 1.5rem !important;
    }

    /* Containers */
    .container {
        padding: 0 1rem;
    }

    /* Header */
    .header {
        padding: 1rem 0;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch !important;
    }

    .header-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Cards */
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 1.25rem !important;
    }

    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select {
        font-size: 1rem;
        padding: 0.875rem 1rem;
        min-height: 44px;
        /* Touch-friendly */
    }

    label {
        font-size: 0.8125rem;
    }

    /* Buttons */
    .btn {
        padding: 0.875rem 1.25rem;
        min-height: 44px;
        /* Touch-friendly */
        font-size: 0.9375rem;
    }

    .btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        /* Force horizontal scroll */
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    /* Grids - Stack on mobile */
    .feature-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Utility spacing */
    .mb-xl {
        margin-bottom: 2rem !important;
    }

    .mt-xl {
        margin-top: 2rem !important;
    }

    /* Hide less important elements on mobile */
    .text-dim.small {
        font-size: 0.75rem;
    }
}

/* Tablet Devices (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {

    /* Typography */
    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    .header-title {
        font-size: 1.75rem;
    }

    /* Containers */
    .container {
        padding: 0 1.5rem;
    }

    /* Header */
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Cards */
    .card {
        padding: 1.75rem;
    }

    /* Grids - 2 columns on tablet */
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tables */
    th,
    td {
        padding: 0.875rem;
    }
}

/* Large Desktop (> 1440px) */
@media (min-width: 1441px) {
    .container-lg {
        max-width: 1600px;
    }
}