@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.05);
    --text: #0f172a;
    --text-muted: #64748b;
    --success: #16a34a;
    --error: #dc2626;
}

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

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text);
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: var(--text);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

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

button {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.result-card {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.status-qualified { background: rgba(22, 163, 74, 0.1); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.2); }
.status-waiting { background: rgba(234, 179, 8, 0.1); color: #ca8a04; border: 1px solid rgba(234, 179, 8, 0.2); }
.status-not-qualified { background: rgba(220, 38, 38, 0.1); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.2); }

.marks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mark-item {
    background: #ffffff;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.mark-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.mark-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.total-section {
    display: flex;
    justify-content: space-between;
    background: rgba(99, 102, 241, 0.1);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.total-item span {
    display: block;
}

.total-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.error-msg {
    color: var(--error);
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}

/* Admin Styles */
.admin-container {
    width: 100%;
    max-width: 1200px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: 2rem auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

tr:hover {
    background: #f1f5f9;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.btn-primary { background: var(--primary); color: white; border: none; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline { border: 1px solid var(--card-border); color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--card-border); }

.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: var(--error); color: white; }

.action-links {
    display: flex;
    gap: 0.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    color: var(--text);
    outline: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}
