/* ============================================
   AI Critical Thinking Lab — Design System
   مختبر التفكير النقدي بالذكاء الاصطناعي
   ============================================ */

/* ===== CSS Custom Properties ===== */
:root {
    /* Colors - Cosmic Dark Theme */
    --bg-primary: #06060f;
    --bg-secondary: #0c0c1d;
    --bg-tertiary: #12122a;
    --bg-card: rgba(15, 15, 40, 0.6);
    --bg-card-hover: rgba(20, 20, 55, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    /* Accent Colors */
    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;
    --accent-violet: #a855f7;
    --accent-gold: #f59e0b;
    --accent-rose: #e94560;
    --accent-emerald: #10b981;
    --accent-blue: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d4ff, #7c3aed);
    --gradient-secondary: linear-gradient(135deg, #7c3aed, #e94560);
    --gradient-gold: linear-gradient(135deg, #f59e0b, #e94560);
    --gradient-emerald: linear-gradient(135deg, #10b981, #00d4ff);
    --gradient-cosmic: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #2d1b69 100%);
    --gradient-card-border: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(124, 58, 237, 0.3));

    /* Text Colors */
    --text-primary: #f0f0f8;
    --text-secondary: #a0a0c0;
    --text-tertiary: #6a6a8e;
    --text-accent: #00d4ff;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(0, 212, 255, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.15);
    --shadow-glow-purple: 0 0 20px rgba(124, 58, 237, 0.15);
    --shadow-glow-gold: 0 0 20px rgba(245, 158, 11, 0.15);

    /* Typography */
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;
    --font-family: var(--font-ar);

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

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index layers */
    --z-bg: -1;
    --z-base: 1;
    --z-card: 10;
    --z-nav: 100;
    --z-dropdown: 200;
    --z-modal: 300;
    --z-toast: 400;

    /* Navbar */
    --navbar-height: 70px;
}

/* ===== LTR Override ===== */
html[dir="ltr"] {
    --font-family: var(--font-en);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-violet);
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

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

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

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

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

/* ===== Animated Cosmic Background ===== */
.bg-cosmos {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-bg);
    overflow: hidden;
    background: var(--bg-primary);
}

.bg-cosmos::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(233, 69, 96, 0.04) 0%, transparent 50%);
    animation: cosmosRotate 120s linear infinite;
}

.bg-cosmos::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 15% 85%, rgba(0, 212, 255, 0.6) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 15%, rgba(124, 58, 237, 0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 75%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 30%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 55%, rgba(255,255,255,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 95% 45%, rgba(255,255,255,0.2) 0%, transparent 100%);
    animation: starsFlicker 8s ease-in-out infinite alternate;
}

#particlesCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@keyframes cosmosRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes starsFlicker {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* ===== Glassmorphism Cards ===== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Gradient border card variant */
.gradient-border-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    position: relative;
    padding: var(--space-lg);
    z-index: 1;
}

.gradient-border-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1.5px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.4;
    transition: opacity var(--transition-base);
}

