/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Same as homepage */
    --primary-blue: #00BFFF;
    --primary-purple: #A63CFF;
    --primary-cyan: #5AF2FF;
    --dark-blue: #0A0E1A;
    --dark-bg: #1C1C1C;
    --black: #000000;
    --white: #FFFFFF;
    --gray: #C5C5C5;
    --gray-dark: #404040;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 50%, var(--primary-purple) 100%);
    --gradient-dark: linear-gradient(180deg, var(--dark-blue) 0%, var(--black) 100%);
    --gradient-card: linear-gradient(135deg, rgba(10, 14, 26, 0.8) 0%, rgba(28, 28, 28, 0.6) 100%);

    /* Typography */
    --font-primary: 'Poppins', sans-serif;

    /* Effects */
    --blur: blur(10px);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--dark-blue);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== ANIMATED BACKGROUND ==================== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--gradient-dark);
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: float 20s infinite ease-in-out;
    will-change: transform;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-cyan), transparent);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--primary-purple), transparent);
    bottom: -75px;
    right: -75px;
    animation-delay: 7s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-blue), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

/* ==================== HEADER ==================== */
.form-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid rgba(90, 242, 255, 0.1);
}

.back-button {
    position: absolute;
    left: 20px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(90, 242, 255, 0.1);
    border: 1px solid rgba(90, 242, 255, 0.3);
    border-radius: 50%;
    color: var(--primary-cyan);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.back-button:hover {
    background: rgba(90, 242, 255, 0.2);
    border-color: var(--primary-cyan);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(90, 242, 255, 0.4);
}

.back-button svg {
    width: 24px;
    height: 24px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 60px;
    filter: drop-shadow(0 0 15px rgba(0, 191, 255, 0.5));
}

/* ==================== PROGRESS BAR ==================== */
.progress-container {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(90, 242, 255, 0.1);
    z-index: 999;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.6);
}

/* ==================== FORM CONTAINER ==================== */
.form-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 40px;
    position: relative;
}

.typeform-style {
    width: 100%;
    max-width: 700px;
    position: relative;
}

/* ==================== QUESTIONS ==================== */
.question {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.question.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.question.exit {
    animation: slideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.question-content {
    margin-bottom: 30px;
}

.question-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-cyan);
    margin-bottom: 20px;
    padding: 8px 16px;
    background: rgba(90, 242, 255, 0.1);
    border: 1px solid rgba(90, 242, 255, 0.3);
    border-radius: 25px;
}

.arrow-icon {
    width: 18px;
    height: 18px;
}

.question-label {
    display: block;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.3;
    color: var(--white);
}

/* ==================== INPUTS ==================== */
.question-input,
.question-select,
.question-textarea {
    width: 100%;
    padding: 18px 0;
    font-size: 22px;
    font-family: var(--font-primary);
    color: var(--white);
    background: transparent;
    border: none;
    border-bottom: 3px solid rgba(90, 242, 255, 0.3);
    outline: none;
    transition: var(--transition);
    font-weight: 500;
}

.question-input::placeholder,
.question-textarea::placeholder {
    color: rgba(197, 197, 197, 0.5);
}

.question-input:focus,
.question-select:focus,
.question-textarea:focus {
    border-bottom-color: var(--primary-cyan);
    box-shadow: 0 3px 0 0 rgba(90, 242, 255, 0.2);
}

.question-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235AF2FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px;
    padding-right: 45px;
}

.question-select option {
    background: var(--dark-blue);
    color: var(--white);
    padding: 10px;
}

.question-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.input-hint {
    margin-top: 15px;
    font-size: 14px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-hint strong {
    color: var(--primary-cyan);
    font-weight: 600;
}

/* ==================== OPTIONS GRID ==================== */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.option-card {
    position: relative;
    cursor: pointer;
}

.option-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(10, 14, 26, 0.6);
    border: 2px solid rgba(90, 242, 255, 0.2);
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
}

.option-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(90, 242, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.option-card:hover .option-content {
    border-color: var(--primary-cyan);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 191, 255, 0.3);
}

.option-card:hover .option-content::before {
    opacity: 1;
}

