/* ==========================================
   DEEGET ONBOARDING PORTAL — ESTILOS PROPIOS
   ========================================== */

:root {
    --color-bg-dark: #0F0F1A;
    --color-surface: #1A1A2E;
    --color-surface-card: #16162A;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #A0A0B8;
    --color-text-muted: #6B6B85;

    --gradient-brand: linear-gradient(135deg, #FF3366, #FF9933);

    --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    font-size: 16px;
    background-color: var(--color-bg-dark);
}

body {
    font-family: 'Zalando Sans', sans-serif;
    line-height: 1.5;
    color: var(--color-text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

h1, h2 {
    font-weight: 900;
    letter-spacing: -0.02em;
}

/* Fondo mesh sutil */
.background-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 51, 102, 0.15), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(255, 153, 51, 0.12), transparent 40%),
        var(--color-bg-dark);
}

.onboarding-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

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

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.logo-container h1 {
    font-size: 1.6rem;
}

.logo-container h1 span {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

header > p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* Formulario */
#onboarding-form {
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 2.5rem;
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-of-type {
    margin-bottom: 2rem;
}

.form-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.input-group input[type="text"],
.input-group input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-fast);
}

.input-group input[type="text"]:focus,
.input-group input[type="url"]:focus {
    outline: none;
    border-color: #FF3366;
}

.input-group input::placeholder {
    color: var(--color-text-muted);
}

.input-group small {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.slug-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-fast);
}

.slug-input-wrapper:focus-within {
    border-color: #FF3366;
}

.slug-input-wrapper .prefix {
    padding: 12px 0 12px 16px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.slug-input-wrapper input {
    flex: 1;
    padding: 12px 16px 12px 4px;
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.slug-input-wrapper input:focus {
    outline: none;
}

/* Color pickers */
.color-pickers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 8px 12px;
}

.color-picker-wrapper input[type="color"] {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.color-picker-wrapper .hex-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

/* Botones */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--gradient-brand);
    color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 51, 102, 0.25);
}

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

.btn-secondary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    border-color: #FF3366;
}

.loader,
.loader-circle {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 0.8s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* Panel de éxito */
.success-panel {
    background: var(--color-surface-card);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 32px;
    height: 32px;
}

.success-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.success-panel > p {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.urls-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.url-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.url-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.url-link {
    color: #FF9933;
    text-decoration: none;
    word-break: break-all;
    font-size: 0.95rem;
}

.url-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .onboarding-container {
        padding: 2.5rem 1rem 4rem;
    }

    #onboarding-form,
    .success-panel {
        padding: 1.75rem;
    }

    .color-pickers {
        grid-template-columns: 1fr;
    }
}
