/* ==================== CSS Variables ==================== */
:root {
    /* Фирменные цвета МФЮА - Бело-Сине-Фиолетовый */
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #818CF8;
    --primary-glow: rgba(79, 70, 229, 0.25);

    --accent: #7C3AED;
    --accent-light: #A78BFA;
    --accent-dark: #5B21B6;

    --blue: #3B82F6;
    --blue-light: #60A5FA;
    --blue-dark: #2563EB;

    /* Светлые цвета */
    --white: #ffffff;
    --gray-50: #F8FAFF;
    --gray-100: #EEF2FF;
    --gray-200: #E0E7FF;
    --gray-300: #C7D2FE;
    --gray-400: #A5B4FC;
    --gray-500: #6366F1;
    --gray-600: #4338CA;
    --gray-700: #3730A3;
    --gray-800: #1E1B4B;
    --gray-900: #0F0A2E;

    /* Акцентные цвета */
    --accent-red: #EF4444;
    --accent-green: #10B981;
    --accent-orange: #F59E0B;
    --accent-purple: #8B5CF6;
    --accent-teal: #06B6D4;
    --accent-pink: #EC4899;

    /* UI параметры */
    --border-radius: 20px;
    --border-radius-sm: 14px;
    --border-radius-xs: 10px;
    --shadow: 0 4px 24px rgba(79, 70, 229, 0.08);
    --shadow-lg: 0 12px 40px rgba(79, 70, 229, 0.15);
    --shadow-glow: 0 0 30px rgba(79, 70, 229, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(20px);
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    min-height: 100vh;
    line-height: 1.6;
}

/* ==================== Background Pattern ==================== */
.app-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image:
            radial-gradient(circle at 25% 25%, var(--primary) 2px, transparent 2px),
            radial-gradient(circle at 75% 75%, var(--accent) 1.5px, transparent 1.5px),
            radial-gradient(circle at 50% 10%, var(--blue) 1px, transparent 1px),
            radial-gradient(circle at 10% 80%, var(--primary-light) 1.5px, transparent 1.5px),
            radial-gradient(circle at 90% 40%, var(--accent-light) 1px, transparent 1px);
    background-size: 60px 60px, 80px 80px, 100px 100px, 120px 120px, 70px 70px;
}

.app-container::after {
    content: '';
    position: fixed;
    top: -50%;
    right: -30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* ==================== App Container ==================== */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, #F8FAFF 0%, #EEF2FF 50%, #F0EAFF 100%);
    position: relative;
}

/* ==================== Header ==================== */
.header {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(79, 70, 229, 0.08);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
}

.logo-icon span {
    font-weight: 800;
    font-size: 11px;
    color: var(--white);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.logo-text {
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
    margin-top: 0px;
}

/* ==================== Main Content ==================== */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 110px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}

/* ==================== Pages ==================== */
.page {
    display: none;
    padding: 20px;
    animation: pageIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.active {
    display: block;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px;
}

/* ==================== Hero Banner ==================== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--blue) 100%);
    border-radius: var(--border-radius);
    padding: 28px 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Паттерн вдохновлённый концентрическими кругами (Vector-8.png) */
    background-image:
            radial-gradient(circle at 85% 20%, rgba(255,255,255,0.12) 0%, transparent 50%),
            radial-gradient(circle at 15% 80%, rgba(255,255,255,0.08) 0%, transparent 40%),
            repeating-radial-gradient(circle at 90% 90%, transparent 0px, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 22px);
    pointer-events: none;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    pointer-events: none;
}

.hero-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 18px;
    font-weight: 500;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--white);
    color: var(--primary);
    border-radius: var(--border-radius-xs);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ==================== Cards ==================== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(79, 70, 229, 0.06);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-lg);
}

.card:active::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.card-header:last-child {
    margin-bottom: 0;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.card-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(79, 70, 229, 0.1) 100%);
    color: var(--blue);
}

.card-icon.green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: var(--accent-green);
}

