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

:root {
    --primary: #2c3e50;
    --secondary: #27ae60;
    --accent: #e67e22;
    --background: #f4f7f6;
    --card-bg: #ffffff;
    --text: #2d3436;
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f1c40f;
    --glass: rgba(255, 255, 255, 0.8);
}

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

body {
    font-family: 'Noto Sans Arabic', sans-serif;
    background-color: var(--background);
    color: var(--text);
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Glassmorphism Navbar */
nav {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

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

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

/* Grid for classes */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.class-card {
    background: var(--primary);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

/* Attendance Toggle */
.attendance-list {
    list-style: none;
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

/* Mobile Responsive Attendance */
@media (max-width: 500px) {
    .student-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .status-toggle {
        width: 100%;
        justify-content: space-between;
    }
    .status-btn {
        width: 50px;
        height: 50px;
    }
}

.status-toggle {
    display: flex;
    gap: 10px;
}

.status-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.status-btn.active.present { background: var(--success); color: white; border-color: var(--success); }
.status-btn.active.absent { background: var(--danger); color: white; border-color: var(--danger); }
.status-btn.active.leave { background: var(--warning); color: white; border-color: var(--warning); }
.status-btn.active.online { background: #3498db; color: white; border-color: #3498db; }

/* Table Styles */
table th, table td {
    text-align: center;
    vertical-align: middle;
}
.card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: 1px solid rgba(0,0,0,0.05);
}

.class-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

.class-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Transitions */
* { transition: all 0.2s ease-in-out; }

/* Mobile specific fixes */
@media (max-width: 600px) {
    h1 { font-size: 1.5rem; }
    .card { padding: 15px; }
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    animation: fadeIn 0.5s ease-out;
}
