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

:root {
    --primary: #0a2540;
    --primary-light: #163e65;
    --accent: #f4c74d;
    --accent-hover: #ffd700;
    --bg-gradient: linear-gradient(135deg, #061527 0%, #0e2744 50%, #153860 100%);
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Glow Effects */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

.bg-glow-1 {
    top: -100px;
    left: -100px;
    background: var(--accent);
}

.bg-glow-2 {
    bottom: -150px;
    right: -150px;
    background: var(--primary-light);
}

/* Header */
header {
    padding: 1.25rem 2rem;
    background: rgba(10, 37, 64, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

.btn-back svg {
    transition: transform 0.3s ease;
}

.btn-back:hover svg {
    transform: translateX(-2px);
}

/* Container */
main {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.form-title-section {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #e2e8f0, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-title-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Stepper Progress Bar */
.stepper-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 10px;
}

.stepper-container::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 1;
}

.step-progress-line {
    position: absolute;
    top: 18px;
    left: 20px;
    height: 3px;
    background: var(--accent);
    z-index: 1;
    transition: width 0.4s ease;
    width: 0%;
}

.step-node {
    position: relative;
    z-index: 2;
    background: #081d33;
    border: 3px solid rgba(255, 255, 255, 0.15);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.4s ease;
}

.step-node.active {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(244, 199, 77, 0.3);
}

.step-node.completed {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
}

/* Form Container */
form {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

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

.step-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 0.75rem;
    line-height: 1.25;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group.half-width {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

label.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

label.form-label .hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* Form Controls */
.form-control {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

select option {
    color: #000000;
    background: #ffffff;
}

input[type="date"].form-control {
    -webkit-appearance: none;
    appearance: none;
    min-height: 2.85rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(244, 199, 77, 0.15);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-control:disabled {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

/* Radio & Checkbox Card Lists */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.selection-grid.three-cols {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.selection-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    user-select: none;
}

.selection-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.selection-card input[type="radio"],
.selection-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
    margin-top: 1px;
}

.selection-card input[type="checkbox"] + .custom-indicator {
    border-radius: 4px;
}

.selection-card input:checked + .custom-indicator {
    border-color: var(--accent);
    background: var(--accent);
}

.selection-card input:checked + .custom-indicator::after {
    content: '';
    position: absolute;
    display: block;
}

.selection-card input[type="radio"]:checked + .custom-indicator::after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.selection-card input[type="checkbox"]:checked + .custom-indicator::after {
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.selection-label {
    font-size: 0.9rem;
    font-weight: 450;
    line-height: 1.3;
}

.selection-label .hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-top: 3px;
    line-height: 1.45;
}

.selection-card input:checked ~ .selection-label {
    color: #ffffff;
    font-weight: 600;
}

.selection-card.selected-active {
    border-color: var(--accent);
    background: rgba(244, 199, 77, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Other input container */
.other-input-container {
    margin-top: 0.5rem;
    display: none;
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Upload Area */
.upload-container {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-container:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    display: block;
}

.upload-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Image Preview */
.preview-wrapper {
    display: none;
    margin-top: 1.5rem;
    text-align: center;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.preview-img {
    max-height: 300px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.preview-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.2s;
}

.preview-remove-btn:hover {
    background: var(--danger);
}

.compression-status {
    font-size: 0.8rem;
    color: var(--success);
    margin-top: 0.5rem;
    display: none;
    font-weight: 500;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-nav {
    padding: 0.85rem 1.75rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-prev {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-prev:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-next {
    background: var(--accent);
    border: none;
    color: var(--primary);
}

.btn-next:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 15px rgba(244, 199, 77, 0.3);
}

.btn-submit {
    background: var(--success);
    border: none;
    color: #ffffff;
    display: none;
}

.btn-submit:hover {
    background: #059669;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(10, 37, 64, 0.2);
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
}

footer p {
    margin-bottom: 0.4rem;
}

/* Success/Error Pages */
.result-card {
    text-align: center;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 1.5rem;
    padding: 3.5rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    max-width: 550px;
    width: 100%;
    margin: 4rem auto;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.result-icon.success {
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--success);
    color: var(--success);
}

.result-icon.error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid var(--danger);
    color: var(--danger);
}

.result-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.result-message {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-result {
    padding: 0.85rem 2rem;
    font-weight: 600;
    border-radius: 0.75rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-result.success {
    background: var(--accent);
    color: var(--primary);
}

.btn-result.success:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 15px rgba(244, 199, 77, 0.3);
}

/* Spinner Overlay for loading states */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 21, 39, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-left-color: var(--accent);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-weight: 500;
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .brand-text {
        align-items: center;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: 0.7rem;
    }

    main {
        padding: 1rem 0.5rem;
    }

    form {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }

    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .form-group.half-width {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .form-group.half-width > div {
        width: 100%;
        min-width: 0;
    }

    .form-control {
        max-width: 100%;
        width: 100%;
    }

    .selection-grid {
        grid-template-columns: 1fr;
    }

    .btn-nav {
        flex: 1;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .hide-mobile {
        display: none !important;
    }
}
