:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #e0e7ff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===============================
   NAVBAR + HAMBURGER MENU
   =============================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-links a.btn {
    color: white;
}

/* Hamburger toggle */
.nav-toggle-checkbox {
    display: none;
}

.nav-toggle-label {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 110;
}

.nav-toggle-label span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.23);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background-color: var(--bg-main);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.05), transparent 40%),
                radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.05), transparent 40%);
}

.hero-content {
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--secondary);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    background-color: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--text-muted);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Page Layout for forms/admin */
.page-container {
    padding-top: 6rem;
    min-height: calc(100vh - 200px);
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 2rem auto 4rem;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: white;
}

.dynamic-section {
    display: none;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-color);
}

.dynamic-section.active {
    display: block;
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

/* ===============================
   ADMIN DASHBOARD STYLES
   =============================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-card-gradient-1 { border-left: 4px solid #4f46e5; }
.stat-card-gradient-1 .stat-icon { background: #e0e7ff; }

.stat-card-gradient-2 { border-left: 4px solid #f59e0b; }
.stat-card-gradient-2 .stat-icon { background: #fef3c7; }

.stat-card-gradient-3 { border-left: 4px solid #06b6d4; }
.stat-card-gradient-3 .stat-icon { background: #cffafe; }

.stat-card-gradient-4 { border-left: 4px solid #10b981; }
.stat-card-gradient-4 .stat-icon { background: #d1fae5; }

.stat-card-gradient-5 { border-left: 4px solid #ef4444; }
.stat-card-gradient-5 .stat-icon { background: #fee2e2; }

.stat-title {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Admin Search Bar */
.admin-search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-field {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-select {
    min-width: 160px;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.admin-tab {
    padding: 0.875rem 1.5rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--primary);
    background-color: rgba(79, 70, 229, 0.04);
}

.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Tab Panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Data Card */
.data-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 2rem;
}

.data-card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-main);
}

.data-table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    color: var(--text-main);
    font-size: 0.95rem;
}

tbody tr:hover {
    background-color: #f1f5f9;
}

.clickable-row {
    cursor: pointer;
    transition: background 0.15s;
}

.clickable-row:hover {
    background-color: rgba(79, 70, 229, 0.04) !important;
}

/* User Avatar */
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Grade Badges */
.grade-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.give-badge {
    background: #d1fae5;
    color: #059669;
}

.take-badge {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Match Score */
.match-score-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.match-score-bar {
    width: 80px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.match-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending { background-color: #fef3c7; color: #d97706; }
.status-matched { background-color: #e0e7ff; color: #4f46e5; }
.status-completed { background-color: #d1fae5; color: #059669; }
.status-cancelled { background-color: #fee2e2; color: #dc2626; }

/* Action Buttons */
.action-group {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.action-complete {
    background-color: #d1fae5;
    color: #059669;
}

.action-complete:hover {
    background-color: #10b981;
    color: white;
}

.action-cancel {
    background-color: #fef3c7;
    color: #d97706;
}

.action-cancel:hover {
    background-color: #f59e0b;
    color: white;
}

.action-delete {
    background-color: #fee2e2;
    color: #dc2626;
}

.action-delete:hover {
    background-color: #ef4444;
    color: white;
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: none;
    font-weight: 500;
}

.alert.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
    display: block;
}

.alert.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
    display: block;
}

/* Activity Log */
.activity-log {
    max-height: 500px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.activity-item:hover {
    background: var(--bg-main);
}

.activity-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
}

.activity-info strong {
    font-size: 0.95rem;
}

.activity-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ===============================
   MODAL
   =============================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-main);
    color: var(--text-main);
}

.modal-body {
    padding: 2rem;
}

.modal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.modal-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.modal-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
}

/* ===============================
   ABOUT PAGE STYLES
   =============================== */
.about-hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(236, 72, 153, 0.04));
    padding: 9rem 2rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.about-hero-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    top: -50px;
    right: -80px;
    animation: floatShape 8s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #ec4899, #f472b6);
    bottom: -30px;
    left: -40px;
    animation: floatShape 6s ease-in-out infinite reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    top: 40%;
    left: 15%;
    animation: floatShape 10s ease-in-out infinite;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* About Stats */
.about-stats-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.about-stat-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    position: relative;
}