.gradient-border-card:hover::before {
    opacity: 0.8;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    z-index: var(--z-nav);
    background: rgba(6, 6, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(6, 6, 15, 0.95);
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    text-decoration: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.brand-icon svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.nav-link.active {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: var(--radius-full);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ===== Icon Buttons ===== */
.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Language Toggle */
.lang-toggle {
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.lang-label {
    font-size: 0.8rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
}

html[dir="ltr"] .user-dropdown {
    left: auto;
    right: 0;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: var(--space-sm) var(--space-md);
}

.dropdown-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dropdown-role {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    text-transform: capitalize;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-xs) 0;
}

.dropdown-item {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

html[dir="rtl"] .btn svg {
    transform: scaleX(-1);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3), 0 0 60px rgba(124, 58, 237, 0.15);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::after {
    transform: translateX(100%);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

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

.btn-ghost:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.btn-gold {
    background: var(--gradient-gold);
    color: white;
    box-shadow: var(--shadow-glow-gold);
}

.btn-gold:hover {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

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

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

.btn-link {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

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

.input-icon {
    position: absolute;
    right: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: color var(--transition-fast);
}

html[dir="ltr"] .input-icon {
    right: auto;
    left: 14px;
}

.input-wrapper input,
.input-wrapper textarea,
.input-wrapper select {
    width: 100%;
    padding: 0.85rem 1rem;
    padding-right: 44px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all var(--transition-fast);
    outline: none;
}

html[dir="ltr"] .input-wrapper input,
html[dir="ltr"] .input-wrapper textarea,
html[dir="ltr"] .input-wrapper select {
    padding-right: 1rem;
    padding-left: 44px;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus,
.input-wrapper select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.input-wrapper input:focus ~ .input-icon {
    color: var(--accent-cyan);
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: all var(--transition-fast);
    min-height: 120px;
}

textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-error {
    color: var(--accent-rose);
    font-size: 0.85rem;
    margin-top: var(--space-xs);
    min-height: 1.2em;
}

/* ===== Role Selector ===== */
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.role-option {
    cursor: pointer;
}

.role-option input {
    display: none;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-glass);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.role-card svg {
    width: 32px;
    height: 32px;
    color: var(--text-tertiary);
    transition: color var(--transition-base);
}

.role-card span {
    font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.role-option:hover .role-card {
    border-color: var(--border-light);
    background: var(--bg-glass-hover);
}

.role-option.selected .role-card,
.role-option input:checked ~ .role-card {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
    box-shadow: var(--shadow-glow-cyan);
}

.role-option.selected .role-card svg,
.role-option input:checked ~ .role-card svg {
    color: var(--accent-cyan);
}

.role-option.selected .role-card span,
.role-option input:checked ~ .role-card span {
    color: var(--text-primary);
}

/* ===== Auth Page ===== */
.page-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.auth-container {
    width: 100%;
    max-width: 460px;
}

.auth-card {
    padding: var(--space-2xl);
}

.auth-card:hover {
    transform: none;
}

.auth-language {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
    padding: 4px;
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.auth-lang-option {
    min-height: 38px;
    border: 0;
    border-radius: calc(var(--radius-sm) - 2px);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-lang-option:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.auth-lang-option.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow-cyan);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--space-lg);
    animation: logoFloat 4s ease-in-out infinite;
}

.auth-logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.3));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.auth-title {
    font-size: 1.6rem;
    margin-bottom: var(--space-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-switch {
    text-align: center;
    margin-top: var(--space-lg);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.auth-switch .btn-link {
    margin-right: var(--space-xs);
}

html[dir="ltr"] .auth-switch .btn-link {
    margin-right: 0;
    margin-left: var(--space-xs);
}

/* ===== Pages Common ===== */
.page {
    min-height: 100vh;
    padding-top: var(--navbar-height);
}

.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-2xl);
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.4rem 1rem;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: var(--space-md);
}

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

.section-subtitle-large {
    max-width: 820px;
    color: var(--text-primary);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.55;
}

/* ===== Hero Section (Home) ===== */
.hero {
    text-align: center;
    padding: var(--space-3xl) 0;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 1.25rem;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-full);
    color: var(--accent-cyan);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-2xl);
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin: var(--space-3xl) 0;
}

.stat-card {
    text-align: center;
    padding: var(--space-xl);
}

.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.cyan { color: var(--accent-cyan); background: rgba(0, 212, 255, 0.1); }
.stat-icon.purple { color: var(--accent-purple); background: rgba(124, 58, 237, 0.1); }
.stat-icon.gold { color: var(--accent-gold); background: rgba(245, 158, 11, 0.1); }
.stat-icon.emerald { color: var(--accent-emerald); background: rgba(16, 185, 129, 0.1); }

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

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

/* ===== Methodology Section ===== */
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin: var(--space-2xl) 0;
}

.method-card {
    text-align: center;
    padding: var(--space-xl);
    position: relative;
}

.method-number {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

html[dir="ltr"] .method-number {
    left: auto;
    right: var(--space-md);
}

.method-icon {
    width: 56px;
    height: 56px;
    margin: var(--space-md) auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-icon svg {
    width: 40px;
    height: 40px;
}

.method-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.method-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Challenge Cards ===== */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.challenge-card {
    padding: var(--space-xl);
    cursor: pointer;
    position: relative;
}

.challenge-card:hover {
    box-shadow: var(--shadow-glow-cyan);
}

.challenge-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.challenge-category.science { background: rgba(0, 212, 255, 0.1); color: var(--accent-cyan); }
.challenge-category.ethics { background: rgba(124, 58, 237, 0.1); color: var(--accent-violet); }
.challenge-category.technology { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.challenge-category.society { background: rgba(245, 158, 11, 0.1); color: var(--accent-gold); }
.challenge-category.environment { background: rgba(16, 185, 129, 0.1); color: var(--accent-emerald); }
.challenge-category.education { background: rgba(233, 69, 96, 0.1); color: var(--accent-rose); }

.challenge-title {
    font-size: 1.15rem;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.challenge-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.challenge-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.challenge-difficulty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.difficulty-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--text-tertiary);
}

.difficulty-dot.active {
    background: var(--accent-gold);
}

/* ===== Chat Interface ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--navbar-height) - 140px);
    max-width: 900px;
    margin: 0 auto;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.chat-bubble {
    max-width: 80%;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    line-height: 1.7;
    font-size: 0.95rem;
    animation: bubbleIn 0.3s ease forwards;
}

.chat-bubble.ai {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-top-right-radius: 4px;
}

html[dir="rtl"] .chat-bubble.ai {
    border-top-right-radius: var(--radius-md);
    border-top-left-radius: 4px;
}

.chat-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(124, 58, 237, 0.15));
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-top-left-radius: 4px;
}

html[dir="rtl"] .chat-bubble.user {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: 4px;
}

.chat-bubble .sender {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

.chat-bubble.user .sender {
    color: var(--accent-violet);
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: var(--space-sm);
    align-items: center;
}

.chat-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: typingBounce 1.4s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.chat-input-area {
    padding: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
}

.chat-input-area textarea {
    flex: 1;
    min-height: 48px;
    max-height: 120px;
    padding: 0.75rem 1rem;
    resize: none;
    border-radius: var(--radius-md);
}

.chat-input-area .btn {
    height: 48px;
    width: 48px;
    padding: 0;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.chat-helper-btns {
    display: flex;
    gap: var(--space-sm);
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.chat-helper-btns .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
}

/* ===== Reflection Area ===== */
.reflection-area {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-2xl);
}

.reflection-textarea {
    min-height: 250px;
    margin-bottom: var(--space-lg);
}

.thinking-meter {
    margin-bottom: var(--space-xl);
}

.thinking-meter-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
}

.thinking-meter-bar {
    height: 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.thinking-meter-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    transition: width var(--transition-slow);
    box-shadow: var(--shadow-glow-cyan);
}

/* ===== Evaluation Results ===== */
.eval-results {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-2xl);
}

.eval-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.eval-score-card {
    padding: var(--space-lg);
    text-align: center;
}

.eval-score-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.eval-score-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.eval-chart-container {
    max-width: 400px;
    margin: 0 auto var(--space-2xl);
}

.eval-feedback {
    padding: var(--space-xl);
}

.eval-feedback h3 {
    margin-bottom: var(--space-md);
}

.eval-list {
    list-style: none;
    padding: 0;
}

.eval-list li {
    padding: var(--space-sm) 0;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    color: var(--text-secondary);
}

.eval-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    margin-top: 8px;
    flex-shrink: 0;
}

/* ===== Badges ===== */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-md);
}

