/* ============================================
   Student Details - Premium Design System
   ============================================ */

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

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 52, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-input: rgba(255, 255, 255, 0.06);
    --bg-input-focus: rgba(255, 255, 255, 0.1);

    --text-primary: #e8e8f0;
    --text-secondary: #9d9db5;
    --text-muted: #6b6b85;
    --text-accent: #a78bfa;

    --accent-primary: #7c3aed;
    --accent-secondary: #a78bfa;
    --accent-glow: rgba(124, 58, 237, 0.3);
    --accent-gradient: linear-gradient(135deg, #7c3aed, #a78bfa, #c4b5fd);
    --accent-gradient-hover: linear-gradient(135deg, #6d28d9, #8b5cf6, #a78bfa);

    --success-bg: rgba(16, 185, 129, 0.1);
    --success-border: rgba(16, 185, 129, 0.3);
    --success-text: #34d399;
    --success-icon: #10b981;

    --edit-gradient: linear-gradient(135deg, #0ea5e9, #38bdf8);
    --edit-glow: rgba(14, 165, 233, 0.3);

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-input: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(124, 58, 237, 0.5);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Animated Background ---------- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 40% 80%, rgba(167, 139, 250, 0.05) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-0.5deg); }
}

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(124, 58, 237, 0.15);
    top: 10%;
    left: 15%;
    animation: orbFloat1 15s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.12);
    top: 60%;
    right: 10%;
    animation: orbFloat2 18s ease-in-out infinite;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(167, 139, 250, 0.1);
    bottom: 10%;
    left: 40%;
    animation: orbFloat3 12s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(60px, -40px); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 30px); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -50px); }
}

/* ---------- Layout ---------- */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px);
    background: rgba(15, 15, 26, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* ---------- Card Container ---------- */
.form-card {
    width: 100%;
    max-width: 580px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    overflow: hidden;
    animation: cardSlideIn 0.6s var(--transition-base) forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.card-header {
    padding: 32px 36px 0;
    text-align: center;
}

.card-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.card-header p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.card-body {
    padding: 28px 36px 36px;
}

/* ---------- Form Styles ---------- */
.form-group {
    margin-bottom: 20px;
    animation: fieldFadeIn 0.4s ease forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }
.form-group:nth-child(6) { animation-delay: 0.35s; }
.form-group:nth-child(7) { animation-delay: 0.4s; }

@keyframes fieldFadeIn {
    to {
        opacity: 1;
    }
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 400;
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--bg-input-focus);
}

.form-control:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

/* Dropdown styles */
.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px;
}

/* ---------- Form Row (side by side) ---------- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row .form-group {
    margin-bottom: 20px;
}

/* ---------- Radio Group ---------- */
.radio-group {
    display: flex;
    gap: 16px;
    padding-top: 4px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-input);
    border-radius: var(--radius-full);
    background: var(--bg-input);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: white;
}

.radio-option label {
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-submit {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 6px 28px rgba(124, 58, 237, 0.45);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-edit {
    background: var(--edit-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--edit-glow);
    padding: 12px 32px;
}

.btn-edit:hover {
    box-shadow: 0 6px 28px rgba(14, 165, 233, 0.45);
    transform: translateY(-2px);
}

.btn-edit:active {
    transform: translateY(0);
}

/* ---------- Success / Submitted View ---------- */
.submitted-view {
    animation: fadeSlideIn 0.5s ease forwards;
}

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

.success-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.success-icon {
    width: 36px;
    height: 36px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.success-text h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--success-text);
    margin-bottom: 2px;
}

.success-text p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ---------- Detail Rows ---------- */
.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
    animation: detailFadeIn 0.3s ease forwards;
    opacity: 0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row:nth-child(1) { animation-delay: 0.1s; }
.detail-row:nth-child(2) { animation-delay: 0.15s; }
.detail-row:nth-child(3) { animation-delay: 0.2s; }
.detail-row:nth-child(4) { animation-delay: 0.25s; }
.detail-row:nth-child(5) { animation-delay: 0.3s; }
.detail-row:nth-child(6) { animation-delay: 0.35s; }

@keyframes detailFadeIn {
    to {
        opacity: 1;
    }
}

.detail-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.detail-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

/* ---------- Validation ---------- */
.validation-error {
    color: #f87171;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 400;
}

.form-control.input-error {
    border-color: rgba(248, 113, 113, 0.5);
}

/* ---------- Footer ---------- */
.main-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    background: rgba(15, 15, 26, 0.4);
}

.main-footer p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .main-header {
        padding: 16px 20px;
    }

    .main-content {
        padding: 24px 16px;
    }

    .card-header {
        padding: 24px 24px 0;
    }

    .card-body {
        padding: 20px 24px 28px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .card-header h1 {
        font-size: 22px;
    }

    .logo-text {
        font-size: 18px;
    }
}
