/* ============================================
   TEACHER AI v1.0.1 - PROFESSIONAL STYLES
   Full Structure | Responsive | Latest UI/UX
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary: #1A237E;
    --accent: #FF6B35;
    --success: #4CAF50;
    --warning: #FFC107;
    --danger: #f44336;
    --glass-bg: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.15);
    --shadow: 0 20px 60px rgba(0,0,0,0.15);
    --radius: 20px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --sidebar-width: 280px;
    --header-height: 60px;
}

/* ============================================
   RESET & BASE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #0a0a1a;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

/* ============================================
   LOADING SCREEN
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a, #1a1a2e, #16213e);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
}

.loading-content h1 {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, #4CAF50, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-content p {
    color: #888;
    margin-top: 10px;
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes handWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.animate-fade-up { animation: fadeUp 0.6s ease forwards; }
.animate-fade-left { animation: fadeLeft 0.6s ease forwards; }
.animate-fade-right { animation: fadeRight 0.6s ease forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-scale { animation: scaleIn 0.5s ease forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ============================================
   GLASSMORPHISM
   ============================================ */

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4CAF50;
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */

.main-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.nav-brand {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #4CAF50, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version-badge {
    font-size: 10px;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.nav-links {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
    width: 100%;
}

.nav-btn i {
    width: 24px;
    font-size: 18px;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(46,125,50,0.3), rgba(76,175,80,0.1));
    color: #4CAF50;
    border: 1px solid rgba(76,175,80,0.2);
}

.nav-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.user-details span:last-child {
    font-size: 11px;
    color: #4CAF50;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: rgba(244,67,54,0.15);
    color: #f44336;
    border: 1px solid rgba(244,67,54,0.2);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(244,67,54,0.25);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 11px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #4CAF50;
}

.copyright {
    font-size: 10px;
    color: rgba(255,255,255,0.2);
    text-align: center;
    margin-top: 8px;
}

.hilmux-link {
    display: block;
    text-align: center;
    color: #4CAF50;
    text-decoration: none;
    font-size: 12px;
    margin-top: 4px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: 100vh;
}

.screen {
    padding: 10px;
    min-height: calc(100vh - 40px);
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-header {
    margin-bottom: 25px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
}

.dashboard-header p {
    color: rgba(255,255,255,0.6);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(76,175,80,0.3);
}

.stat-icon {
    font-size: 36px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.stat-info p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.dash-card {
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255,255,255,0.03);
}

.dash-card:hover {
    transform: translateY(-5px);
    border-color: rgba(76,175,80,0.3);
    background: rgba(255,255,255,0.06);
}

.dash-card .card-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.dash-card h4 {
    color: #fff;
    font-size: 16px;
}

.dash-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.quick-actions {
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.02);
}