.badge-item {
    text-align: center;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.badge-item.earned {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.badge-item.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.badge-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.badge-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===== Dashboard ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.dashboard-card {
    padding: var(--space-xl);
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.dashboard-card.half-width {
    grid-column: span 2;
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.dashboard-card-title {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Student list */
.student-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.student-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.student-item:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-light);
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.student-info {
    flex: 1;
}

.student-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.student-stats {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ===== Progress Bar ===== */
.progress-bar {
    height: 6px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-fill.cyan { background: var(--accent-cyan); }
.progress-fill.purple { background: var(--accent-purple); }
.progress-fill.gold { background: var(--accent-gold); }
.progress-fill.emerald { background: var(--accent-emerald); }

/* ===== Session Phase Stepper ===== */
.phase-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-xl);
}

.phase-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.phase-dot {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    transition: all var(--transition-base);
}

.phase-step.active .phase-dot {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--shadow-glow-cyan);
    background: rgba(0, 212, 255, 0.1);
}

.phase-step.completed .phase-dot {
    border-color: var(--accent-emerald);
    background: var(--accent-emerald);
    color: white;
}

.phase-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    display: none;
}

.phase-step.active .phase-label {
    display: block;
    color: var(--accent-cyan);
}

.phase-connector {
    width: 40px;
    height: 2px;
    background: var(--border-light);
    border-radius: var(--radius-full);
}

.phase-connector.completed {
    background: var(--accent-emerald);
}

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.filter-chip {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    border-color: var(--border-light);
    background: var(--bg-glass-hover);
}

.filter-chip.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent-cyan);
}

