:root {
    --bg-color: #2e094f; /* Deep purple matching the logo */
    --accent-glow: #56128c; /* Glowing purple */
    --accent-light: #9d4edd; /* Lighter purple for interactions */
    --accent-button: #5d169e; /* Button background */
    --text-primary: #ffffff;
    --text-secondary: #c9aedb;
    --error-color: #ff4d4d;
    --border-color: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --font-family: 'Outfit', sans-serif;
    --transition-speed: 0.25s;
}

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

html, body {
    width: 100%;
    height: 100%;
    height: -webkit-fill-available;
    overflow: hidden;
    position: fixed;
    top: 0; left: 0;
    margin: 0; padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle at 15% 50%, rgba(157, 78, 221, 0.15), transparent 40%),
                      radial-gradient(circle at 85% 30%, rgba(157, 78, 221, 0.15), transparent 40%);
}

.background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    top: -200px;
    left: -200px;
    animation: drift 20s infinite alternate ease-in-out;
    will-change: transform;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #4a148c 0%, transparent 60%);
    bottom: -200px;
    right: -150px;
    animation: drift 25s infinite alternate-reverse ease-in-out;
    will-change: transform;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.form-container {
    width: 100%;
    max-width: 800px;
    padding: 40px;
    position: relative;
    z-index: 10;
}

/* Progress bar */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-glow), var(--accent-light));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--accent-light);
}

form {
    position: relative;
    width: 100%;
    height: 100vh; /* gives enough room for components */
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Steps */
.question-step {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%) translateY(30px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease-in-out;
    will-change: transform, opacity;
}

.question-step.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%);
}

.question-step.completed {
    transform: translateY(-50%) translateY(-30px);
    opacity: 0;
    visibility: hidden;
}

.step-counter {
    font-size: 1.2rem;
    color: var(--accent-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.step-counter .dim {
    color: var(--text-secondary);
    font-weight: 300;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.3;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 2rem;
    font-family: var(--font-family);
    padding: 10px 0;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    border-bottom-color: var(--accent-light);
}

/* Buttons */
.next-btn, .restart-btn {
    margin-top: 30px;
    background: var(--accent-button);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-family: var(--font-family);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInBtn 0.5s forwards;
    animation-delay: 0.3s;
}

.next-btn:hover, .restart-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.6);
}

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

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

/* Options Grid Grid for Select */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.option-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 1rem;
}

.option-card:hover {
    background: rgba(138, 43, 226, 0.1);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 27, 154, 0.2);
}

.option-card.selected {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--accent-button);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

/* Navigation hints */
.navigation-hints {
    position: absolute;
    bottom: -80px;
    left: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.navigation-hints strong {
    color: white;
}

.error-msg {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s;
}

.error-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Success Step */
.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

#step-6 p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 500px;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@media (max-width: 600px) {
    h2 { font-size: 1.6rem; margin-bottom: 20px; }
    input[type="text"], input[type="email"], input[type="tel"] { font-size: 1.3rem; }
    .form-container { padding: 15px; width: 100vw; }
    form { min-height: 100%; }
    .options-grid { grid-template-columns: 1fr; gap: 6px; }
    .option-card { padding: 10px 15px; font-size: 0.95rem; }
    .navigation-hints { display: none; }
    .steps-flex { flex-direction: column; gap: 4px; width: 100%; align-items: stretch; max-width: 280px; margin: 0 auto; }
    .step-arrow { transform: rotate(90deg); margin: 0 auto; width: 16px; height: 16px; align-self: center; }
    .main-title { font-size: 1.6rem !important; margin-bottom: 5px; line-height: 1.2; }
    .steps-subtitle { font-size: 0.6rem; margin-bottom: 2px; }

    .step-box { flex: none !important; height: auto !important; padding: 6px 10px !important; gap: 8px !important; width: 100% !important; box-sizing: border-box !important; }
    .step-icon { width: 22px !important; height: 22px !important; border-radius: 6px !important; }
    .step-icon svg { width: 12px !important; height: 12px !important; }
    .step-title { font-size: 0.8rem !important; white-space: nowrap !important; }
    .step-label { font-size: 0.5rem !important; margin-bottom: 0px !important; }

    .main-logo-container { margin-top: 15px !important; margin-bottom: 0px; }
    .main-logo { width: 50px !important; }

    .start-action { margin-top: 0px; }
    .start-btn { font-size: 1rem; padding: 8px 24px; }

    /* Mobile Performance fixes */
    .glow-1, .glow-2 {
        display: none !important;
    }
    .start-btn {
        animation: fadeInBtn 0.5s forwards, pulseBtn 1.8s infinite 0.5s !important;
    }

    /* Shift the entire start screen upwards to ensure bottom button visibility, safely */
    #step-0.active {
        top: 42% !important;
    }
}

/* Header and Steps Info */
.form-header {
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 40px;
    text-align: center;
    color: #ffffff;
}

.steps-info-container {
    background: transparent;
}

.steps-subtitle {
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: #a0a0b8;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 600;
}

.steps-flex {
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-box {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(13, 12, 30, 0.4);
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #412a80;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.step-icon svg {
    color: #c7abff;
}

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

.step-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #c7abff;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.step-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    background: rgba(13, 12, 30, 0.4);
    color: #c7abff;
}

.start-action {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.start-btn {
    font-size: 1.3rem;
    padding: 16px 40px;
    border-radius: 50px;
    background: linear-gradient(45deg, var(--accent-button), var(--accent-glow));
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
    animation: fadeInBtn 0.5s forwards, pulseBtn 2s infinite 1s;
}

.start-btn:hover {
    box-shadow: 0 15px 40px rgba(156, 39, 176, 0.6);
}

@keyframes pulseBtn {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(156, 39, 176, 0.8); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(156, 39, 176, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(156, 39, 176, 0); }
}

.main-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.main-logo {
    width: 140px; 
    height: auto;
}

/* Responsiveness for small laptops vertically */
@media (min-width: 601px) and (max-height: 850px) {
    .main-logo { width: 100px; }
    .main-logo-container { margin-bottom: 10px; }
    .main-title { font-size: 2rem; margin-bottom: 20px; }
    .steps-subtitle { margin-bottom: 10px; }
    .start-action { margin-top: 25px; }
    .step-box { padding: 15px; }
}

@media (min-width: 601px) and (max-height: 700px) {
    .main-logo { width: 75px; }
    .main-title { font-size: 1.6rem; margin-bottom: 15px; }
    .step-box { padding: 10px; gap: 10px; }
    .start-action { margin-top: 15px; }
    .step-title { font-size: 1rem; }
    .step-icon { width: 36px; height: 36px; }
}
