:root {
    /* Color Palette - Modern HSL (Light Theme) */
    --primary-h: 220;
    --primary-s: 70%;
    --primary-l: 45%;
    /* Slightly darker for better contrast on light */

    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 35%);
    --primary-light: hsl(var(--primary-h), var(--primary-s), 55%);

    --accent-h: 24;
    --accent-s: 100%;
    --accent-l: 45%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));

    --success: #059669;
    --error: #dc2626;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);

    /* Glassmorphism Tokens (Light Mode) */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
    --card-bg: #ffffff;

    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #ffffff;

    /* Spacing & Borders */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --padding-container: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    line-height: 1.5;
}

/* Background Elements for Depth */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, hsla(var(--primary-h), 70%, 50%, 0.15) 0%, transparent 70%);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, hsla(var(--accent-h), 100%, 50%, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.registration-container {
    width: 100%;
    max-width: 850px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.registration-header {
    padding: 3rem 2rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.logo-container {
    display: inline-flex;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-container img {
    height: 60px;
    width: auto;
}

.registration-header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.registration-header p {
    color: var(--text-muted);
    font-weight: 500;
}

/* Progress Stepper */
.progress-container {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: calc(2rem + 20px);
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-step.active .step-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
    transform: scale(1.1);
}

.progress-step.completed .step-icon {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.progress-step.active .step-label {
    color: var(--primary);
}

/* Form Layout */
.form-container {
    padding: 0 2rem 3rem;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.form-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.required::after {
    content: '*';
    color: var(--accent);
    margin-left: 4px;
}

.form-control,
.form-select {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-select option {
    background: #ffffff;
    color: var(--text-main);
}

/* Photo Upload */
.photo-upload-container {
    border: 2px dashed #e2e8f0;
    border-radius: var(--radius-md);
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.photo-upload-container:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 1.5rem auto 0;
    border: 3px solid var(--primary);
    display: none;
    overflow: hidden;
    object-fit: cover;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.course-option {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.course-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.token-section {
    text-align: center;
}

.token-input-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

.course-option:hover {
    background: #f8fafc;
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.course-option.selected {
    background: var(--primary);
    border-color: var(--primary);
}

.course-option.selected * {
    color: white !important;
}

.course-option label {
    font-weight: 600;
    cursor: pointer;
    z-index: 1;
}

.course-price {
    font-size: 0.875rem;
    color: var(--primary-light);
    font-weight: 700;
    margin-top: 0.5rem;
}

.course-option.selected .course-price {
    color: rgba(255, 255, 255, 0.8);
}

/* Payment Summary */
.payment-summary {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 2.5rem;
    margin: 2.5rem 0;
    border: 1px solid #e2e8f0;
    display: none;
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.payment-summary.active {
    display: block;
}

.payment-summary h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--text-muted);
    font-weight: 500;
}

.payment-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--primary);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 2px solid #e2e8f0;
}

.btn-outline:hover:not(:disabled) {
    background: #f8fafc;
    border-color: var(--text-main);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Success Screen */
.success-container {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--success);
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.student-id {
    background: #f8fafc;
    border: 2px dashed var(--primary);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 2rem 0;
    letter-spacing: 0.1em;
}

/* Custom Checkbox/Radio Styling */
.form-check-input {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    :root {
        --padding-container: 1rem;
    }

    body {
        padding: 0.5rem;
    }

    .registration-container {
        border-radius: var(--radius-md);
    }

    .registration-header {
        padding: 2rem 1.5rem;
    }

    .registration-header h1 {
        font-size: 1.75rem;
    }

    .progress-container {
        padding: 1.5rem 1rem;
    }

    .progress-container::before {
        display: none;
    }

    .step-label {
        display: none;
    }

    .form-container {
        padding: 1.5rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}