.card-icon.purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: var(--accent-purple);
}

.card-icon.orange {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: var(--accent-orange);
}

.card-icon.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: var(--accent-red);
}

.card-icon i {
    font-size: 22px;
}

.card-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.card-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-600);
}

/* ==================== Stats Grid ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 18px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-number {
    font-weight: 800;
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 600;
}

/* ==================== Contact Items ==================== */
.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(79, 70, 229, 0.05);
}

.contact-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.08) 100%);
    color: var(--primary);
}

.contact-icon i {
    font-size: 18px;
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 2px;
    font-weight: 600;
}

.contact-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

/* ==================== Buttons ==================== */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: var(--border-radius-sm);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.4);
}

.btn-primary:active::before {
    left: 100%;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:active {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:active {
    background: rgba(79, 70, 229, 0.08);
}

/* ==================== Form Elements ==================== */
.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-xs);
    color: var(--gray-900);
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.input-field::placeholder {
    color: var(--gray-400);
    font-weight: 500;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-label {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.4;
    font-weight: 500;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== Bottom Navigation ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 8px 8px calc(env(safe-area-inset-bottom, 12px) + 8px);
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(79, 70, 229, 0.08);
    z-index: 9999;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: var(--border-radius-xs);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    max-width: 80px;
    position: relative;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.08) 100%);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 0 0 3px 3px;
}

.nav-item.active .nav-icon,
.nav-item.active .nav-label {
    color: var(--primary);
}

.nav-icon {
    font-size: 20px;
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.nav-icon i {
    font-size: 20px;
}

.nav-label {
    font-size: 10px;
    color: var(--gray-400);
    font-weight: 700;
    text-align: center;
    transition: color 0.2s ease;
}

/* ==================== Slot Machine — Open Reel ==================== */
.slot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0 16px;
}

.slot-viewport {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 520px; /* показываем 4 приза: 4 × 130px */
    overflow: hidden;
    border-radius: 20px;
    margin: 0 auto;
}

/* Боковые золотистые бордюры как на референсе */
.slot-border-left,
.slot-border-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    z-index: 10;
    background: linear-gradient(180deg,
    transparent 0%,
    rgba(79, 70, 229, 0.3) 10%,
    var(--primary) 30%,
    var(--accent) 50%,
    var(--primary) 70%,
    rgba(79, 70, 229, 0.3) 90%,
    transparent 100%
    );
    border-radius: 2px;
}
.slot-border-left { left: 0; }
.slot-border-right { right: 0; }

/* Градиенты затухания — верх и низ */
.slot-fade-top,
.slot-fade-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 5;
    pointer-events: none;
}
.slot-fade-top {
    top: 0;
    background: linear-gradient(180deg, var(--gray-50) 0%, rgba(248,250,255,0.8) 40%, transparent 100%);
}
.slot-fade-bottom {
    bottom: 0;
    background: linear-gradient(0deg, var(--gray-50) 0%, rgba(248,250,255,0.8) 40%, transparent 100%);
}

/* Центральная линия выбора */
.slot-select-line {
    position: absolute;
    top: 130px; /* ровно 2-й элемент из 4 */
    left: 0;
    right: 0;
    height: 130px;
    z-index: 6;
    pointer-events: none;
    border-top: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    background: rgba(79, 70, 229, 0.04);
    box-shadow:
            0 -4px 20px rgba(79, 70, 229, 0.08),
            0 4px 20px rgba(79, 70, 229, 0.08);
}

.slot-select-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 22px;
    filter: drop-shadow(0 0 6px rgba(79, 70, 229, 0.4));
    line-height: 1;
}
.slot-select-arrow-left { left: 10px; }
.slot-select-arrow-right { right: 10px; }

/* Барабан */
.slot-reel {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    transition: transform 3s cubic-bezier(0.15, 0.85, 0.25, 1);
}

/* Каждый приз — карточка */
.slot-item {
    height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.slot-item-icon {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 8px;
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.15);
    border: 2px solid rgba(79, 70, 229, 0.08);
}

