/**
 * DBK Survey - Professional Stylesheet
 */

/* Variables */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #06b6d4;
    --success: #10b981;
    --error: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.95);
    --text-primary: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --radius: 12px;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Background */
.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    z-index: -1;
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header .description {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

/* Progress */
.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 12.5%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.step-indicator {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* Question Groups */
.question-group {
    margin-bottom: 1.5rem;
}

.question-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.required {
    color: var(--error);
    margin-left: 2px;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 1.5rem;
    margin: 0.5rem 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Checkbox Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Conditional Fields */
.conditional-field {
    display: none;
    margin-top: 0.75rem;
    animation: fadeIn 0.3s ease;
}

/* Step Info Text */
.step-info {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Signature Section */
.signature-section .legal-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.signature-container {
    position: relative;
    background: #ffffff;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    overflow: hidden;
}

.signature-container canvas {
    display: block;
    width: 100%;
    height: 200px;
    touch-action: none;
    cursor: crosshair;
}

.btn-clear-signature {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--error);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.btn-clear-signature:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Navigation */
.step-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Error States */
.input-error {
    border-color: var(--error) !important;
    animation: shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.error-message {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .glass-card {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .step-nav {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}