* {
    box-sizing: border-box;
}

:root {
    --primary-color: #0056b3;
    --primary-light: #e7f1ff;
    --primary-hover: #004494;
    --text-color: #333;
    --border-color: #ddd;
    --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --input-focus-shadow: 0 0 0 3px rgba(0, 86, 179, 0.25);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    /* Animated Gradient Background: Blue - Dark Blue - Gold - Blue */
    background: linear-gradient(-45deg, #0056b3, #0f1c35, #d4af37, #004494);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    color: var(--text-color);
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Background Logo Animation - Chaotic Movement */
.bg-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
    /* Move Container on X axis */
    animation: moveX 23s ease-in-out infinite alternate;
    display: block;
    /* Remove flex centering */
    overflow: hidden;
}

.bg-animation-container img {
    position: absolute;
    width: 50vw;
    /* Responsive size */
    max-width: 500px;
    height: auto;
    filter: grayscale(100%) brightness(1.2);
    /* Move Image on Y axis */
    animation: moveY 29s ease-in-out infinite alternate, breathe 7s ease-in-out infinite;
}

/* X-Axis Movement (Container) */
@keyframes moveX {
    0% {
        transform: translateX(-10vw);
    }

    100% {
        transform: translateX(60vw);
    }
}

/* Y-Axis Movement (Image) */
@keyframes moveY {
    0% {
        top: -10vh;
    }

    100% {
        top: 60vh;
    }
}

/* Optional Breathing Effect */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Navbar */
.navbar {
    background: #0f1c35;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-brand img {
    height: 40px;
}

.navbar-title h1 {
    font-size: 16px;
    margin: 0;
    font-weight: 700;
}

.navbar-title p {
    font-size: 12px;
    margin: 0;
    opacity: 0.8;
}

.navbar-time {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    text-align: right;
    font-size: 12px;
}

.main-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.container {
    background: #fff;
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 50px;
    position: relative;
    overflow: hidden;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

header img {
    height: 60px;
    margin-bottom: 15px;
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 10px;
}

header p {
    color: #666;
    margin: 0;
}

/* Steps Progress (Optional, simplified for now) */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

/* Form Sections */
.form-step {
    display: none;
    animation: fadeIn var(--transition-speed) ease-in-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.required {
    color: #e3342f;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--transition-speed);
    box-sizing: border-box;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--input-focus-shadow);
}

/* Radio/Cards for Gender */
.radio-group {
    display: flex;
    gap: 15px;
}

.radio-card {
    flex: 1;
    position: relative;
}

.radio-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-card-content {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.radio-card-content span {
    margin-left: 10px;
    font-weight: 500;
}

.radio-card input:checked+.radio-card-content {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.radio-card-icon {
    font-size: 24px;
}

/* Service Checkboxes */
.checkbox-group {
    display: grid;
    gap: 10px;
}

.checkbox-wrapper {
    position: relative;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label {
    display: block;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.checkbox-wrapper input:checked+.checkbox-label {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* Likert Scale */
.likert-scale {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.likert-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.likert-option input {
    display: none;
}

.likert-emoji {
    font-size: 28px;
    display: block;
    margin-bottom: 5px;
    transition: transform 0.2s;
    opacity: 0.5;
    filter: grayscale(100%);
}

.likert-label {
    font-size: 12px;
    color: #666;
    display: block;
}

.likert-option input:checked+.likert-content .likert-emoji {
    transform: scale(1.2);
    opacity: 1;
    filter: grayscale(0%);
}

.likert-option input:checked+.likert-content .likert-label {
    font-weight: bold;
    color: var(--primary-color);
}

/* Buttons */
.btn-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e2e6ea;
}

/* Info Box */
.info-box {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 0;
}

/* Landing Page Specifics */
.landing-header {
    text-align: center;
    margin-bottom: 30px;
}

.landing-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a2b4b;
    margin-bottom: 10px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #0056b3;
    font-weight: 600;
    margin-bottom: 30px;
}

.welcome-body {
    background: #f0f7ff;
    border: 1px solid #cce5ff;
    padding: 25px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 25px;
    text-align: justify;
}

.confidentiality-box {
    background: #e6fffa;
    border-left: 5px solid #00b894;
    padding: 15px;
    border-radius: 4px;
    font-size: 13px;
    color: #006644;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.landing-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border-radius: 8px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

/* Custom Alert Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: all 0.3s;
}

.modal-overlay.open .modal-card {
    transform: translateY(0);
}

.modal-icon {
    font-size: 50px;
    color: #e3342f;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.modal-text {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-btn {
    background: #e3342f;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-btn:hover {
    background: #cc1f1a;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Portal Page Styles */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.portal-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.portal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.portal-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.portal-title {
    font-size: 24px;
    font-weight: 800;
    color: #1a2b4b;
    margin-bottom: 10px;
}

.portal-desc {
    color: #666;
    font-size: 14px;
}

/* Wizard Component Styles */
.wizard-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.wizard-step-indicator {
    font-size: 14px;
    margin-bottom: 10px;
    color: #888;
}

.wizard-title {
    color: #1a2b4b;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
}

.wizard-question-block {
    background: #eef2f7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: inline-block;
    width: 100%;
}

.wizard-question-text {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.wizard-btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.wizard-btn-group .btn {
    min-width: 120px;
}

.wizard-questions-list {
    display: none;
    text-align: left;
    margin-top: 30px;
    border-top: 2px dashed #ddd;
    padding-top: 30px;
}

.wizard-question-item {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wizard-question-item label {
    margin-bottom: 15px;
    display: block;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .navbar-brand {
        flex-direction: column;
        text-align: center;
    }

    .navbar-title {
        margin-top: 10px;
    }

    .navbar-time {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .main-wrapper {
        padding: 20px 10px;
    }

    .container {
        padding: 25px 20px;
    }

    header h1 {
        font-size: 22px;
    }

    .radio-group {
        flex-direction: column;
    }

    .btn-group {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }

    /* Wizard Mobile */
    .wizard-card {
        padding: 20px;
    }

    .wizard-btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .wizard-btn-group .btn {
        width: 100%;
        min-width: unset;
    }

    .likert-scale {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .likert-option {
        margin-bottom: 0;
    }

    .likert-content {
        flex-direction: column;
        padding: 10px;
        border: 1px solid #eee;
        border-radius: 8px;
    }

    /* Landing Page Mobile */
    .landing-header img {
        height: 80px !important;
    }

    .welcome-title {
        font-size: 24px;
    }

    .welcome-subtitle {
        font-size: 14px;
    }
}