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

:root {
    --primary-color: #4facfe;
    --secondary-color: #00f2fe;
    --background-grad: linear-gradient(135deg, #1e3c72, #2a5298);
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    line-height: 1.6;
}

/* Header & Typography */
header {
    padding: 35px 20px 15px;
    text-align: center;
}

.logo-container {
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-link {
    display: inline-block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-link:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border-color: #ffffff;
}

.univ-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}

header h1, header h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    margin-bottom: 5px;
}

h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Navigation Menu */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 20px;
    margin: 0 auto 20px;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background: var(--text-color);
    color: #0072ff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Container & Cards */
.container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    max-width: 750px;
    width: 90%;
    margin: 0 auto 40px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.25);
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 480px;
    margin: 20px auto 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    width: 100%;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-container {
    position: relative;
    width: 100%;
}

input[type="text"], input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder, input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input[type="text"]:focus, input[type="number"]:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-color);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* Validation States */
.form-group.valid input {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-group.invalid input {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group .validation-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group.valid .validation-indicator::after {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
}

.form-group.invalid .validation-indicator::after {
    content: "✗";
    color: var(--error-color);
    font-weight: bold;
}

/* Error/Help Message */
.error-msg {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.85);
    border-left: 4px solid #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    margin-top: 8px;
    width: 100%;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Buttons */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

button[type="submit"], .btn-primary {
    background: var(--text-color);
    color: #0084ff;
}

button[type="submit"]:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #f0f7ff;
}

button[type="submit"]:active, .btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ff9e9e;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Slick Slider */
.hero-image-slider {
    width: 100%;
    max-width: 600px;
    margin: 25px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.slider-slide {
    height: 250px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    text-align: center;
}

.slider-slide h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.slider-slide p {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 80%;
}

.slick-dots {
    bottom: 15px;
}

.slick-dots li button:before {
    color: #ffffff;
    opacity: 0.4;
    font-size: 8px;
}

.slick-dots li.slick-active button:before {
    color: #ffffff;
    opacity: 0.9;
    font-size: 10px;
}

/* Table styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    text-align: left;
}

th, td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(255, 255, 255, 0.15);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-color);
}

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

/* Target Grade Grid helper */
.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    width: 100%;
    margin: 20px 0;
}

.target-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.target-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.target-card .grade-letter {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.target-card .grade-val {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 4px;
}

.target-card.impossible {
    opacity: 0.6;
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.target-card.impossible .grade-letter {
    color: var(--error-color);
}

.target-card.impossible .grade-val {
    color: var(--error-color);
    font-size: 0.85rem;
}

/* Dashboard Widgets */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    width: 100%;
    margin-bottom: 30px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dashboard-card .card-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.dashboard-card .card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress bar */
.progress-container {
    width: 100%;
    margin: 25px 0;
    text-align: left;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.bar {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    width: 0%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.3, 1);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

/* Custom Lightbox Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.custom-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin-bottom: 0;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
}

.close-modal:hover {
    color: var(--error-color);
    transform: scale(1.1);
}

/* Footer styles */
footer {
    padding: 30px 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

footer p {
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    .container {
        padding: 30px 20px;
    }
    .target-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        border-radius: 16px;
        gap: 5px;
    }
    nav a {
        width: 100%;
        text-align: center;
    }
    .target-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    th, td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
}