/* ===== Settings ===== */
.settings-section {
    margin-bottom: var(--space-2xl);
}

.settings-section-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    animation: toastIn 0.3s ease forwards;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    white-space: nowrap;
}

.toast.success { border-color: rgba(16, 185, 129, 0.3); }
.toast.error { border-color: rgba(233, 69, 96, 0.3); }
.toast.info { border-color: rgba(0, 212, 255, 0.3); }

.toast-icon {
    font-size: 1.1rem;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

html[dir="rtl"] @keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.4s ease forwards; }

/* Stagger children animation */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }

/* ===== Loading Skeleton ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-glass) 25%, var(--bg-glass-hover) 50%, var(--bg-glass) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--space-sm);
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-circle {
    border-radius: 50%;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-tertiary);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    opacity: 0.3;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

/* ===== UNESCO Section ===== */
.unesco-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.unesco-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
}

.unesco-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.unesco-text h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.unesco-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .methodology-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .dashboard-card.half-width {
        grid-column: 1;
    }

    .eval-scores {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }

    html { font-size: 15px; }

    .navbar-links {
        display: none;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: rgba(6, 6, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-lg);
        border-bottom: 1px solid var(--border-subtle);
        z-index: var(--z-nav);
    }

    .navbar-links.show {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: var(--space-md);
        text-align: center;
    }

    .nav-link.active::after {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

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

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

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

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

    .chat-bubble {
        max-width: 90%;
    }

    .eval-scores {
        grid-template-columns: 1fr;
    }

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

    .page-content {
        padding: var(--space-lg);
    }

    .auth-card {
        padding: var(--space-xl);
    }

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

    .phase-stepper {
        padding: var(--space-md);
    }

    .phase-label {
        display: none !important;
    }

    .phase-connector {
        width: 20px;
    }

    .filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
    }

    .filter-chip {
        flex-shrink: 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}

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

    .stat-card {
        padding: var(--space-md);
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .badges-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Print Styles ===== */
@media print {
    .bg-cosmos,
    .navbar,
    .toast-container {
        display: none;
    }

    body {
        background: white;
        color: #000;
    }

    .glass-card {
        background: white;
        border: 1px solid #ddd;
    }
}

/* ===== Challenge Management List ===== */
.manage-challenge-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    gap: var(--space-md);
}

.manage-challenge-item:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-light);
}

.challenge-category-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.challenge-category-badge.science {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.challenge-category-badge.ethics {
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.challenge-category-badge.technology {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.challenge-category-badge.society {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.challenge-category-badge.environment {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.difficulty-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.difficulty-badge.beginner {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
}

.difficulty-badge.intermediate {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-gold);
}

.difficulty-badge.advanced {
    background: rgba(233, 69, 96, 0.1);
    color: var(--accent-rose);
}

/* Delete Button */
.btn-delete-challenge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(233, 69, 96, 0.2);
    background: rgba(233, 69, 96, 0.05);
    color: var(--accent-rose);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.btn-delete-challenge:hover {
    background: rgba(233, 69, 96, 0.15);
    border-color: rgba(233, 69, 96, 0.5);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.2);
}

.btn-delete-challenge:active {
    transform: scale(0.95);
}

/* ===== Delete Confirmation Modal ===== */
.delete-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.delete-confirm-modal {
    width: 100%;
    max-width: 440px;
    padding: var(--space-2xl) var(--space-xl) var(--space-xl);
    text-align: center;
    border: 1px solid rgba(233, 69, 96, 0.2) !important;
}

.delete-confirm-modal:hover {
    transform: none;
}

.delete-confirm-icon {
    color: var(--accent-rose);
    margin-bottom: var(--space-md);
    animation: pulseWarning 2s ease-in-out infinite;
}

.delete-confirm-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.delete-confirm-challenge-name {
    font-size: 0.95rem;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 212, 255, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.delete-confirm-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xl);
}

.delete-confirm-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.delete-confirm-actions .btn {
    flex: 1;
    max-width: 180px;
}

.btn-delete {
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: white;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.2);
}

.btn-delete:hover {
    box-shadow: 0 0 25px rgba(233, 69, 96, 0.4);
    transform: translateY(-2px);
}

.btn-delete:active {
    transform: translateY(0);
}

/* Delete Modal Animations */
@keyframes pulseWarning {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
        max-height: 0;
        padding: 0;
        margin: 0;
        border: 0;
        overflow: hidden;
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
