:root {
    /* Light Transformers / Clean Mecha Palette */
    --mecha-bg: #f0f4f8; /* Light tech gray-blue background */
    --mecha-panel: #ffffff; /* Clean white armor plates */
    --mecha-border: #cbd5e1; /* Silver panel lines */
    
    --neon-cyan: #0284c7; /* Strong tech blue (Autobot blue) */
    --neon-cyan-light: #38bdf8; /* Lighter tech blue */
    --neon-cyan-dim: rgba(2, 132, 199, 0.1);
    
    --neon-gold: #d97706; /* Solid gold/amber for Islamic touch */
    --neon-gold-dim: rgba(217, 119, 6, 0.15);
    
    --text-main: #1e293b; /* Dark text for readability */
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-heavy: 0 15px 30px -5px rgba(2, 132, 199, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: var(--mecha-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Light tech grid */
    background-image: 
        linear-gradient(rgba(100, 116, 139, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 116, 139, 0.08) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Bright background orb */
.background-pattern {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, var(--neon-cyan-dim) 0%, transparent 60%);
    z-index: -1;
    opacity: 0.8;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Light Mecha Style */
.main-header {
    background: var(--mecha-panel);
    border-bottom: 2px solid var(--neon-cyan-light);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px 0;
    position: relative;
}

/* Tech circuit accents */
.main-header::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    width: 20%;
    height: 3px;
    background: var(--neon-gold);
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Autobot-like Hexagon Avatar (Light version) */
.robot-avatar {
    width: 65px;
    height: 65px;
    background: var(--neon-cyan);
    border: 3px solid var(--mecha-panel);
    color: var(--text-inverse);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 0 15px var(--neon-cyan-dim);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: var(--transition);
    cursor: pointer;
}

.robot-avatar:hover {
    background: var(--neon-gold);
    transform: scale(1.1) rotate(180deg);
}

.title-area h1 {
    font-size: 1.6rem;
    color: var(--neon-cyan);
    font-weight: 800;
}

.title-area h2 {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Target Lock / Mecha Nameplate (Light version) */
.student-welcome {
    text-align: left;
    background: var(--mecha-bg);
    padding: 10px 25px;
    border-left: 4px solid var(--neon-gold);
    box-shadow: var(--shadow-light);
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}

.student-welcome p {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.student-welcome h3 {
    color: var(--neon-cyan);
    font-weight: 800;
    font-size: 1.3rem;
}

/* Main Content */
main {
    padding: 40px 0;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 50px;
}

.robot-guide {
    display: flex;
    align-items: center;
    gap: 30px;
    background: var(--mecha-panel);
    padding: 30px;
    border: 2px solid var(--mecha-border);
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

/* Light gleam effect */
.robot-guide::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(2, 132, 199, 0.03) 45%, transparent 50%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    20% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

.guide-img {
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
    animation: hover-mech 4s ease-in-out infinite alternate;
}

@keyframes hover-mech {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-10px) scale(1.02); }
}

/* HUD Style Speech Bubble (Light version) */
.speech-bubble {
    background: var(--mecha-bg);
    padding: 25px;
    border: 2px solid var(--neon-cyan-light);
    border-left: 6px solid var(--neon-cyan);
    position: relative;
    flex: 1;
    font-size: 1.3rem;
    color: var(--text-main);
    line-height: 1.8;
    font-weight: 500;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

/* Units Grid - Light Armor Plates */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.unit-card {
    background: var(--mecha-panel);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border: 2px solid var(--mecha-border);
    /* Mecha armor plate shape */
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--neon-cyan);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.unit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--neon-cyan-light);
    background: #f8fafc;
}

.unit-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--mecha-bg);
    border: 2px solid var(--mecha-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    color: var(--neon-cyan);
    transition: var(--transition);
    /* Hexagon */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.unit-card:hover .card-icon {
    border-color: var(--neon-gold);
    color: var(--neon-gold);
    background: var(--mecha-panel);
    transform: rotate(360deg);
}

.unit-card h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 10px;
}

.unit-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 700;
    border-top: 2px solid var(--mecha-border);
    background: var(--mecha-panel);
}

.copyright-butterfly {
    margin-top: 10px;
    font-size: 0.95rem;
}

.copyright-butterfly a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: var(--transition);
}

.copyright-butterfly a:hover {
    color: var(--neon-gold);
}

/* HUD Control Panel */
.hud-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hud-btn {
    background: var(--mecha-bg);
    border: 2px solid var(--mecha-border);
    color: var(--text-muted);
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.hud-btn:hover {
    background: var(--mecha-panel);
    border-color: var(--neon-cyan-light);
    color: var(--neon-cyan);
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.1);
}

.hud-btn.active {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    color: white;
    box-shadow: 0 0 15px var(--neon-cyan-dim);
}

/* Toast HUD Notification (Light version) */
.toast-hud {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mecha-panel);
    border: 2px solid var(--neon-cyan-light);
    border-left: 5px solid var(--neon-cyan);
    color: var(--text-main);
    padding: 15px 30px;
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-area {
        flex-direction: column;
    }
    
    .student-welcome {
        text-align: center;
        width: 100%;
        clip-path: none;
        border-left: none;
        border-top: 4px solid var(--neon-gold);
    }
    
    .robot-guide {
        flex-direction: column;
        text-align: center;
    }
    
    .speech-bubble {
        border-left: 2px solid var(--neon-cyan-light);
        border-top: 5px solid var(--neon-cyan);
        clip-path: none;
    }
}

/* AI Chatbot Styles */
.ai-fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: var(--neon-cyan);
    border: 2px solid var(--mecha-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 15px var(--neon-cyan);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--neon-cyan);
}

.ai-chat-window {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 350px;
    height: 500px;
    background: var(--mecha-bg);
    border: 2px solid var(--neon-cyan);
    border-radius: 15px;
    box-shadow: var(--shadow-strong);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom left;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-chat-window.open {
    transform: scale(1);
}

.ai-chat-header {
    background: var(--mecha-panel);
    padding: 15px;
    border-bottom: 2px solid var(--mecha-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--neon-cyan);
    font-weight: bold;
    font-family: 'Tajawal', sans-serif;
}

.ai-chat-close {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.ai-chat-close:hover {
    color: #ef4444;
}

.ai-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'Tajawal', sans-serif;
}

.ai-message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 10px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.ai-message.bot {
    background: var(--mecha-panel);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 0;
    border-left: 3px solid var(--neon-cyan);
}

.ai-message.user {
    background: var(--neon-cyan);
    color: var(--mecha-bg);
    align-self: flex-end;
    border-bottom-right-radius: 0;
    font-weight: bold;
}

.ai-chat-input-area {
    padding: 15px;
    border-top: 2px solid var(--mecha-border);
    display: flex;
    gap: 10px;
    background: var(--mecha-panel);
}

.ai-chat-input {
    flex: 1;
    background: var(--mecha-bg);
    border: 1px solid var(--mecha-border);
    color: var(--text-main);
    padding: 10px;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    outline: none;
}

.ai-chat-input:focus {
    border-color: var(--neon-cyan);
}

.ai-chat-send {
    background: var(--neon-cyan);
    color: var(--mecha-bg);
    border: none;
    width: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.ai-chat-send:hover {
    background: var(--neon-cyan-light);
}

.ai-typing {
    display: flex;
    gap: 5px;
    padding: 10px;
    align-items: center;
}

.ai-typing .dot {
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.ai-typing .dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

