:root {
    --primary: #8e44ad;
    --primary-light: #9b59b6;
    --text: #e0e0e0;
    --text-secondary: #b0b0b0;
    --bg: #121212;
    --card-bg: #1e1e1e;
    --border: #333;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease;
    overflow-x: hidden;
}

header {
    width: 100%;
    background: var(--card-bg);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.school-title {
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    margin: 0 auto;
    flex: 1;
}

.login-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
    border: 1px solid var(--border);
}

h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.5rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 0.75rem;
    background: #2a2a2a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: border 0.3s;
}

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

button {
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 0.75rem;
    width: 100%;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

.error-message {
    color: var(--danger);
    margin: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    min-height: 40px;
}

/* Dashboard Styles */
#student-dashboard {
    display: none;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    animation: fadeIn 0.5s ease;
}

.dashboard-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-card {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--primary);
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}

/* Profile Controls */
#parent-controls {
    display: none;
    position: relative;
}

#profile-btn {
    background: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid var(--card-bg);
    cursor: pointer;
}

#profile-btn i {
    font-size: 1.5rem;
    color: white;
}

#profile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#profile-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    width: 280px;
    z-index: 1001;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

#student-selector {
    width: 100%;
    padding: 0.6rem;
    background: #2a2a2a;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
}

#logout-btn {
    width: 100%;
    padding: 0.7rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#logout-btn:hover {
    background: #c0392b;
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.has-notification::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    animation: pulse 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-container {
        padding: 15px;
    }
    
    .login-container, #student-dashboard {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }
    
    .school-title {
        font-size: 1.2rem;
    }
    
    .login-container, #student-dashboard {
        padding: 1.25rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
}