:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --success: #10b981;
    --error: #ef4444;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    animation-delay: -10s;
}

@keyframes move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

.glass-container {
    width: 90%;
    max-width: 1200px;
    min-height: 80vh;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 1rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.search-section {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.input-group {
    display: flex;
    width: 100%;
    position: relative;
    gap: 1rem;
}

input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.1);
}

button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

button:active {
    transform: translateY(0);
}

.error-msg {
    color: var(--error);
    min-height: 1.5rem;
    font-weight: 500;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.student-info-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.info-label {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

#studentName {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

#displayRegNo {
    font-size: 1.5rem;
    font-weight: 400;
}

.timetable-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media(min-width: 900px) {
    .timetable-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.timetable-section {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    animation: slideUp 0.6s ease;
}

.section-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.section-header .icon {
    font-size: 1.5rem;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.theory-section .section-header {
    border-left: 4px solid var(--primary);
}

.practical-section .section-header {
    border-left: 4px solid var(--secondary);
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.hidden {
    display: none !important;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media(max-width: 600px) {
    .glass-container {
        padding: 1.5rem;
        width: 95%;
    }

    header h1 {
        font-size: 2rem;
    }

    .input-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}

.actions-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.download-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    width: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: white;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-dim);
    transform: translateY(-2px);
}

.download-btn .icon {
    font-size: 1.2rem;
}

@media print {
    .glass-container {
        box-shadow: none;
        border: none;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        background: white;
    }

    .actions-bar,
    .search-section,
    header p,
    .background-blobs {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .student-info-card,
    .timetable-section {
        background: white;
        color: black;
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .timetable-section {
        opacity: 1;
        transform: none;
        page-break-inside: avoid;
    }

    table th,
    table td {
        color: black;
        border-bottom-color: #ccc;
    }

    #studentName,
    #displayRegNo {
        color: black;
    }

    .badge {
        border-color: #000;
        color: #000;
        background: none;
    }
}