:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #f59e0b; /* Amber/Gold for premium feel */
    --primary-hover: #d97706;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.0);
    --input-border: rgba(255, 255, 255, 0.2);
    --success: #10b981;
    --error: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevent scrolling for typeform feel */
    position: relative;
}

/* Dynamic Background Glow */
.background-animation {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite alternate;
}
.orb-1 { width: 400px; height: 400px; background: #f59e0b44; top: -100px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: #3b82f633; bottom: -200px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #8b5cf633; top: 40%; left: 40%; animation-duration: 25s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

/* Typeform Container */
.typeform-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding: 2rem;
}

.typeform-panel {
    width: 100%;
    max-width: 800px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Progress */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.1);
    z-index: 100;
}
.progress-bar-continuous {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.4s ease;
}
.progress-text {
    position: fixed;
    top: 15px;
    right: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Steps */
.form-step {
    display: none; /* JS handles active */
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
}
.form-step.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Typeform specific typography */
.typeform-question {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    color: var(--text-main);
    line-height: 1.4;
}
.question-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

/* Typeform Inputs */
.typeform-input {
    width: 100%;
    font-size: 1.15rem;
    padding: 6px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--glass-border);
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    border-radius: 0;
}
.typeform-input:focus {
    outline: none;
    border-bottom-color: var(--primary);
    box-shadow: none;
    background: transparent;
}
.typeform-input::placeholder {
    color: rgba(255,255,255,0.2);
}

textarea.typeform-input {
    resize: none;
    font-size: 1.1rem;
}

/* Custom Radios (Typeform Style) */
.typeform-radio {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 400px;
}
.radio-label:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255,255,255,0.1);
}
.radio-label input {
    display: none;
}
.radio-label span {
    width: 100%;
    font-size: 1rem;
    font-weight: 500;
}
.radio-label input:checked + span {
    color: var(--primary);
}
.radio-label:has(input:checked) {
    border-color: var(--primary);
    background: rgba(245, 158, 11, 0.1);
}

/* Conditional Box */
.conditional-box {
    animation: fadeIn 0.3s ease;
}
.hidden {
    display: none !important;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sliders */
.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.slider-val {
    background: var(--primary);
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-weight: 700;
}
.styled-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255,255,255,0.2);
    outline: none;
    margin-top: 10px;
}
.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}
.styled-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* File Upload Box */
.file-upload-wrapper {
    display: flex;
    gap: 1.2rem;
    margin-top: 1rem;
}
.file-upload-box {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.file-upload-box:hover {
    border-color: var(--primary);
    background: rgba(245, 158, 11, 0.05);
}
.file-upload-box label {
    display: block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.file-upload-box input[type="file"] {
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}
.file-upload-box input[type="file"]::file-selector-button {
    display: none;
}

/* Waiver Box */
.typeform-waiver {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 1.2rem;
    border-radius: 12px;
}
.typeform-waiver p {
    font-size: 0.9rem;
    color: #e2e8f0;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

/* Checkbox */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    transition: color 0.3s;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: -2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: transparent;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    transition: all 0.2s ease;
}
.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
}
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Buttons */
.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-success {
    background: var(--success);
    color: #000;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .typeform-question { font-size: 1.5rem; }
    .typeform-input { font-size: 1.5rem; }
    .file-upload-wrapper { flex-direction: column; }
    .form-navigation { flex-direction: column-reverse; }
    .btn { width: 100%; justify-content: center; }
}

/* PDF Template Styles (Hidden from screen, used for A4 output) */
.pdf-container {
    width: 800px;
    padding: 40px;
    background: #fff;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.pdf-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.pdf-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #222;
}
.pdf-date {
    font-style: italic;
    color: #555;
    margin-top: 10px;
}
.pdf-section {
    margin-bottom: 25px;
}
.pdf-section h2 {
    font-size: 16px;
    background: #f0f0f0;
    padding: 8px 12px;
    border-left: 4px solid #f59e0b;
    margin-bottom: 15px;
    color: #333;
}
.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}
.pdf-table th, .pdf-table td {
    padding: 8px;
    border: 1px solid #ddd;
}
.pdf-table th {
    background: #fafafa;
    text-align: left;
    width: 20%;
}
.pdf-table td {
    width: 30%;
}
.pdf-signature {
    margin-top: 30px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}
.pdf-photos {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}
.pdf-photos div {
    flex: 1;
    text-align: center;
}
.pdf-photos img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    padding: 5px;
}
