:root {
    /* Modern Light Color Palette */
    /* Primary - Soft Blue */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --primary-glow: rgba(79, 70, 229, 0.15);

    /* Secondary - Soft Purple */
    --secondary: #7c3aed;
    --secondary-dark: #6d28d9;
    --secondary-light: #8b5cf6;
    --secondary-glow: rgba(124, 58, 237, 0.15);

    /* Accent - Warm Coral */
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-glow: rgba(245, 158, 11, 0.15);

    /* Backgrounds - Light & Airy */
    --bg-light: #f8fafc;
    --bg-lighter: #ffffff;
    --bg-card: #ffffff;
    --bg-gradient-start: #faf5ff;
    --bg-gradient-end: #eff6ff;

    /* Glass Effects - Light */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(79, 70, 229, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.9);

    /* Text Colors - Dark on Light */
    --text-main: #1e293b;
    --text-light: #334155;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    /* Status Colors */
    --success: #10b981;
    --success-light: #34d399;
    --success-glow: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-glow: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.15);
    --info: #06b6d4;

    /* Shadows - Soft & Subtle */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Soft Background Orbs for Light Theme */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 25s infinite ease-in-out;
    will-change: transform;
}

.orb-1 {
    top: -15%;
    left: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, #ddd6fe 0%, transparent 70%);
    animation-delay: 0s;
}

.orb-2 {
    bottom: -15%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #dbeafe 0%, transparent 70%);
    animation-delay: -8s;
}

.orb-3 {
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #fef3c7 0%, transparent 70%);
    animation-delay: -16s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -60px) scale(1.05);
    }

    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }

    75% {
        transform: translate(20px, 40px) scale(1.02);
    }
}

/* Enhanced Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    background: var(--glass-hover);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-lg);
}

.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* Enhanced Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: 2.75rem;
    text-align: center;
    margin: 2.5rem 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

h2 {
    font-size: 2rem;
    color: var(--text-light);
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Navigation */
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-light);
    transform: translateY(-2px);
}

.nav-item:hover::before,
.nav-item.active::before {
    width: 80%;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1.2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    transition: transform 0.3s ease;
}

.user-profile:hover img {
    transform: scale(1.1);
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.6rem;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--danger);
    box-shadow: 0 4px 20px var(--danger-glow);
}

.btn-icon {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: var(--danger);
}

/* Enhanced Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: var(--bg-lighter);
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-lighter);
    box-shadow: 0 0 0 3px var(--primary-glow);
    z-index: 2;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-dim);
}

/* Enhanced Tables */
.table-container {
    overflow-x: auto;
    background: var(--bg-lighter);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: rgba(79, 70, 229, 0.05);
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr {
    transition: all 0.2s ease;
}

tr:hover {
    background: rgba(79, 70, 229, 0.03);
}

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

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Enhanced Cards & Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

/* Enhanced Flash Messages */
.flash-messages {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.flash-card {
    padding: 1.2rem 1.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border-left: 5px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    color: var(--text-main);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    max-width: 450px;
    border: 1px solid var(--glass-border);
}

.flash-card.success {
    border-left-color: var(--success);
    background: rgba(240, 253, 244, 0.95);
}

.flash-card.error {
    border-left-color: var(--danger);
    background: rgba(254, 242, 242, 0.95);
}

.flash-card i {
    font-size: 1.3rem;
}

.flash-card.success i {
    color: var(--success);
}

.flash-card.error i {
    color: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

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

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    margin-top: 5rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

footer i {
    color: var(--secondary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Login Page */
.login-container {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    text-align: center;
    padding: 3.5rem 2.5rem;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: white;
    color: #1f2937;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.google-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.google-btn img {
    width: 24px;
    height: 24px;
}

/* Utilities */
.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-info {
    color: var(--info) !important;
}

/* Result & Semester Layouts */
.result-card {
    margin-bottom: 2.5rem;
    border: 1px solid var(--glass-border);
}

.semester-header {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.sgpa-display {
    text-align: right;
}

.sgpa-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sgpa-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--success);
    line-height: 1;
}

.grade-badge {
    padding: 0.25rem 0.85rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    color: white !important;
}

.grade-badge.O,
.grade-badge.A,
.grade-badge.A\+ {
    background: var(--success);
}

.grade-badge.B,
.grade-badge.C,
.grade-badge.B\+ {
    background: var(--info);
}

.grade-badge.D,
.grade-badge.P {
    background: var(--warning);
}

.grade-badge.F {
    background: var(--danger);
}

.subject-card {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    padding: 1.25rem;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.25rem;
    transition: transform 0.2s ease;
}

.subject-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.6);
}

.subject-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .semester-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .sgpa-display {
        text-align: left;
    }

    .sgpa-value {
        font-size: 2.25rem;
    }

    .subject-card-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .subject-card-header div:last-child {
        text-align: left !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        margin: 1.5rem 0;
    }

    h2 {
        font-size: 1.5rem;
    }

    .glass-nav {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .dashboard-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .dashboard-header .actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .dashboard-header .actions button,
    .dashboard-header .actions a {
        width: 100%;
        justify-content: center;
    }

    .card {
        padding: 1.75rem;
    }

    th,
    td {
        padding: 0.9rem;
        font-size: 0.9rem;
    }

    .flash-messages {
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .login-card {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .card {
        padding: 1.5rem;
    }
}