﻿
:root {
    --background: hsl(245, 20%, 98%);
    --foreground: hsl(222.2, 84%, 4.9%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(222.2, 84%, 4.9%);
    --primary: hsl(234, 89%, 74%);
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-glow: hsl(234, 89%, 84%);
    --secondary: hsl(210, 40%, 96.1%);
    --secondary-foreground: hsl(222.2, 47.4%, 11.2%);
    --muted: hsl(210, 40%, 96.1%);
    --muted-foreground: hsl(215.4, 16.3%, 46.9%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(210, 40%, 98%);
    --border: hsl(214.3, 31.8%, 91.4%);
    --input: hsl(214.3, 31.8%, 91.4%);
    --ring: hsl(222.2, 84%, 4.9%);
    --step-active: hsl(234, 89%, 74%);
    --step-inactive: hsl(210, 20%, 85%);
    --gradient-primary: linear-gradient(135deg, hsl(234, 89%, 74%) 0%, hsl(264, 47%, 68%) 100%);
    --gradient-background: linear-gradient(135deg, hsl(245, 20%, 98%) 0%, hsl(220, 26%, 88%) 100%);
    --gradient-card: linear-gradient(135deg, hsl(0, 0%, 100%) 0%, hsl(220, 16%, 97%) 100%);
    --shadow-elegant: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 4px 12px rgba(102, 126, 234, 0.4);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 0.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gradient-background);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    color: var(--foreground);
}

.container {
    width: 100%;
    max-width: 42rem;
    animation: fadeIn 0.6s ease-out;
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.title {
    font-size: 1.875rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.subtitle {
    color: var(--muted-foreground);
    font-size: 1rem;
}

.card {
    background: var(--gradient-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-elegant);
    overflow: hidden;
    border: 0;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--card-foreground);
}

.card-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.card-content {
    padding: 1.5rem;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    overflow-x: auto;
    min-width: 0;
}

.step-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.step-circle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.step-circle {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

    .step-circle.active {
        background: var(--gradient-primary);
        color: white;
        box-shadow: var(--shadow-glow);
    }

    .step-circle.inactive {
        background: var(--step-inactive);
        color: var(--muted-foreground);
    }

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
    transition: var(--transition-smooth);
    text-align: center;
    white-space: nowrap;
}

    .step-label.active {
        color: var(--step-active);
    }

    .step-label.inactive {
        color: var(--muted-foreground);
    }

.step-connector {
    width: 0.5rem;
    height: 2px;
    margin: 0 0.125rem;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

    .step-connector.active {
        background: var(--step-active);
    }

    .step-connector.inactive {
        background: var(--step-inactive);
    }

/* Form Elements */
.form-content {
    min-height: 16rem;
}

.form-step {
    display: none;
    animation: slideIn 0.4s ease-out;
}

    .form-step.active {
        display: block;
    }

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--card-foreground);
    font-size: 1rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    font-size: 1rem;
    transition: var(--transition-smooth);
    background: var(--card);
    color: var(--foreground);
}

    .form-input:focus, .form-select:focus, .form-textarea:focus {
        outline: none;
        border-color: var(--step-active);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

.form-textarea {
    min-height: 6rem;
    resize: vertical;
}

.form-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
}

.button-left {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: calc(var(--radius) - 2px);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-size: 1rem;
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

    .btn-primary:hover {
        opacity: 0.9;
        transform: translateY(-1px);
    }

.btn-outline {
    background: var(--card);
    border: 1px solid var(--input);
    color: var(--foreground);
}

    .btn-outline:hover {
        background: var(--secondary);
    }

.btn-destructive {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

    .btn-destructive:hover {
        background: hsl(0, 84.2%, 55%);
    }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Toast notification */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-elegant);
    max-width: 20rem;
    z-index: 1000;
    animation: slideInToast 0.3s ease-out;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--card-foreground);
}

.toast-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 1.25rem;
    }

    .header {
        margin-bottom: 1rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .card-content, .card-header {
        padding: 1rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .step-indicator {
        margin-bottom: 1.5rem;
    }

    .step-circle {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.625rem;
    }

    .steps-container {
        gap: 0.125rem;
    }

    .step-connector {
        width: 0.375rem;
        margin: 0 0.0625rem;
    }

    .form-input, .form-select, .form-textarea {
        padding: 0.625rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-label {
        font-size: 0.875rem;
    }

    .form-description {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        min-height: 2.75rem;
    }

    .button-group {
        flex-direction: column-reverse;
        gap: 1rem;
        padding-top: 1rem;
    }

    .button-left {
        order: 2;
        width: 100%;
        justify-content: space-between;
    }

    .btn-next {
        order: 1;
        width: 100%;
    }

    .btn-outline, .btn-destructive {
        flex: 1;
    }

    .toast {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.375rem;
    }

    .step-circle {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.625rem;
    }

    .step-label {
        font-size: 0.5rem;
    }

    .steps-container {
        gap: 0.0625rem;
    }

    .step-connector {
        width: 0.25rem;
    }
}

@media (max-width: 360px) {
    .steps-container {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 0.5rem;
    }
}

/* PWA and Touch optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.98);
    }
}

/* iOS safe area */
@Chat (padding: max(0px)) {
    body {
        padding-left: max(0.5rem, env(safe-area-inset-left));
        padding-right: max(0.5rem, env(safe-area-inset-right));
    }
}