.quick-actions h3 {
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-modern {
    padding: 12px 28px;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(46,125,50,0.3);
}

.btn-modern-outline {
    padding: 12px 28px;
    background: transparent;
    color: #4CAF50;
    border: 2px solid #4CAF50;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modern-outline:hover {
    background: #4CAF50;
    color: #fff;
    transform: translateY(-2px);
}

.btn-modern-sm {
    padding: 8px 18px;
    font-size: 12px;
}

.btn-danger {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* ============================================
   CHAT SCREEN
   ============================================ */

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-header {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h2 {
    font-size: 20px;
    color: #fff;
}

.live-badge {
    font-size: 12px;
    color: #4CAF50;
}

.header-right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.modern-select {
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.modern-select:focus {
    border-color: #4CAF50;
}

.modern-select option {
    background: #1a1a2e;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    gap: 14px;
    animation: fadeLeft 0.3s ease;
}

.message.user {
    flex-direction: row-reverse;
    animation: fadeRight 0.3s ease;
}

.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.message.user .avatar {
    background: linear-gradient(135deg, #1A237E, #3949AB);
}

.message .content {
    max-width: 75%;
    padding: 14px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
}

.message.user .content {
    background: rgba(46,125,50,0.2);
    border: 1px solid rgba(76,175,80,0.2);
}

.message .content ul {
    padding-left: 20px;
    margin: 8px 0;
}

.message .content ul li {
    margin: 4px 0;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
    background: rgba(255,255,255,0.05);
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.chat-input-area input::placeholder {
    color: rgba(255,255,255,0.3);
}

.voice-btn,
.send-btn,
.pdf-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-btn {
    background: rgba(244,67,54,0.2);
    color: #f44336;
}

.voice-btn:hover {
    background: rgba(244,67,54,0.3);
}

.voice-btn.active {
    background: #f44336;
    color: #fff;
    animation: pulse 0.5s infinite;
}

.send-btn {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: #fff;
}

.send-btn:hover {
    transform: scale(1.05);
}

.pdf-btn {
    background: rgba(255,193,7,0.2);
    color: #FFC107;
}

.pdf-btn:hover {
    background: rgba(255,193,7,0.3);
}

.voice-status {
    text-align: center;
    padding: 5px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    min-height: 30px;
}

/* ============================================
   LIVE CLASS
   ============================================ */

.live-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.live-header {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.live-header h2 {
    font-size: 20px;
}

.live-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.live-classroom {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 15px;
    min-height: 500px;
}

.teacher-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.teacher-avatar-container {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius);
}

.teacher-avatar-3d {
    width: 100px;
    height: 140px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.teacher-avatar-3d .teacher-head {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    background: radial-gradient(ellipse at 30% 30%, #f5d0b8, #d4a574);
    border-radius: 50%;
    position: relative;
}

.teacher-avatar-3d .eyes {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding-top: 18px;
}

.teacher-avatar-3d .eye {
    width: 10px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.teacher-avatar-3d .eye::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #2d1b0e;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 2px;
}

.teacher-avatar-3d .mouth {
    width: 14px;
    height: 5px;
    border-bottom: 3px solid #8d5a3a;
    border-radius: 0 0 50% 50%;
    margin: 8px auto 0;
}

.teacher-avatar-3d .teacher-body {
    width: 45px;
    height: 55px;
    margin: -3px auto 0;
    background: linear-gradient(180deg, #1a237e, #283593);
    border-radius: 8px 8px 0 0;
    position: relative;
}

.teacher-avatar-3d .hand {
    width: 14px;
    height: 24px;
    background: radial-gradient(ellipse at 30% 30%, #f5d0b8, #d4a574);
    border-radius: 20% 20% 50% 50%;
    position: absolute;
    top: 0;
}

.teacher-avatar-3d .left-hand {
    left: -12px;
    animation: handWave 3s ease-in-out infinite;
}

.teacher-avatar-3d .right-hand {
    right: -12px;
    animation: handWave 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

.teacher-info h3 {
    font-size: 18px;
    color: #fff;
}

.teacher-info p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.blackboard {
    flex: 1;
    padding: 20px;
    background: linear-gradient(145deg, #1a3a2a, #2B5B3A);
    border: 8px solid #5a3a1a;
    border-radius: 12px;
    min-height: 300px;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.board-content {
    min-height: 200px;
    color: white;
    font-size: 16px;
    line-height: 1.8;
    font-family: 'Courier New', monospace;
}

.board-content .welcome-text {
    color: #A5D6A7;
    text-align: center;
    font-size: 18px;
}

.board-content .step {
    color: #FFD54F;
    margin: 5px 0;
}

.board-content .formula {
    color: #81D4FA;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin: 8px 0;
}

.board-content .answer {
    color: #69F0AE;
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    margin: 8px 0;
}

.live-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.live-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
}

.live-msg {
    padding: 10px 14px;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.live-msg.teacher {
    background: rgba(46,125,50,0.15);
}

.live-msg.student {
    background: rgba(33,150,243,0.1);
    flex-direction: row-reverse;
}

.live-msg .msg-avatar {
    font-size: 18px;
}

.live-msg .msg-text {
    color: rgba(255,255,255,0.8);
    word-break: break-word;
}

.live-input-area {
    display: flex;
    gap: 10px;
    padding: 10px;
}

.live-input-area input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 25px;
    color: #fff;
    outline: none;
    font-size: 14px;
}

.live-input-area input::placeholder {
    color: rgba(255,255,255,0.3);
}

.live-input-area input:focus {
    border-color: #4CAF50;
}

.voice-live-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: rgba(244,67,54,0.2);
    color: #f44336;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.voice-live-btn:hover {
    background: rgba(244,67,54,0.3);
}

/* ============================================
   CAMERA SCAN
   ============================================ */

.scan-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scan-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.camera-container {
    position: relative;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 300px;
}

#video {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
}

.scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 60%;
    border: 2px solid #4CAF50;
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
    animation: pulse 2s infinite;
    pointer-events: none;
}

.scan-instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scan-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.scan-result {
    padding: 20px;
    margin-top: 15px;
}

.scan-result h3 {
    color: #fff;
    margin-bottom: 10px;
}

#solutionContent {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    white-space: pre-wrap;
}

.scan-result .btn-modern-outline {
    margin-top: 10px;
    margin-right: 10px;
}

/* ============================================
   COURSES SCREEN
   ============================================ */

.courses-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.courses-header {
    padding: 25px;
    text-align: center;
}

.courses-header h2 {
    font-size: 28px;
}

.courses-header p {
    color: rgba(255,255,255,0.5);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.course-card {
    padding: 25px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: rgba(255,255,255,0.03);
}

.course-card:hover {
    transform: translateY(-8px);
    border-color: rgba(76,175,80,0.3);
    background: rgba(255,255,255,0.06);
}

.course-card .course-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.course-card h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 6px;
}

.course-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
}

.course-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}

.course-badge.Popular {
    background: rgba(255,193,7,0.2);
    color: #FFC107;
}

.course-badge.Trending {
    background: rgba(76,175,80,0.2);
    color: #4CAF50;
}

.course-badge.New {
    background: rgba(33,150,243,0.2);
    color: #2196F3;
}

.course-badge.Creative {
    background: rgba(156,39,176,0.2);
    color: #CE93D8;
}

.course-badge.Pro {
    background: rgba(255,152,0,0.2);
    color: #FF9800;
}

.course-badge.Advanced {
    background: rgba(244,67,54,0.2);
    color: #ef5350;
}

/* ============================================
   PROFILE SCREEN
   ============================================ */

.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-header {
    padding: 20px;
    margin-bottom: 15px;
}

.profile-header h2 {
    font-size: 24px;
}

.profile-card {
    padding: 30px;
    text-align: center;
}

.profile-avatar-large {
    position: relative;
    width: 120px;
    margin: 0 auto 20px;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    border: 3px solid rgba(255,255,255,0.1);
}

.change-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2E7D32;
    border: 2px solid #0a0a1a;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.change-avatar:hover {
    background: #4CAF50;
    transform: scale(1.1);
}

.profile-card h3 {
    font-size: 22px;
    color: #fff;
}

.profile-card>p {
    color: rgba(255,255,255,0.5);
    margin-bottom: 15px;
}

.profile-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 15px 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

.detail-item i {
    width: 24px;
    color: #4CAF50;
}

.detail-item span {
    color: rgba(255,255,255,0.8);
}

.profile-gender {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.profile-gender label {
    display: block;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.gender-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gender-btn {
    padding: 8px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: var(--transition);
}

.gender-btn:hover {
    border-color: #4CAF50;
    color: #fff;
}

.gender-btn.active {
    background: rgba(46,125,50,0.3);
    border-color: #4CAF50;
    color: #4CAF50;
}

.profile-version {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin: 10px 0;
}

.profile-version i {
    color: #4CAF50;
}

.profile-version span {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    background: rgba(10,10,26,0.95);
}

.modal-content .close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.modal-content .close:hover {
    color: #fff;
}

.modal-content h2 {
    color: #fff;
    margin-bottom: 15px;
}

.doc-content {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.doc-content h3 {
    color: #4CAF50;
    margin: 15px 0 8px;
}

.doc-content ul {
    padding-left: 20px;
}

.doc-content ul li {
    margin: 5px 0;
}

.course-content {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.course-content .course-hero {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.course-content .course-hero .icon {
    font-size: 64px;
}

.course-content .course-hero h3 {
    font-size: 24px;
    color: #fff;
}

.course-content .course-hero p {
    color: rgba(255,255,255,0.5);
}

.course-content .course-modules {
    margin-top: 20px;
}

.course-content .module {
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 10px;
}

.course-content .module h4 {
    color: #4CAF50;
}

.course-content .module p {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet & Small Laptop */
@media (max-width: 1024px) {
    .live-classroom {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Mobile & Tablet */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 70px;
    }

    .main-nav {
        padding: 10px;
    }

    .logo-text,
    .version-badge,
    .user-details,
    .nav-btn span,
    .footer-links,
    .copyright,
    .hilmux-link,
    .logout-btn span {
        display: none;
    }

    .nav-btn {
        justify-content: center;
        padding: 12px;
    }

    .nav-btn i {
        font-size: 20px;
        width: auto;
    }

    .user-info {
        padding: 8px;
        justify-content: center;
    }

    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .main-content {
        margin-left: var(--sidebar-width);
        padding: 10px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .chat-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-right {
        flex-wrap: wrap;
    }

    .header-right select {
        flex: 1;
        min-width: 80px;
    }

    .chat-messages {
        height: 300px;
    }

    .message .content {
        max-width: 90%;
        font-size: 13px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions button {
        width: 100%;
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
        justify-content: center;
    }

    .scan-frame {
        width: 90%;
        height: 70%;
    }

    .teacher-avatar-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .teacher-avatar-3d {
        width: 80px;
        height: 110px;
    }

    .teacher-avatar-3d .teacher-head {
        width: 50px;
        height: 50px;
    }

    .teacher-avatar-3d .eyes {
        gap: 12px;
        padding-top: 14px;
    }

    .teacher-avatar-3d .eye {
        width: 8px;
        height: 10px;
    }

    .teacher-avatar-3d .teacher-body {
        width: 35px;
        height: 45px;
    }

    .teacher-avatar-3d .hand {
        width: 12px;
        height: 18px;
    }

    .teacher-avatar-3d .left-hand {
        left: -10px;
    }

    .teacher-avatar-3d .right-hand {
        right: -10px;
    }

    .live-classroom {
        grid-template-columns: 1fr;
    }

    .live-controls {
        flex-wrap: wrap;
    }

    .live-controls select {
        flex: 1;
        min-width: 100px;
    }

    .profile-card {
        padding: 20px;
    }

    .avatar-circle {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }

    .profile-avatar-large {
        width: 80px;
    }

    .change-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    :root {
        --sidebar-width: 60px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .chat-messages {
        height: 220px;
    }

    .chat-input-area {
        flex-wrap: wrap;
    }

    .chat-input-area input {
        width: 100%;
    }

    .voice-btn,
    .send-btn,
    .pdf-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .message .content {
        font-size: 12px;
        padding: 10px 14px;
    }

    .board-content {
        font-size: 14px;
    }

    .board-content .formula {
        font-size: 18px;
    }

    .board-content .answer {
        font-size: 20px;
    }

    .live-msg {
        font-size: 12px;
        padding: 8px 12px;
    }

    .modern-select {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 70px;
    }

    .btn-modern,
    .btn-modern-outline {
        font-size: 12px;
        padding: 8px 16px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-icon {
        font-size: 28px;
    }

    .stat-info h3 {
        font-size: 18px;
    }

    .dash-card {
        padding: 18px;
    }

    .dash-card .card-icon {
        font-size: 32px;
    }

    .profile-card h3 {
        font-size: 18px;
    }

    .gender-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .chat-input-area,
    .voice-btn,
    .send-btn,
    .pdf-btn,
    .action-buttons,
    .profile-actions {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 20px !important;
    }

    .chat-messages {
        height: auto !important;
        overflow: visible !important;
    }

    .screen {
        min-height: auto !important;
    }

    .glass {
        background: white !important;
        backdrop-filter: none !important;
        border: 1px solid #ddd !important;
        color: #333 !important;
    }

    .message .content {
        background: #f5f5f5 !important;
        color: #333 !important;
    }

    .message.user .content {
        background: #e3f2fd !important;
        color: #333 !important;
    }

    .board-content {
        color: #333 !important;
    }

    .board-content .step {
        color: #ff6f00 !important;
    }

    .board-content .formula {
        color: #0d47a1 !important;
    }

    .board-content .answer {
        color: #1b5e20 !important;
    }

    .blackboard {
        background: #f5f5f5 !important;
        border-color: #ddd !important;
        box-shadow: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: light) {
    body {
        background: #f5f5f5;
        color: #333;
    }

    .glass {
        background: rgba(255,255,255,0.8);
        border-color: rgba(0,0,0,0.1);
    }

    .main-nav {
        background: rgba(255,255,255,0.95);
        border-color: rgba(0,0,0,0.05);
    }

    .nav-btn {
        color: rgba(0,0,0,0.6);
    }

    .nav-btn:hover {
        background: rgba(0,0,0,0.05);
        color: #000;
    }

    .nav-btn.active {
        background: rgba(46,125,50,0.1);
        color: #2E7D32;
    }

    .user-details span:first-child {
        color: #333;
    }

    .chat-messages {
        background: rgba(255,255,255,0.3);
    }

    .message .content {
        background: rgba(0,0,0,0.05);
        color: #333;
    }

    .message.user .content {
        background: rgba(46,125,50,0.1);
        color: #1B5E20;
    }

    .modern-select {
        color: #333;
        background: rgba(255,255,255,0.8);
    }

    .modern-select option {
        background: #fff;
    }

    .chat-input-area input {
        color: #333;
    }

    .chat-input-area input::placeholder {
        color: rgba(0,0,0,0.3);
    }

    .profile-card h3 {
        color: #333;
    }

    .detail-item span {
        color: #333;
    }

    .profile-gender label {
        color: #333;
    }

    .gender-btn {
        color: rgba(0,0,0,0.6);
    }

    .gender-btn:hover {
        color: #000;
    }

    .gender-btn.active {
        color: #2E7D32;
    }

    .profile-version span {
        color: #333;
    }

    .modal-content {
        background: rgba(255,255,255,0.95);
    }

    .modal-content h2 {
        color: #333;
    }

    .doc-content {
        color: #333;
    }

    .doc-content h3 {
        color: #2E7D32;
    }

    .course-content {
        color: #333;
    }

    .course-content .course-hero h3 {
        color: #333;
    }

    .course-content .module h4 {
        color: #2E7D32;
    }

    .dash-card h4 {
        color: #333;
    }

    .dash-card p {
        color: rgba(0,0,0,0.5);
    }

    .stat-info h3 {
        color: #333;
    }

    .stat-info p {
        color: rgba(0,0,0,0.5);
    }

    .courses-header h2 {
        color: #333;
    }

    .courses-header p {
        color: rgba(0,0,0,0.5);
    }

    .course-card h3 {
        color: #333;
    }

    .course-card p {
        color: rgba(0,0,0,0.5);
    }

    .live-header h2 {
        color: #333;
    }

    .teacher-info h3 {
        color: #333;
    }

    .teacher-info p {
        color: rgba(0,0,0,0.5);
    }

    .live-msg .msg-text {
        color: #333;
    }

    .scan-result h3 {
        color: #333;
    }

    #solutionContent {
        color: #333;
    }

    .footer-links a {
        color: rgba(0,0,0,0.4);
    }

    .footer-links a:hover {
        color: #2E7D32;
    }

    .copyright {
        color: rgba(0,0,0,0.2);
    }

    .hilmux-link {
        color: #2E7D32;
    }

    .loading-screen {
        background: linear-gradient(135deg, #f5f5f5, #e8f5e9);
    }

    .loading-content h1 {
        -webkit-text-fill-color: #2E7D32;
    }

    .loading-content p {
        color: #666;
    }

    .loader {
        border-color: rgba(0,0,0,0.1);
        border-top-color: #2E7D32;
    }
}