:root {
    --primary: #FFDF00;
    --primary-hover: #E6C900;
    --secondary: #004040;
    --secondary-light: #005959;
    --text-main: #FFFFFF;
    --text-muted: #B0C4C4;
    --bg-gradient: linear-gradient(135deg, #002b2b 0%, #004040 100%);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-main: 'Outfit', sans-serif;
    --success: #2ecc71;
    --warning: #fabe2c;
    --danger: #e74c3c;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Utilities */
.hidden { display: none !important; }
.btn {
    cursor: pointer;
    border: none;
    outline: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-sm { padding: 8px 16px; font-size: 0.9rem; background: rgba(255,255,255,0.1); color: white; }
.btn-sm:hover { background: rgba(255,255,255,0.2); }

.btn-primary {
    background: var(--primary);
    color: var(--secondary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 223, 0, 0.3);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.full-width { width: 100%; }

/* Navbar */
.navbar {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 40, 40, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-display {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

/* Main App */
#app {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Center Containers (Auth/Selection Views) */
.center-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    width: 100%;
}

.page-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 40px;
    text-align: center;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 20px;
    align-self: flex-start;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.back-btn:hover { color: var(--primary); }

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 900px;
}

.selection-card {
    background: rgba(255, 255, 255, 0.1); /* Lighter background for better contrast */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center content vertically */
    gap: 20px;
    overflow: hidden; /* Prevent overflow */
}

.selection-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.selection-card img {
    height: auto;
    max-height: 100px; /* Limit height */
    max-width: 90%; /* Limit width to card */
    object-fit: contain; /* Ensure aspect ratio */
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.selection-card h3 {
    font-size: 1.5rem;
    color: white;
}

.selection-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Auth View */
.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 30px;
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    font-size: 1rem;
}

.auth-tab.active {
    color: var(--primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.auth-form h2 {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary);
}


/* Dashboard View */
.welcome-banner {
    padding: 30px;
    margin-bottom: 30px;
    background: linear-gradient(90deg, rgba(255, 223, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    border-left: 5px solid var(--primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    align-items: start;
}

/* Sidebar */
.course-sidebar {
    padding: 20px;
    min-height: 400px;
}

.course-sidebar h3 {
    margin-bottom: 15px;
    color: var(--primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

#work-list {
    list-style: none;
}

.course-item {
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.course-item:hover, .course-item.active {
    background: rgba(255, 223, 0, 0.1);
    border-left: 3px solid var(--primary);
}

.course-item strong {
    display: block;
    margin-bottom: 4px;
}

.course-item small {
    color: var(--text-muted);
}

/* Detail Area */
.course-detail-area {
    padding: 30px;
    min-height: 600px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge {
    background: var(--primary);
    color: var(--secondary);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.header-right {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--glass-border);
    margin: 25px 0;
}

/* Salary Section */
.salary-section h3, .students-section h3 {
    color: var(--primary);
    margin-bottom: 20px;
}

.progress-container {
    margin-bottom: 30px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%; 
    transition: width 1s ease-out;
    box-shadow: 0 0 10px rgba(255, 223, 0, 0.5);
}

.milestones-track {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 30%;
    opacity: 0.4;
    transition: all 0.3s;
}

.milestone.active {
    opacity: 1;
}

.milestone .dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #444;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    border: 2px solid transparent;
}

.milestone.active .dot {
    background: var(--success);
    color: white;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
}

.milestone.locked .dot {
    border-color: var(--text-muted);
}

.milestone .info span {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
}

.milestone .info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Students Grid */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.student-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.student-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.student-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--text-muted);
}

.student-card h4 {
    margin-bottom: 5px;
}

.contact-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.contact-info i {
    color: var(--primary);
    margin-right: 5px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    padding: 40px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--primary);
}

.modal-body {
    margin-top: 20px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .course-sidebar {
        min-height: auto;
    }
    
    .course-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-right {
        text-align: left;
    }
}
