@tailwind base; @tailwind components; @tailwind utilities; /* =========================== Global Variables & Design System =========================== */ :root { /* Colors - Light Mode Default */ --bg-body: #F8FAFC; /* Light Background */ --bg-surface: #FFFFFF; /* White Card Background */ --text-main: #0F172A; /* Dark Text */ --text-secondary: #64748B; /* Secondary Text */ --primary: #3B82F6; /* Primary Blue */ /* Semantic mappings */ --border-color: #E2E8F0; --primary-hover: #2563eb; /* Keeping remaining semantic vars */ --primary-light: #eff6ff; --success: #10b981; --warning: #f59e0b; --error: #ef4444; /* Typography */ --font-main: "Inter", "Prompt", "Sarabun", sans-serif; /* Layout */ --sidebar-width: 260px; --header-height: 64px; --container-max-width: 1440px; --radius-md: 8px; --radius-xl: 24px; /* Shadows */ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1); /* Gradients */ --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); --gradient-surface: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%); --gradient-glow: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%); } /* Dark Mode (applied when `.dark` class is present on ) */ .dark { --bg-body: #0F172A; --bg-surface: #1E293B; /* User requested specific color */ --text-main: #F1F5F9; --text-secondary: #CBD5E1; --border-color: #334155; --neutral-50: #1e293b; --neutral-100: #334155; --neutral-200: #475569; --neutral-300: #64748b; --neutral-400: #94a3b8; --neutral-500: #cbd5e1; --neutral-600: #f1f5f9; --neutral-700: #f8fafc; --neutral-800: #1e293b; --neutral-900: #0f172a; --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.12), 0 2px 6px -2px rgb(0 0 0 / 0.08); --shadow-lg: 0 12px 24px -4px rgb(0 0 0 / 0.15), 0 8px 16px -4px rgb(0 0 0 / 0.1); --shadow-xl: 0 20px 40px -8px rgb(0 0 0 / 0.25); } * { box-sizing: border-box; margin: 0; padding: 0; transition-property: background-color, color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 200ms; } html { background-color: var(--bg-body); color: var(--text-main); } body { font-family: var(--font-main); background-color: var(--bg-body); color: var(--text-main); line-height: 1.5; background-image: radial-gradient(circle at 20% 20%, rgba(75, 130, 247, 0.05), transparent 28%), radial-gradient(circle at 80% 0%, rgba(68, 212, 168, 0.05), transparent 24%); background-attachment: fixed; } a { text-decoration: none; color: #3b82f6; transition: color 0.2s; } a:hover { color: #2563eb; } .dark a { color: #60a5fa; } .dark a:hover { color: #93c5fd; } ul { list-style: none; } /* =========================== Layout Shells =========================== */ /* App Layout (Sidebar + Header) */ .app-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; grid-template-rows: var(--header-height) 1fr; min-height: 100vh; background-color: var(--bg-body); color: var(--text-main); } .dark .app-shell { background-color: #0f172a; color: #f1f5f9; } .app-header { grid-column: 1 / -1; background-color: var(--bg-surface); border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-main); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 40; position: sticky; top: 0; } .dark .app-header { background-color: #1e293b; border-bottom-color: rgba(255, 255, 255, 0.05); color: #f1f5f9; } .menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: #f1f5f9; margin-right: 12px; padding: 4px; } .dark .menu-toggle { color: #f1f5f9; } .app-sidebar { grid-row: 2 / -1; background-color: var(--bg-surface); border-right: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-main); padding: 24px 16px; display: flex; flex-direction: column; height: calc(100vh - var(--header-height)); position: sticky; top: var(--header-height); overflow-y: auto; } .dark .app-sidebar { background-color: #1e293b; border-right-color: rgba(255, 255, 255, 0.05); color: #f1f5f9; } .app-main { grid-column: 2 / -1; padding: 32px; max-width: var(--container-max-width); width: 100%; margin: 0 auto; background-color: var(--bg-body); color: var(--text-main); } .dark .app-main { background-color: #0f172a; color: #f1f5f9; } /* Auth Layout */ .auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background-color: var(--bg-body); color: var(--text-main); padding: 24px; } .dark .auth-shell { background-color: #0f172a; color: #f1f5f9; } /* =========================== Components =========================== */ /* Buttons */ .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: var(--radius-md); font-weight: 500; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; gap: 8px; } .btn-primary { background-color: var(--primary); color: white; } .btn-primary:hover { background-color: var(--primary-hover); } .btn-secondary { background-color: transparent; border-color: #e2e8f0; color: #1e293b; } .btn-secondary:hover { background-color: #f1f5f9; } .dark .btn-secondary { border-color: rgba(255, 255, 255, 0.1); color: #f1f5f9; } .dark .btn-secondary:hover { background-color: rgba(255, 255, 255, 0.05); } .btn-success { background-color: var(--success); color: white; } .btn-success:hover { filter: brightness(90%); } .btn-google { background-color: #ffffff; border: 1px solid #e2e8f0; color: #1e293b; font-weight: 600; padding: 12px 24px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); } .btn-google:hover { background-color: #f8fafc; border-color: #cbd5e1; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); transform: translateY(-1px); } .btn-google:active { transform: translateY(0); background-color: #f1f5f9; } /* Cards */ .card { background-color: var(--bg-surface); color: var(--text-main); border-radius: var(--radius-xl); padding: 24px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.05); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease; } .card:hover { transform: translateY(-4px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); } .dark .card { background-color: #1e293b; color: #f1f5f9; border-color: rgba(255, 255, 255, 0.05); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5); } .dark .card:hover { box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6); } /* Glassmorphism */ .glass { background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); } .glass-dark { background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.05); } /* Gradients Utilities */ .bg-gradient-primary { background: var(--gradient-primary); } .text-gradient { background: linear-gradient(to right, #60a5fa, #34d399); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } /* Forms */ .input-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 8px; color: #f1f5f9; } .input-field { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); /* use variable */ border-radius: var(--radius-md); background-color: var(--bg-surface); /* use variable, defaults to white */ color: var(--text-main); /* use variable, defaults to black */ font-family: inherit; } .input-field:focus { outline: 2px solid #3b82f6; border-color: transparent; } .dark .input-label { color: #f1f5f9; } .dark .input-field { border-color: var(--border-color); background-color: var(--neutral-800); /* dark background */ color: var(--text-main); } .dark .input-field:focus { outline-color: #60a5fa; } /* Nav Items */ .nav-item { display: flex; align-items: center; padding: 12px 16px; border-radius: var(--radius-md); color: #64748b; font-weight: 500; margin-bottom: 4px; transition: all 0.2s; } .nav-item.active { background-color: #eff6ff; color: #3b82f6; } .nav-item:hover:not(.active) { background-color: #f1f5f9; } .dark .nav-item { color: #cbd5e1; } .dark .nav-item.active { background-color: rgba(59, 130, 246, 0.15); color: #60a5fa; } .dark .nav-item:hover:not(.active) { background-color: rgba(255, 255, 255, 0.05); } /* Status Pills */ .status-pill { padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; display: inline-block; } .status-success { background-color: #d1fae5; color: #065f46; } .status-warning { background-color: #fef3c7; color: #92400e; } .status-neutral { background-color: var(--neutral-100); color: var(--neutral-600); } .pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 9999px; border: 1px solid var(--border-color); padding: 4px 12px; font-size: 0.875rem; color: var(--text-secondary); } /* =========================== Grid System =========================== */ .grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; } .col-span-12 { grid-column: span 12 / span 12; } .col-span-9 { grid-column: span 9 / span 9; min-width: 0; } .col-span-8 { grid-column: span 8 / span 8; } .col-span-6 { grid-column: span 6 / span 6; } .col-span-4 { grid-column: span 4 / span 4; } .col-span-3 { grid-column: span 3 / span 3; } /* =========================== Course Grids =========================== */ .course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; width: 100%; min-width: 0; } .course-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-width: 0; } .course-thumb { height: 160px; background: var(--neutral-200); } .my-courses-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; } .recommended-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; } .profile-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; } /* =========================== Utility Classes =========================== */ .flex { display: flex; } .flex-col { flex-direction: column; } .flex-1 { flex: 1 1 0%; } .items-center { align-items: center; } .items-start { align-items: flex-start; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; } .mt-auto { margin-top: auto; } .p-2 { padding: 8px; } .p-3 { padding: 12px; } .p-4 { padding: 16px; } .text-sm { font-size: 0.875rem; } .text-xs { font-size: 0.75rem; } .text-xl { font-size: 1.25rem; } .text-muted { color: var(--text-secondary); } .text-primary { color: var(--primary); } .text-success { color: var(--success); } .text-error { color: var(--error); } .font-bold { font-weight: 700; } .w-full { width: 100%; } .text-center { text-align: center; } .rounded { border-radius: var(--radius-md); } .border-b { border-bottom: 1px solid var(--border-color); } .load-more-wrap { display: flex; justify-content: center; margin-top: 32px; width: 100%; } /* =========================== Responsive Helpers =========================== */ .hidden-mobile { display: block; } .only-mobile { display: none; } /* Mobile Bottom Nav */ .mobile-nav { display: none; } .mobile-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-secondary); font-size: 10px; padding: 8px; flex: 1; text-align: center; } .mobile-nav-item.active { color: var(--primary); } .mobile-nav-item span:first-child { font-size: 20px; } /* Sidebar Overlay */ .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(2px); z-index: 90; } .sidebar-overlay.show { display: block; } /* =========================== Responsive Breakpoints =========================== */ /* Tablet & Mobile */ @media (max-width: 1024px) { .app-shell { grid-template-columns: 1fr; grid-template-rows: var(--header-height) 1fr auto; } .app-sidebar { position: fixed; left: -100%; top: 0; bottom: 0; width: 280px; z-index: 100; transition: left 0.3s ease; box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.1); height: 100vh; } .app-sidebar.open { left: 0; } .menu-toggle { display: block; } .app-main { grid-column: 1 / -1; padding: 20px; } .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .col-span-8, .col-span-9, .col-span-6, .col-span-4, .col-span-3 { grid-column: span 6; } .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; height: 64px; background: var(--bg-surface); border-top: 1px solid var(--border-color); z-index: 50; justify-content: space-around; align-items: center; } body { padding-bottom: 64px; } .my-courses-grid { grid-template-columns: repeat(2, 1fr); } .course-grid { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 768px) { .hidden-mobile { display: none !important; } .only-mobile { display: block !important; } .col-span-8, .col-span-4, .col-span-6 { grid-column: span 12; } } @media (max-width: 640px) { .app-header { padding: 0 16px; } .grid-12 { grid-template-columns: 1fr; gap: 16px; } .col-span-12, .col-span-9, .col-span-8, .col-span-6, .col-span-4, .col-span-3 { grid-column: span 1; } h1 { font-size: 22px !important; } .card { padding: 16px; } .my-courses-grid { grid-template-columns: 1fr; } .course-grid { grid-template-columns: 1fr; } .recommended-grid { grid-template-columns: 1fr; } .profile-info-grid { grid-template-columns: 1fr; gap: 20px; } .mobile-stack { flex-direction: column; align-items: flex-start !important; gap: 12px; } } @media (max-width: 1200px) { .my-courses-grid { grid-template-columns: repeat(3, 1fr); } } @media (max-width: 900px) { .my-courses-grid { grid-template-columns: repeat(2, 1fr); } } /* =========================== Learning Room Layout =========================== */ .learning-shell { display: grid; grid-template-columns: 320px 1fr; grid-template-rows: 56px 1fr; height: 100vh; overflow: hidden; background: #0f172a; color: #f8fafc; } .learning-header { grid-column: 1 / -1; background: #1e293b; border-bottom: 1px solid rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 50; } .learning-sidebar { grid-row: 2; grid-column: 1; background: #111827; border-right: 1px solid rgba(255, 255, 255, 0.05); overflow-y: auto; display: flex; flex-direction: column; height: calc(100vh - 56px); } .lesson-item { padding: 14px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; color: #94a3b8; font-size: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.02); } .lesson-item:hover { background-color: rgba(255, 255, 255, 0.03); } .lesson-item.active { background-color: #1e293b; color: #3b82f6; font-weight: 600; box-shadow: inset 4px 0 0 #3b82f6; } .lesson-item.completed { color: #64748b; } .lesson-item.completed .icon-status { color: #10b981; } .lesson-item.locked { opacity: 0.6; cursor: not-allowed; } .chapter-header { padding: 16px 20px; background: #0f172a; font-weight: 700; font-size: 13px; color: white; border-bottom: 1px solid rgba(255, 255, 255, 0.05); } .main-container { grid-row: 2; grid-column: 2; display: flex; flex-direction: column; overflow-y: auto; background: #0b0e14; height: calc(100vh - 56px); } .video-wrapper { background: #000; width: 100%; aspect-ratio: 16/9; max-height: 70vh; } .content-area { padding: 40px; max-width: 1200px; margin: 0 auto; width: 100%; flex-grow: 1; } .learning-footer { background: #111827; border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; position: sticky; bottom: 0; z-index: 40; } .btn-nav { padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 8px; } .btn-prev { background: rgba(255, 255, 255, 0.05); color: white; border: 1px solid rgba(255, 255, 255, 0.1); } .btn-prev:hover { background: rgba(255, 255, 255, 0.1); } .btn-finish { background: rgba(255, 255, 255, 0.05); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.1); } .btn-finish:hover { border-color: #10b981; color: #10b981; } .btn-next { background: #2563eb; color: white; border: none; } .btn-next:hover { background: #1d4ed8; } /* Learning Room Responsive */ @media (max-width: 1024px) { .learning-shell { grid-template-columns: 1fr; } .learning-sidebar { position: fixed; left: -320px; top: 56px; bottom: 0; width: 320px; z-index: 100; transition: transform 0.3s ease; } .learning-sidebar.open { transform: translateX(320px); } .main-container { grid-column: 1 / -1; } } /* =========================== Certificate Styles =========================== */ .cert-container { background: white; padding: 60px; border-radius: 4px; text-align: center; border: 20px solid #1e293b; outline: 2px solid #d4af37; outline-offset: -10px; width: 100%; max-width: 800px; position: relative; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); color: #1e293b; overflow-y: auto; max-height: 90vh; } .cert-inner { border: 2px solid #d4af37; padding: 40px; position: relative; } .cert-title { font-family: "Prompt", serif; color: #1e293b; margin-bottom: 8px; font-size: 36px; text-transform: uppercase; letter-spacing: 2px; } .cert-name { font-size: 48px; font-weight: 700; color: #1e293b; margin-bottom: 16px; font-family: "Prompt"; } .cert-footer { display: flex; justify-content: space-between; align-items: end; margin-top: 60px; gap: 20px; } @media (max-width: 640px) { .cert-container { padding: 20px; border: 10px solid #1e293b; } .cert-inner { padding: 20px; } .cert-title { font-size: 20px; } .cert-name { font-size: 28px; } .cert-footer { flex-direction: column; align-items: center; margin-top: 30px; } } /* =========================== Empty States =========================== */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; } .empty-state-icon { font-size: 48px; margin-bottom: 16px; } .empty-state-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; } .empty-state-description { color: var(--text-secondary); margin-bottom: 24px; }