/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-animation .circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.05);
    animation: float 20s infinite ease-in-out;
}

.bg-animation .circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.bg-animation .circle:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -50px;
    animation-delay: 5s;
}

.bg-animation .circle:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 20%;
    animation-delay: 10s;
}

.bg-animation .circle:nth-child(4) {
    width: 250px;
    height: 250px;
    top: 20%;
    right: 30%;
    animation-delay: 15s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-30px) rotate(120deg);
    }

    66% {
        transform: translateY(20px) rotate(240deg);
    }
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ru-gold), var(--ru-secondary), var(--ru-gold));
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
}

/* Header */
.portal-header {
    text-align: center;
    padding: 40px 20px 20px;
    position: relative;
    z-index: 1;
}

.portal-header .logo-ring {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--ru-gold), #f0d878);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    font-size: 36px;
    color: var(--ru-dark);
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    }

    50% {
        box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
    }
}

.portal-header h1 {
    font-family: 'Playfair Display', serif;
    color: var(--ru-gold);
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.portal-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Navigation Pills */
.nav-pills-custom {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

.nav-pill {
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
}

.nav-pill.active {
    background: linear-gradient(135deg, var(--ru-gold), #f0d878);
    color: var(--ru-dark);
    border-color: var(--ru-gold);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    font-weight: 600;
}

/* Form Container */
.form-container {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.form-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styling */
.form-title {
    font-family: 'Playfair Display', serif;
    color: var(--ru-primary);
    font-size: 1.6rem;
    margin-bottom: 8px;
    text-align: center;
}

.form-subtitle {
    color: #64748b;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.form-floating-custom {
    position: relative;
    margin-bottom: 20px;
}

.form-floating-custom input,
.form-floating-custom select,
.form-floating-custom textarea {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #1e293b;
}

.form-floating-custom input:focus,
.form-floating-custom select:focus,
.form-floating-custom textarea:focus {
    border-color: var(--ru-gold);
    background: white;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    outline: none;
}

.form-floating-custom label {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 4px;
}

.form-floating-custom input:focus+label,
.form-floating-custom input:not(:placeholder-shown)+label,
.form-floating-custom select:focus+label,
.form-floating-custom select:valid+label,
.form-floating-custom textarea:focus+label,
.form-floating-custom textarea:not(:placeholder-shown)+label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    color: var(--ru-gold);
    background: white;
    font-weight: 600;
}

.form-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.form-floating-custom input:focus~.form-icon,
.form-floating-custom select:focus~.form-icon {
    color: var(--ru-gold);
}

/* Custom Select */
.form-floating-custom select {
    appearance: none;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 0.8rem;
}

/* File Upload */
.file-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.file-upload-zone:hover {
    border-color: var(--ru-gold);
    background: rgba(212, 175, 55, 0.05);
}

.file-upload-zone .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.file-upload-zone p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

.file-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Buttons */
.btn-ru-primary {
    background: linear-gradient(135deg, var(--ru-gold), #f0d878);
    color: var(--ru-dark);
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn-ru-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
}

.btn-ru-primary:active {
    transform: translateY(0);
}

.btn-ru-secondary {
    background: transparent;
    color: var(--ru-primary);
    border: 2px solid #e2e8f0;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-ru-secondary:hover {
    border-color: var(--ru-gold);
    color: var(--ru-gold);
}

/* Login Card Specific */
.login-card {
    max-width: 450px;
    margin: 0 auto;
    padding: 40px;
}

.login-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--ru-primary), #2d5a87);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 10px 30px rgba(30, 58, 95, 0.3);
}

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.section-divider span {
    padding: 0 15px;
}

/* Checkbox Custom */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 20px;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: transparent;
}

.custom-checkbox input:checked+.checkmark {
    background: var(--ru-gold);
    border-color: var(--ru-gold);
    color: white;
}

.custom-checkbox span:last-child {
    color: #64748b;
    font-size: 0.9rem;
}

/* Admission Steps */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--ru-gold), #f0d878);
    color: var(--ru-dark);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.step.completed .step-number {
    background: var(--ru-success);
    color: white;
}

.step-label {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.step.active .step-label {
    color: var(--ru-primary);
    font-weight: 600;
}

/* Admission Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0 20px;
}

/* Footer */
.portal-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    border-left: 4px solid var(--ru-success);
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.error {
    border-left-color: var(--ru-danger);
}

/* Responsive */
@media (max-width: 576px) {
    .portal-header h1 {
        font-size: 1.5rem;
    }

    .login-card {
        padding: 25px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}