.option-card input[type="checkbox"]:checked + .option-content {
    background: rgba(90, 242, 255, 0.15);
    border-color: var(--primary-cyan);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.4);
}

.option-card input[type="checkbox"]:checked + .option-content::before {
    opacity: 1;
}

.option-icon {
    width: 28px;
    height: 28px;
    color: var(--primary-cyan);
    flex-shrink: 0;
}

.option-content span {
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
}

/* ==================== BUTTONS ==================== */
.btn-next,
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--white);
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(0, 191, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-next::before,
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 191, 255, 0.6);
}

.btn-next:hover::before,
.btn-submit:hover::before {
    left: 100%;
}

.btn-next:active,
.btn-submit:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Submit Button States */
.btn-submit {
    width: auto;
    min-width: 250px;
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit-text {
    display: inline-block;
}

.btn-submit-loader {
    display: none;
    align-items: center;
    gap: 10px;
}

.btn-submit.loading .btn-submit-text {
    display: none;
}

.btn-submit.loading .btn-submit-loader {
    display: flex;
}

/* Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner-path {
    stroke: var(--white);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ==================== NAVIGATION BUTTONS ==================== */
.nav-buttons {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 100;
}

.btn-back {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(90, 242, 255, 0.1);
    border: 2px solid rgba(90, 242, 255, 0.3);
    border-radius: 50%;
    color: var(--primary-cyan);
    cursor: pointer;
    transition: var(--transition);
}

.btn-back:not(:disabled):hover {
    background: rgba(90, 242, 255, 0.2);
    border-color: var(--primary-cyan);
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(90, 242, 255, 0.5);
}

.btn-back:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-back svg {
    width: 24px;
    height: 24px;
}

/* ==================== SUCCESS SCREEN ==================== */
.success-screen {
    text-align: center;
    padding: 40px 20px;
}

.success-content {
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 191, 255, 0.5);
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(0, 191, 255, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 50px rgba(0, 191, 255, 0.7);
    }
}

.success-icon svg {
    width: 50px;
    height: 50px;
    color: var(--white);
    stroke-width: 3;
}

.success-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-message {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 40px;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    justify-content: center;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: var(--gradient-primary);
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(0, 191, 255, 0.4);
}

.btn-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 191, 255, 0.6);
}

.btn-home svg {
    width: 20px;
    height: 20px;
}

/* ==================== RESPONSIVE - TABLET ==================== */
@media (min-width: 768px) {
    .form-header {
        height: 100px;
    }

    .logo img {
        height: 80px;
    }

    .progress-container {
        top: 100px;
    }

    .question-label {
        font-size: 40px;
    }

    .question-input,
    .question-select,
    .question-textarea {
        font-size: 26px;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .btn-next,
    .btn-submit {
        font-size: 20px;
        padding: 18px 40px;
    }

    .success-title {
        font-size: 48px;
    }

    .success-message {
        font-size: 20px;
    }
}

/* ==================== RESPONSIVE - DESKTOP ==================== */
@media (min-width: 1024px) {
    .form-header {
        padding: 0 40px;
    }

    .back-button {
        left: 40px;
    }

    .question-label {
        font-size: 48px;
    }

    .question-input,
    .question-select,
    .question-textarea {
        font-size: 28px;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gradient-orb {
        filter: blur(100px);
        opacity: 0.3;
    }

    .orb-1 {
        width: 600px;
        height: 600px;
        top: -200px;
        left: -200px;
    }

    .orb-2 {
        width: 500px;
        height: 500px;
        bottom: -150px;
        right: -150px;
    }

    .orb-3 {
        width: 400px;
        height: 400px;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==================== ERROR STATES ==================== */
.question-input.error,
.question-select.error,
.question-textarea.error {
    border-bottom-color: #ff4757;
    animation: shake 0.5s ease-in-out;
}

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

.error-message {
    margin-top: 10px;
    font-size: 14px;
    color: #ff4757;
    display: none;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ==================== ACCESSIBILITY ==================== */
*:focus-visible {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .animated-bg,
    .form-header,
    .progress-container,
    .nav-buttons,
    .btn-next,
    .btn-submit {
        display: none;
    }
}