.slot-item-name {
    color: var(--gray-800);
    font-size: 14px;
    font-weight: 700;
    max-width: 220px;
    line-height: 1.3;
}

.spin-btn {
    width: 100%;
    max-width: 320px;
    padding: 18px;
    font-size: 17px;
    margin-top: 20px;
    border-radius: 16px;
}

.spin-btn.disabled {
    background: linear-gradient(135deg, #94a3b8, #64748b) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* ==================== EGE Calculator ==================== */
.ege-form {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid rgba(79, 70, 229, 0.06);
}

.ege-subject {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
}

.ege-subject:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ege-subject-name {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
}

.ege-subject-name i {
    margin-right: 6px;
    color: var(--primary);
}

.ege-subject-input {
    width: 75px;
    padding: 10px;
    text-align: center;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-xs);
    color: var(--gray-900);
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 18px;
    transition: var(--transition);
}

.ege-subject-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: var(--white);
}

.ege-subject-input.valid {
    border-color: var(--accent-green) !important;
    background: rgba(16, 185, 129, 0.06) !important;
}

.ege-subject-input.invalid {
    border-color: var(--accent-red) !important;
    background: rgba(239, 68, 68, 0.06) !important;
}

.ege-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 18px 20px;
    border-radius: var(--border-radius-sm);
    margin-top: 16px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.ege-total-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--white);
}

.ege-total-value {
    font-weight: 800;
    font-size: 30px;
    color: var(--white);
    text-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ege-min-score {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 2px;
    font-weight: 600;
}

.ege-min-score.warning {
    color: var(--accent-red);
    font-weight: 700;
}

.ege-subject {
    flex-wrap: wrap;
}

.ege-subject-info {
    flex: 1;
    min-width: 140px;
}

.ege-info-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--border-radius-sm);
    padding: 18px;
    margin-bottom: 16px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.25);
    position: relative;
    overflow: hidden;
}

.ege-info-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.ege-info-card p {
    font-size: 13px;
    line-height: 1.5;
    opacity: .95;
    margin: 0;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ==================== Proftest ==================== */
.proftest-question {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.06);
}

.question-counter {
    font-size: 13px;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.question-text {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 20px;
    color: var(--gray-800);
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    padding: 16px 18px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Nunito', sans-serif;
}

.option-btn:active,
.option-btn.selected {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(124, 58, 237, 0.06) 100%);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(0.98);
}

.progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Result Card ==================== */
.result-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--blue) 100%);
    border-radius: var(--border-radius);
    padding: 30px 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.result-icon {
    font-size: 56px;
    margin-bottom: 16px;
    animation: celebrateBounce 0.6s ease;
}

@keyframes celebrateBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.result-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--white);
    position: relative;
}

.result-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    position: relative;
    font-weight: 500;
}

/* ==================== Modals ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 10, 46, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-overlay-center {
    align-items: center !important;
}

.modal-center {
    border-radius: 24px !important;
    margin: 20px;
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--white);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 40px;
    height: 5px;
    background: var(--gray-300);
    border-radius: 3px;
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Prize Result ==================== */
.prize-result {
    text-align: center;
    padding: 20px;
}

.prize-result-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: celebrateBounce 0.6s ease;
}

.prize-result-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prize-result-text {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.5;
    font-weight: 500;
}

/* ==================== Notification ==================== */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--white);
    padding: 14px 24px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

.notification-icon {
    font-size: 22px;
}

.notification-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

/* ==================== Spins Info ==================== */
.spins-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.spins-stat-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.spins-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.spins-stat-data {
    display: flex;
    flex-direction: column;
}

.spins-stat-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.spins-stat-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
}

/* ==================== Profile ==================== */
.profile-header {
    text-align: center;
    padding: 24px 0;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 34px;
    color: #fff;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.3);
    position: relative;
}

.profile-avatar::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid rgba(79, 70, 229, 0.15);
}

