:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --light-blue: #eff6ff;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --gradient-light: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
}

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

.logo img {
    height: 44px;
    width: auto;
}

.powered-by {
    font-size: 0.7rem;
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.powered-by:hover {
    color: var(--primary);
}

.nav-back {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.nav-back:hover {
    color: var(--primary);
}

/* Main Content */
.main {
    padding: 7rem 1.25rem 3rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.onboarding-container {
    width: 100%;
    max-width: 600px;
}

.onboarding-header {
    text-align: center;
    margin-bottom: 2rem;
}

.onboarding-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light-blue);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.onboarding-header h1 {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.onboarding-header p {
    color: var(--gray);
    font-size: 1rem;
}

/* Form */
.onboarding-form-wrapper {
    background: var(--white);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.06);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-group .label-hint {
    font-weight: 400;
    color: var(--gray);
    font-size: 0.8rem;
    display: block;
    margin-top: 0.25rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--light);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 12px;
    color: var(--dark);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-light);
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-upload-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--light);
    border: 2px dashed rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.file-upload:hover .file-upload-label {
    border-color: var(--primary);
    background: var(--light-blue);
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.file-upload-text {
    color: var(--gray);
    font-size: 0.9rem;
}

.file-upload-text strong {
    color: var(--primary);
}

.file-upload-hint {
    color: var(--gray-light);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.file-name {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--light-blue);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--primary);
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.file-name.show {
    display: flex;
}

/* Submit Button */
.form-submit {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
    min-height: 52px;
    -webkit-appearance: none;
    appearance: none;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}

.form-note {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 1rem;
    text-align: center;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 2rem;
}

.success-message.show {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    color: #16a34a;
}

.success-message h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.success-message p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.success-message a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.success-message a:hover {
    text-decoration: underline;
}

/* Status Messages */
.status-message {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

.status-message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
    border: 1px solid #fca5a5;
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.status-message.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
    border: 1px solid #86efac;
    animation: slideIn 0.5s ease-out;
}

.status-message.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.status-message.exists {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-message.info .status-icon {
    animation: pulse 2s ease-in-out infinite;
}

.status-message.error .status-icon {
    animation: wiggle 0.5s ease-in-out;
}

.status-message.success .status-icon {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.status-message.exists .status-icon {
    animation: rotate 0.5s ease-out;
}

@keyframes shake {

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

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotate {
    from {
        transform: rotate(-180deg);
    }

    to {
        transform: rotate(0deg);
    }
}

/* Loading State */
.form-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.form-submit.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.footer {
    padding: 2rem 1.25rem;
    background: var(--white);
    border-top: 1px solid rgba(37, 99, 235, 0.08);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    color: var(--gray);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.footer-powered {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.footer-powered a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-powered a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive */
@media (min-width: 640px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .main {
        padding: 8rem 2rem 4rem;
    }

    .onboarding-header h1 {
        font-size: 2rem;
    }

    .onboarding-form-wrapper {
        padding: 2.5rem;
    }
}