/* ============================================
   Online Application Portal — Design System
   Faculty of Graduate Studies, University of Ruhuna
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ── */
:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --primary-dark: #0d1452;
    --accent: #c9a94e;
    --accent-light: #dfc370;
    --accent-dark: #a88a2e;
    --bg: #f0f2f5;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --text: #1a1a2e;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-focus: #3949ab;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s 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, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Background Pattern ── */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(26, 35, 126, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(201, 169, 78, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(26, 35, 126, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ── Header ── */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 169, 78, 0.1) 0%, transparent 60%);
    animation: headerGlow 15s ease-in-out infinite;
}

@keyframes headerGlow {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(5%, 5%);
    }
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.header-left {
    flex-shrink: 0;
}

.header-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    margin-bottom: 20px;
}

.header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.vacancies-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 0.35rem 1.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.institution-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.form-title {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* ── Main Container ── */
.header-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    position: relative;
}

/* ── Main Container ── */
.form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

/* ── Form Section Cards ── */
.form-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.3);
}

.section-title h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* ── Form Groups ── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.question-number {
    display: none;
}

/* Required asterisk */
.required-star {
    color: var(--error);
    margin-left: 2px;
    font-weight: 700;
}

.form-group label .q-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* ── Input Styling ── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.08);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ── Radio / Checkbox ── */
.radio-group,
.checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
    background: #fff;
}

.radio-option:hover,
.checkbox-option:hover {
    border-color: var(--primary-light);
    background: rgba(57, 73, 171, 0.04);
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-option.selected,
.checkbox-option.selected {
    border-color: var(--primary);
    background: rgba(57, 73, 171, 0.06);
}

.radio-option label,
.checkbox-option label {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0;
}

/* ── Date Selects Row ── */
.date-selects {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.date-selects select {
    text-align: center;
}

/* ── Dynamic Tables ── */
.dynamic-table-wrapper {
    overflow-x: auto;
    margin-top: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.dynamic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.dynamic-table thead th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.75rem 0.75rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    font-size: 0.8rem;
}

.dynamic-table tbody td {
    padding: 0.4rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.dynamic-table tbody tr:last-child td {
    border-bottom: none;
}

.dynamic-table tbody tr:hover {
    background: rgba(57, 73, 171, 0.02);
}

.dynamic-table input,
.dynamic-table select {
    font-size: 0.83rem;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    border: 1.5px solid var(--border);
}

.dynamic-table input:focus,
.dynamic-table select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.08);
}

.btn-remove-row {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.btn-remove-row:hover {
    background: var(--error-bg);
    transform: scale(1.1);
}

.btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(57, 73, 171, 0.06);
    border: 1.5px dashed var(--primary-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-row:hover {
    background: rgba(57, 73, 171, 0.12);
    border-style: solid;
}

/* ── Compact Referees Layout ── */
.referees-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.referee-box {
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.referee-box h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.referee-box .form-group {
    margin-bottom: 0.85rem;
}

/* ── Upload Grid (2-column) ── */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Compact Upload Zones ── */
.upload-zone-compact {
    position: relative;
    border: 1.5px dashed var(--border);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upload-zone-compact:hover {
    border-color: var(--primary-light);
    background: rgba(57, 73, 171, 0.02);
}

.upload-icon-sm {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.upload-info {
    flex: 1;
}

.upload-text-sm {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.upload-hint-sm {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.upload-zone-compact input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ── File Upload Zone ── */
.upload-section {
    margin-top: 0.5rem;
}

.upload-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, rgba(240, 242, 245, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(57, 73, 171, 0.03) 0%, rgba(201, 169, 78, 0.03) 100%);
    opacity: 0;
    transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary-light);
    background: rgba(57, 73, 171, 0.03);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.upload-zone:hover::before,
.upload-zone.drag-over::before {
    opacity: 1;
}

.upload-zone .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    transition: var(--transition);
}

.upload-zone:hover .upload-icon {
    transform: translateY(-4px) scale(1.05);
}

.upload-zone .upload-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    position: relative;
}

.upload-zone .upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    position: relative;
}

.upload-zone .browse-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    animation: fadeInUp 0.3s ease;
}

.file-preview .file-icon {
    font-size: 1.3rem;
}

.file-preview .file-info {
    flex: 1;
}

.file-preview .file-name {
    font-weight: 600;
    color: var(--text);
}

.file-preview .file-size {
    font-size: 0.75rem;
    color: var(--text-light);
}

.file-preview .btn-remove-file {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    border-radius: 50%;
    transition: var(--transition);
}

.file-preview .btn-remove-file:hover {
    background: var(--error-bg);
}

/* ── Declaration Section ── */
.declaration-box {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.03) 0%, rgba(201, 169, 78, 0.03) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-light);
}

.declaration-box strong {
    color: var(--text);
}

/* ── Submit Button ── */
.submit-section {
    text-align: center;
    margin-top: 2rem;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 3rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 35, 126, 0.4);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: linear-gradient(135deg, #9e9e9e 0%, #bdbdbd 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

.btn-submit:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-submit:disabled::before {
    display: none;
}

/* ── File Upload Feedback ── */
.file-feedback {
    margin-top: 0.4rem;
}

.file-success-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    margin-top: 0.35rem;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
}

.file-success-msg span {
    color: #66bb6a;
    font-size: 0.75rem;
}

.file-error-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    margin-top: 0.35rem;
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ── Validation ── */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: var(--error);
    background: var(--error-bg);
}

.form-group .error-message {
    display: none;
    font-size: 0.78rem;
    color: var(--error);
    margin-top: 0.3rem;
    font-weight: 500;
}

.form-group.error .error-message {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* ── Alert Messages ── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fadeInUp 0.4s ease;
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--error-bg);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ── Progress Bar (top) ── */
.progress-bar-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    box-shadow: var(--shadow-sm);
}

.progress-bar {
    height: 4px;
    background: var(--border);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transition: width 0.4s ease;
    width: 0%;
}

/* ── Footer ── */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.app-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ── Loading Spinner ── */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .form-container {
        padding: 1rem 0.75rem 3rem;
    }

    .form-section {
        padding: 1.25rem;
        border-radius: var(--radius);
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .date-selects {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .header-logo {
        height: 60px;
    }

    .main-title {
        font-size: 1.4rem;
    }

    .institution-name {
        font-size: 1rem;
    }

    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .referees-compact {
        grid-template-columns: 1fr;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }

    .btn-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 1rem;
    }

    .section-title h2 {
        font-size: 1rem;
    }

    .upload-zone {
        padding: 1.5rem 1rem;
    }
}

/* ── Confirmation Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2.5rem 2rem;
    text-align: center;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.3s ease forwards;
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.modal-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.6rem;
}

.modal-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.65rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-cancel {
    background: #f1f3f5;
    color: var(--text);
}

.modal-btn-cancel:hover {
    background: #e2e5e9;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
}

.modal-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 35, 126, 0.4);
}

/* ── Loading Overlay ── */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 3rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.4s ease forwards;
}

.loading-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.25rem 0 0.5rem;
}

.loading-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.loading-card .loading-hint {
    font-size: 0.78rem;
    color: var(--error);
    font-weight: 600;
    margin-top: 0.75rem;
    animation: pulse 2s ease-in-out infinite;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e8eaf6;
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ── Keyframe Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}