:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary: #ec4899;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Visually hidden for accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.1), transparent 50%);
    z-index: -1;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    z-index: 1;
}

.glass-effect {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.card-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-section {
    padding: 2rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    position: relative;
    width: 100%;
}

input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

input::placeholder {
    color: #475569;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    background: rgba(15, 23, 42, 0.8);
}

button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--secondary);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(0);
}

.result-container {
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1;
    transform: translateY(0);
}

.result-container.hidden {
    opacity: 0;
    transform: translateY(-10px);
    display: none;
}

.result-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    animation: fadeIn 0.4s ease forwards;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
}

.student-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

#student-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.roll-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #cbd5e1;
    width: max-content;
    margin-top: 0.25rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.mobile-badge {
    background: rgba(16, 185, 129, 0.15);
    /* green tint */
    color: #34d399;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: pulseError 2s infinite;
}

.error-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseError {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.demo-info {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.demo-info strong {
    color: #cbd5e1;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .card-header,
    .search-section,
    .result-container {
        padding: 1.5rem;
    }
}