@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #1e293b;
    --primary-color: #e53935;
    --primary-hover: #c62828;
    --secondary-color: #f8fafc;
    --accent-color: #ff8a80;
    --danger-color: #475569;
    --success-color: #10b981;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(229, 57, 53, 0.2);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.9)),
        url('../img/bg_real.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3sease, color 0.3s ease;
}

/* --- DARK THEME OVERRIDES --- */
body.dark-theme {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --primary-color: #ef4444; 
    --primary-hover: #dc2626;
    --secondary-color: #1e1e1e;
    --accent-color: #fca5a5;
    --danger-color: #7f1d1d; 
    --success-color: #10b981;
    --glass-bg: rgba(30, 30, 30, 0.9); 
    --glass-border: rgba(239, 68, 68, 0.3);
    
    background-image: 
        linear-gradient(rgba(18, 18, 18, 0.85), rgba(18, 18, 18, 0.95)),
        url('../img/bg_real.jpg'); /* Tahmini url */
}

body.dark-theme h1 {
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-theme input, body.dark-theme select {
    background: rgba(15, 23, 42, 0.8);
    color: white;
}

body.dark-theme .timetable th {
    background: rgba(0,0,0,0.5);
    color: var(--primary-color);
}

body.dark-theme .draggable-item {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

body.dark-theme .tab-btn {
    background: rgba(255,255,255,0.05);
    color: white;
}

/* Glasscard Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Typography elements */
h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #e53935, #b71c1c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Forms and Buttons */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
}

input, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

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

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

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

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

/* Login specific */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    max-width: 400px;
    width: 100%;
}

/* Dashboard / Home specific */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
}

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

.dashboard-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary-color);
}

/* Schedule / Drag Drop Specifics */
.schedule-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

.course-box {
    max-height: 80vh;
    overflow-y: auto;
}

.draggable-item {
    background: rgba(229, 57, 53, 0.05);
    border: 1px solid rgba(229, 57, 53, 0.2);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    cursor: grab;
    transition: background 0.2s ease;
    display: flex;
    flex-direction: column;
}

.draggable-item:hover {
    background: rgba(59, 130, 246, 0.2);
}

.draggable-item.dragging {
    opacity: 0.5;
}

.draggable-item .teacher-name {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.timetable {
    width: 100%;
    border-collapse: collapse;
}

.timetable th, .timetable td {
    border: 1px solid var(--glass-border);
    padding: 10px;
    text-align: center;
    min-width: 120px;
}

.timetable th {
    background: rgba(229, 57, 53, 0.05);
    font-weight: 600;
    color: var(--primary-color);
}

.drop-zone {
    min-height: 60px;
    background: rgba(255,255,255,0.02);
    transition: background 0.2s;
}

.drop-zone.hovered {
    background: rgba(59, 130, 246, 0.15);
    border: 2px dashed var(--primary-color);
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    background: rgba(229, 57, 53, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Filter sections */
.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Delete button over dropped items */
.dropped-item {
    position: relative;
}
.dropped-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}
.dropped-item:hover .remove-btn {
    display: flex;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1); 
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2); 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3); 
}