.profile-avatar i {
    font-size: 34px;
}

.profile-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
}

.profile-username {
    font-size: 14px;
    color: var(--primary);
    margin-top: 4px;
    font-weight: 600;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.profile-stat {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.06);
}

.profile-stat-value {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-stat-label {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 600;
}

.profile-section {
    margin-top: 20px;
}

.profile-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title i {
    font-size: 14px;
}

.profile-item {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.05);
}

.profile-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-item-icon {
    font-size: 18px;
    color: var(--primary);
}

.profile-item-icon i {
    font-size: 16px;
}

.profile-item-title {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-800);
}

.profile-item-status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
}

.profile-item-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #F59E0B;
}

.badge-claimed {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
}

.status-new {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.status-processing {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.profile-item-meta {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 6px;
    font-weight: 500;
}

.empty-message {
    text-align: center;
    color: var(--gray-400);
    font-size: 13px;
    padding: 20px;
    font-weight: 600;
}

.prize-claim-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
}

/* ==================== Home Content Block ==================== */
.home-content-block {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.06);
}

.home-content-block:empty {
    display: none;
}

.home-content-block h1,
.home-content-block h2,
.home-content-block h3 {
    margin: 0 0 12px;
    color: var(--gray-900);
}

.home-content-block h2 {
    font-size: 18px;
}

.home-content-block h3 {
    font-size: 16px;
}

.home-content-block p {
    margin: 0 0 12px;
    color: var(--gray-600);
    line-height: 1.6;
}

.home-content-block ul,
.home-content-block ol {
    margin: 0 0 12px;
    padding-left: 20px;
    color: var(--gray-600);
}

.home-content-block li {
    margin-bottom: 6px;
}

.home-content-block a {
    color: var(--primary);
}

.home-content-block strong {
    color: var(--gray-800);
}

/* ==================== Event Cards ==================== */
.event-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.06);
}

.event-image-placeholder {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.event-image-placeholder.blue {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.event-image-placeholder.green {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-teal) 100%);
}

.event-image-placeholder.orange {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-pink) 100%);
}

.event-content {
    padding: 16px;
}

.event-date {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.event-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.event-description {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ==================== Prize List ==================== */
.prize-list {
    margin-top: 20px;
}

.prize-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.05);
}

.prize-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.prize-color {
    width: 14px;
    height: 14px;
    border-radius: 6px;
    flex-shrink: 0;
}

.prize-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

.prize-actions {
    display: flex;
    gap: 8px;
}

.prize-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.prize-action-btn:active {
    transform: scale(0.9);
}

.prize-action-btn.edit {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.prize-action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* ==================== Proftest Banner Block (editable from admin) ==================== */
.proftest-banner-block {
    margin-top: 20px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--blue) 100%);
    padding: 28px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

.proftest-banner-block:empty {
    display: none;
}

.proftest-banner-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    pointer-events: none;
}

.proftest-banner-content {
    position: relative;
    z-index: 1;
}

.proftest-banner-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.proftest-banner-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 18px;
    font-weight: 500;
    line-height: 1.5;
}

.proftest-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    color: var(--primary);
    border-radius: var(--border-radius-xs);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.proftest-banner-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ==================== Education Grid ==================== */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.edu-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(79, 70, 229, 0.06);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.edu-card:active {
    transform: scale(0.98);
}

.edu-card-wide {
    grid-column: 1 / -1;
}

.edu-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(124, 58, 237, 0.08) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 20px;
}

.edu-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 4px;
    line-height: 1.3;
}

.edu-card-sub {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 8px;
    font-weight: 600;
}

.edu-links {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edu-links li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    line-height: 1.3;
}

.edu-links li a:active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.06));
    border-color: var(--primary);
    color: var(--primary);
}

.edu-links li a::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--primary);
    flex-shrink: 0;
}

/* ==================== Utilities ==================== */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-20 {
    margin-top: 20px;
}

/* ==================== Animations ==================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}