.about-stat-card:hover {
    transform: translateY(-5px);
}

.about-stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.about-stat-card:hover .about-stat-icon {
    transform: scale(1.1);
}

.about-stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    display: inline;
}

.about-stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    display: inline;
}

.about-stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* About Content */
.about-content-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-content-inner {
    max-width: 800px;
    margin: 0 auto;
}

.about-content-inner h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.about-content-inner p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* How We Help */
.about-help-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    max-width: 100%;
}

.about-help-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-help-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-help-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.about-help-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-help-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.about-help-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Timeline */
.about-timeline-section {
    padding: 5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.about-timeline {
    position: relative;
    padding-left: 2.5rem;
}

.about-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), #ec4899);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2.25rem;
    top: 0.25rem;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.timeline-content {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
}

.timeline-content h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Team Section */
.about-team-section {
    padding: 5rem 2rem;
    max-width: 100%;
    background: white;
    border-top: 1px solid var(--border-color);
}

.about-team-inner {
    max-width: 900px;
    margin: 0 auto;
}

.about-team-inner h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.about-team-inner > p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-courses-box {
    margin: 3rem 0;
    padding: 2.5rem;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.about-courses-box h3 {
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
}

.about-courses-box > p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.about-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.about-course-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-course-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.about-course-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-course-card:hover .about-course-icon {
    transform: scale(1.08);
    box-shadow: var(--shadow-sm);
}

.about-course-card h4 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.about-course-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===============================
   RESPONSIVE DESIGN
   =============================== */

/* Tablet */
@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-help-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Landscape / Small Tablet */
@media (max-width: 768px) {
    /* Hamburger Menu */
    .nav-toggle-label {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: white;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 105;
        align-items: flex-start;
    }

    .nav-toggle-checkbox:checked ~ .nav-links {
        right: 0;
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: rotate(45deg) translateY(5.5px) translateX(5.5px);
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle-label span:nth-child(3) {
        transform: rotate(-45deg) translateY(-5.5px) translateX(5.5px);
    }

    .nav-links a.btn {
        width: 100%;
        text-align: center;
    }

    /* General */
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 7rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-large {
        width: 100%;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Form */
    .form-container {
        padding: 2rem 1.5rem;
        margin: 1.5rem 1rem 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Admin */
    .admin-header {
        flex-direction: column;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-search-bar {
        flex-direction: column;
    }

    .search-input-wrapper {
        min-width: unset;
    }

    .admin-tabs {
        gap: 0;
    }

    .admin-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    /* About */
    .about-hero {
        padding: 7rem 1.5rem 3rem;
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .about-stat-card {
        padding: 1.75rem 1rem;
    }

    .about-stat-number {
        font-size: 2.25rem;
    }

    .about-help-grid {
        grid-template-columns: 1fr;
    }

    .about-content-inner h2,
    .about-team-inner h2 {
        font-size: 2rem;
    }

    .about-courses-box {
        padding: 1.5rem;
    }

    /* Modal */
    .modal-overlay {
        padding: 1rem;
        align-items: flex-end;
    }

    .modal-content {
        max-height: 85vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .modal-detail-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .nav-container {
        padding: 1rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 1.85rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .about-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .about-stat-number {
        font-size: 2rem;
    }

    .about-stat-label {
        font-size: 0.85rem;
    }

    .about-courses-grid {
        grid-template-columns: 1fr;
    }

    .about-timeline {
        padding-left: 2rem;
    }

    .timeline-content {
        padding: 1rem 1.25rem;
    }

    .admin-tab {
        padding: 0.625rem 0.75rem;
        font-size: 0.8rem;
    }

    .data-card-header {
        padding: 1rem 1.25rem;
    }

    .form-container {
        padding: 1.5rem 1rem;
        margin: 1rem 0.5rem 2rem;
        border-radius: var(--radius-md);
    }
}

/* ===============================
   ALGORITHM PAGE STYLES
   =============================== */
.algo-hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(236, 72, 153, 0.04));
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.algo-hero-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.algo-hero * {
    position: relative;
    z-index: 1;
}

.algo-overview-section, .algo-factors-section, .algo-score-section, .algo-example-section, .algo-features-section, .algo-cta-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* AI Flow */
.algo-flow {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 3rem;
}

.algo-flow-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.algo-flow-number {
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 1.5rem;
}

.algo-flow-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.algo-flow-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.algo-flow-step p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.algo-flow-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem;
}

/* Factors */
.algo-factors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.algo-factor-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.algo-factor-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.algo-factor-required {
    border-color: #ef4444;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.1);
}

.algo-factor-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    align-self: flex-start;
    background: #fee2e2;
    color: #b91c1c;
}

.algo-tag-green { background: #d1fae5; color: #047857; }
.algo-tag-blue { background: #dbeafe; color: #1d4ed8; }

.algo-factor-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.algo-factor-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.algo-factor-detail {
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.algo-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.algo-detail-row:last-child {
    margin-bottom: 0;
}

.algo-detail-label {
    font-weight: 600;
    color: var(--text-muted);
}

.algo-detail-value {
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

.algo-required-text {
    color: #ef4444;
    font-weight: 700;
}

/* Score breakdown */
.algo-score-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.algo-score-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.algo-score-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.algo-score-excellent {
    border-left: 4px solid #059669;
}

.algo-score-good {
    border-left: 4px solid #d97706;
}

.algo-score-fair {
    border-left: 4px solid #4f46e5;
}

.algo-score-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.algo-score-emoji {
    font-size: 1.5rem;
}

.algo-score-card h3 {
    font-size: 1.5rem;
}

.algo-score-range {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.algo-score-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    min-height: 80px;
}

.algo-score-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-main);
    border-radius: 4px;
    overflow: hidden;
}

.algo-score-fill {
    height: 100%;
    border-radius: 4px;
}

/* Example Box */
.algo-example-box {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.algo-example-users {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    padding: 3rem;
    background: var(--bg-main);
    align-items: center;
}

.algo-example-user {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.algo-example-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1rem;
}

.algo-example-user h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.algo-example-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: left;
}

.algo-example-details p {
    margin-bottom: 0.5rem;
}

.algo-example-match-arrow {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.algo-example-arrow-line {
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.algo-example-arrow-badge {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.algo-example-scoring {
    padding: 3rem;
}

.algo-example-scoring h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.algo-scoring-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.algo-scoring-check {
    color: #059669;
    font-weight: 700;
}

.algo-scoring-points {
    color: #4f46e5;
    font-weight: 800;
}

.algo-scoring-total {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    margin-top: 1rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.algo-scoring-total-value {
    color: #059669;
}

/* Features AI */
.algo-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.algo-feature-item {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.algo-feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.algo-feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    border: 1px solid var(--border-color);
}

.algo-feature-item h3 {
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.algo-feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.algo-cta-section {
    background: var(--primary);
    color: white;
    text-align: center;
    border-radius: var(--radius-lg);
    margin-bottom: 5rem;
}

.algo-cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.algo-cta-content p {
    color: #e0e7ff;
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive updates for algo page */
@media (max-width: 1024px) {
    .algo-flow {
        flex-direction: column;
        align-items: center;
    }
    
    .algo-flow-connector {
        transform: rotate(90deg);
        padding: 2rem 0;
    }

    .algo-factors-grid, .algo-score-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .algo-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .algo-factors-grid, .algo-score-grid {
        grid-template-columns: 1fr;
    }

    .algo-example-users {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }

    .algo-example-match-arrow {
        flex-direction: column;
    }

    .algo-example-arrow-line {
        width: 3px;
        height: 20px;
    }
    
    .algo-example-scoring {
        padding: 2rem;
    }

    .algo-features-grid {
        grid-template-columns: 1fr;
    }
}
