@font-face {
    font-family: 'Outfit';
    src: url('/mensajero/assets/fonts/Outfit-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/mensajero/assets/fonts/Outfit-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('/mensajero/assets/fonts/Outfit-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #60a5fa;
    --accent-glow: rgba(96, 165, 250, 0.3);
    --accent-hover: #3b82f6;
    --success: #10b981;
    --error: #ef4444;
    --font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--card-border);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

header {
    text-align: center;
    margin-bottom: 32px;
}

h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #e0f2fe 0%, #60a5fa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
}

textarea {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    color: var(--text-primary);
    padding: 20px;
    font-family: inherit;
    font-size: 1.05rem;
    resize: vertical;
    min-height: 140px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 4px var(--accent-glow), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

textarea::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.char-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--card-border);
    padding: 4px 10px;
    border-radius: 20px;
    pointer-events: none;
    transition: color 0.3s;
}

.text-disabled-hint {
    margin-top: 0.25rem;
    text-align: center;
    color: #fbbf24;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.mode-gate {
    margin-bottom: 24px;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: center;
}

.mode-gate-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mode-gate h2 {
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.mode-gate p {
    color: #cbd5e1;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-actions {
    display: grid;
    gap: 12px;
}

.btn-secondary-action {
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-primary);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-secondary-action:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(30, 41, 59, 0.85);
}

.btn-secondary-action:active {
    transform: translateY(1px);
}

.btn-secondary-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.hidden {
    display: none !important;
}

.feedback {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.feedback.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.feedback.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

@media (max-width: 480px) {
    .container {
        padding: 24px;
        border-radius: 20px;
    }

    h1 {
        font-size: 1.5rem;
    }
}
