:root {
    --bg-primary: #05070a;
    --bg-secondary: #0f121a;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --success: #10b981;
    --danger: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(5, 7, 10, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

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

.animate-up {
    animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Auth Section */
.auth-container {
    max-width: 450px;
    margin: 4rem auto;
    padding: 3rem;
}

h1 { font-size: 2.5rem; margin-bottom: 0.5rem; font-weight: 800; }
.subtitle { color: var(--text-secondary); margin-bottom: 2rem; }

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

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

input, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

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

.course-card {
    padding: 2rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.course-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* QR Section */
.qr-view {
    text-align: center;
    max-width: 600px;
    margin: 2rem auto;
    padding: 3rem;
}

.qr-box {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    display: inline-block;
    margin: 2rem 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.pin-display {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 8px;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    margin: 1.5rem 0;
}

/* Attendance List */
.attendance-list {
    margin-top: 3rem;
    text-align: left;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border);
}

.status-present {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--success);
}

/* Utility */
.hidden { display: none !important; }

/* Status Bar */
.status-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (max-width: 640px) {
    .container { padding: 1rem; }
    .auth-container { padding: 1.5rem; margin-top: 2rem; }
    h1 { font-size: 1.75rem; }
    .pin-display { font-size: 2rem; }
}
