:root {
    --bg: #0b0b12;
    --bg-elev: #14141f;
    --bg-card: #1a1a29;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f2f3fb;
    --text-secondary: #a0a6cc;
    --primary: #5a28ff;
    --primary-2: #0c20f7;
    --accent: #8b5cff;
    --danger: #ff4a4a;
    --success: #34d399;
    --radius: 14px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(90, 40, 255, 0.25), transparent 60%),
        radial-gradient(900px 500px at -10% 20%, rgba(12, 32, 247, 0.18), transparent 55%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ===== Header ===== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: rgba(11, 11, 18, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand i { color: var(--accent); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===== Selector de idioma ===== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin-right: 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.lang-switcher i.fa-globe {
    color: var(--accent);
    font-size: 0.85rem;
    margin-right: 2px;
}

.lang-link {
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.lang-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

@media (max-width: 640px) {
    .lang-switcher {
        gap: 4px;
        padding: 4px 8px;
    }
    .lang-link {
        padding: 3px 5px;
        font-size: 0.72rem;
    }
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 8px 20px rgba(90, 40, 255, 0.35);
}

.btn-primary:hover { box-shadow: 0 10px 26px rgba(90, 40, 255, 0.5); }

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

.btn-block { width: 100%; }

/* ===== Main ===== */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ===== Hero (inicio) ===== */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    padding: 40px 0 60px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.hero h1 .grad {
    background: linear-gradient(120deg, var(--accent), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 46ch;
    margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art {
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    background:
        radial-gradient(circle at 30% 30%, rgba(139, 92, 255, 0.45), transparent 55%),
        radial-gradient(circle at 75% 70%, rgba(12, 32, 247, 0.5), transparent 55%),
        var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: grid;
    place-items: center;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.hero-art i { filter: drop-shadow(0 10px 30px rgba(90, 40, 255, 0.6)); }

/* ===== Feature cards ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 10px 0 22px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 20px;
}

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 255, 0.5);
}

.feature .icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(139, 92, 255, 0.15);
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { color: var(--text-secondary); font-size: 0.95rem; }

/* ===== Auth (login / register) ===== */
.auth-wrap {
    max-width: 440px;
    margin: 30px auto;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.auth-card .subtitle {
    color: var(--text-secondary);
    margin-bottom: 26px;
    font-size: 0.95rem;
}

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrap { position: relative; }

.input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.field input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.98rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 255, 0.2);
}

.field select {
    width: 100%;
    padding: 13px 14px 13px 40px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.98rem;
    font-family: inherit;
    appearance: none;
    cursor: pointer;
}

.field input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.resend-form {
    margin-top: 14px;
}

.auth-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.auth-footer a { color: var(--accent); font-weight: 600; }

/* ===== Edit profile (web) ===== */
.profile-wrap .profile-card { max-width: 520px; }

.profile-avatar-editor {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.profile-avatar-preview {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.btn-file {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-file input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.remove-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@media (max-width: 560px) {
    .profile-avatar-editor {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .profile-avatar-actions { align-items: center; }
}

/* ===== Alerts ===== */
.alert {
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 0.92rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(255, 74, 74, 0.12);
    border: 1px solid rgba(255, 74, 74, 0.35);
    color: #ffb4b4;
}

.alert-success {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

/* ===== Footer ===== */
.site-footer {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .features { grid-template-columns: 1fr; }
}
