:root {
    --primary: #0077ff;
    --primary-light: #3399ff;
    --accent: #ff7700;
    --bg-soft: #0b1a0e;
    --glass-bg: #111314;
    --glass-border: #444;
    --text-primary: #ffffff;
    --text-secondary: #ff7700;
    --card-radius: 10px;
    --font-main: 'Alexandria', sans-serif;
    --transition: all 0.3s;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-soft);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    background-image: 
        linear-gradient(30deg, transparent 48%, rgba(0, 119, 255, 0.1) 48%, rgba(0, 119, 255, 0.1) 52%, transparent 52%),
        linear-gradient(-30deg, transparent 48%, rgba(0, 119, 255, 0.1) 48%, rgba(0, 119, 255, 0.1) 52%, transparent 52%),
        linear-gradient(90deg, transparent 48%, rgba(0, 119, 255, 0.1) 48%, rgba(0, 119, 255, 0.1) 52%, transparent 52%),
        repeating-linear-gradient(90deg, rgba(25, 60, 25, 0.8) 0px, rgba(25, 60, 25, 0.8) 50px, rgba(30, 70, 30, 0.8) 50px, rgba(30, 70, 30, 0.8) 100px);
    background-size: 60px 104.4px, 60px 104.4px, 100% 104.4px, 100px 100%;
    background-attachment: fixed;
}

/* Hide old mesh background */
.mesh-background {
    display: none;
}

/* --- Layout --- */
.main-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 24px;
    z-index: 10;
}

.section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hidden {
    display: none !important;
}

/* --- Rocket League Card (Login) --- */
.glass-card {
    background: linear-gradient(135deg, #1f2326, #111314);
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--primary);
    border-bottom: 3px solid var(--accent);
    border-radius: var(--card-radius);
    padding: 60px 40px;
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    text-align: center;
    transition: var(--transition);
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(black 15%, transparent 16%) 0 0,
        radial-gradient(black 15%, transparent 16%) 8px 8px,
        radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px,
        radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px;
    background-color: #282828;
    background-size: 16px 16px;
    opacity: 0.3;
    pointer-events: none;
}

.card-glow {
    display: none; /* Removed */
}

.logo-wrapper {
    width: 110px;
    height: 110px;
    margin: 0 auto 30px;
    animation: float 3s ease-in-out infinite;
}

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

.brand-header h1 {
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-shadow: 3px 3px 0px #333;
}

.tagline {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 50px;
    font-weight: 900;
    text-shadow: 1px 1px 0px #333;
}

.instruction {
    font-size: 15px;
    color: #ddd;
    margin-bottom: 40px;
    line-height: 1.6;
    font-weight: 700;
}

/* --- Premium Form --- */
.premium-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.field-container {
    position: relative;
    width: 100%;
}

.field-container input {
    width: 100%;
    background: #dddddd;
    border: 3px solid #111;
    border-radius: var(--card-radius);
    padding: 16px 20px;
    color: #111;
    font-size: 26px;
    text-align: center;
    letter-spacing: 12px;
    transition: var(--transition);
    box-shadow: inset 4px 4px 0px rgba(0,0,0,0.2);
}

.field-container input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
}

.field-container label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 900;
    color: var(--text-secondary);
    text-align: right;
    padding-right: 10px;
    text-shadow: 1px 1px 0px #000;
}

.primary-btn {
    background: transparent;
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: var(--card-radius);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    text-shadow: none;
    z-index: 1;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, var(--primary), #0055cc);
    border: 2px solid var(--primary-light);
    box-shadow: 0 0 15px rgba(0, 119, 255, 0.6);
    transform: skewX(-15deg);
    z-index: -1;
    transition: all 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.primary-btn:hover::before {
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    box-shadow: 0 0 25px rgba(0, 119, 255, 0.9);
    border-color: #fff;
}

.btn-shine {
    display: none;
}

/* --- Dashboard --- */
.dashboard-head {
    text-align: right;
    margin-bottom: 48px;
    width: 100%;
}

.welcome-text h2 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-shadow: 3px 3px 0px #333;
}

.welcome-text p {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    text-shadow: 1px 1px 0px #333;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
}

.subject-tile {
    position: relative;
    background: linear-gradient(135deg, #1f2326, #111314);
    border: 2px solid #444;
    border-right: 4px solid var(--primary);
    border-radius: 8px;
    padding: 32px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.subject-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(black 15%, transparent 16%) 0 0,
        radial-gradient(black 15%, transparent 16%) 8px 8px,
        radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px,
        radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px;
    background-color: #282828;
    background-size: 16px 16px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.subject-tile > * {
    z-index: 1;
}

.subject-tile:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8), inset -50px 0 50px rgba(0, 119, 255, 0.1);
    border-color: #fff;
    border-right-color: var(--accent);
}

/* Specific Border Colors for Subjects */
.subject-tile.arabic { border-right-color: #ff3366; }
.subject-tile.arabic:hover { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8), inset -50px 0 50px rgba(255, 51, 102, 0.1); }

.subject-tile.math { border-right-color: #33ccff; }
.subject-tile.math:hover { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8), inset -50px 0 50px rgba(51, 204, 255, 0.1); }

.subject-tile.science { border-right-color: #55aa55; }
.subject-tile.science:hover { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8), inset -50px 0 50px rgba(85, 170, 85, 0.1); }

.subject-tile.english { border-right-color: var(--primary); }

.subject-tile.social { border-right-color: var(--accent); }
.subject-tile.social:hover { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8), inset -50px 0 50px rgba(255, 119, 0, 0.1); }

.tile-icon {
    width: 65px;
    height: 65px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0;
    border: 2px solid #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition);
}

.subject-tile:hover .tile-icon {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

.tile-info h3 {
    font-size: 22px;
    margin-bottom: 4px;
    color: #fff;
    text-shadow: 2px 2px 0px #111;
}

.tile-info span {
    color: #ffff55;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 1px 1px 0px #111;
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(17, 17, 17, 0.9);
    border: 2px solid #fff;
    padding: 16px 28px;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
    color: #fff;
    font-weight: 700;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 20px;
}

/* --- Animations --- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-text h2 { font-size: 32px; }
    .subjects-grid { grid-template-columns: 1fr; }
    .glass-card { padding: 40px 24px; }
}
