:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary: #64748b;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.app-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Section */
header {
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.project-details {
    margin: 1.5rem 0;
}

.project-details h2 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-main);
}

.sub-heading {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.25rem;
}

.batch-badge {
    display: inline-block;
    background: rgba(168, 85, 247, 0.15);
    /* Purple tint */
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 0.75rem;
}

.date-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    margin-top: 1rem;
}

/* Footer */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem 0;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dev-tag {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 1s ease-out;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.text-primary {
    color: #818cf8;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

/* Main Controls */
.controls-section {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.8s ease-out;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

input[type="number"],
input[type="time"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
}

input[type="time"] {
    flex: 0 0 auto;
    /* Don't grow too wide, but be flexible if needed */
    width: 160px;
    /* Suggest a reasonable width */
    cursor: pointer;
}

input[type="number"]:focus,
input[type="time"]:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Actions Bar */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.class-time-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* List/Table */
.list-container {
    margin-top: 2rem;
}

.student-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.student-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out forwards;
    transition: background 0.2s;
}

.student-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.roll-number {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    min-width: 60px;
}

.time-stamp {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-present {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-late {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .app-container {
        padding: 0.5rem;
        gap: 1rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .project-details h2 {
        font-size: 1.1rem;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .btn-primary {
        width: 100%;
        padding: 1rem;
    }

    .actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .student-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        position: relative;
    }

    .delete-btn {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .app-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}