*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-1: #030714;
    --bg-2: #071123;
    --bg-3: #0a1730;

    --card: rgba(7, 18, 39, 0.88);
    --card-strong: rgba(10, 20, 42, 0.96);

    --border: rgba(85, 170, 255, 0.14);
    --text-main: #f4f8ff;
    --text-soft: #93a7c7;
    --text-muted: #7082a2;

    --blue-glow: #33aaff;
    --gold-glow: #ffb300;
    --gold-soft: #ffd86b;

    --success-bg: rgba(18, 152, 77, 0.15);
    --success-border: rgba(53, 224, 130, 0.32);
    --success-text: #8affb8;

    --error-bg: rgba(183, 35, 48, 0.16);
    --error-border: rgba(255, 103, 124, 0.30);
    --error-text: #ffb4c0;

    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;

    --shadow-card:
        0 0 0 1px rgba(255,255,255,0.02) inset,
        0 0 35px rgba(0, 140, 255, 0.10),
        0 0 80px rgba(255, 179, 0, 0.06),
        0 24px 80px rgba(0, 0, 0, 0.55);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 179, 0, 0.16), transparent 20%),
        radial-gradient(circle at 85% 18%, rgba(33, 150, 243, 0.22), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(0, 140, 255, 0.15), transparent 35%),
        linear-gradient(135deg, #01040b 0%, #031020 30%, #04162d 58%, #020814 100%);
    overflow-x: hidden;
    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
    opacity: 0.14;
}

body::after {
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 183, 0, 0.14), transparent 18%),
        radial-gradient(circle at 80% 70%, rgba(51, 170, 255, 0.16), transparent 20%);
    filter: blur(30px);
    opacity: 0.85;
}

.page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    position: relative;
    z-index: 1;
}

.wrapper {
    width: 100%;
    max-width: 820px;
}

.card {
    position: relative;
    background: linear-gradient(180deg, rgba(8, 20, 45, 0.92) 0%, rgba(4, 12, 28, 0.95) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255,179,0,0.08), transparent 28%, transparent 65%, rgba(51,170,255,0.08));
    pointer-events: none;
}

.card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-16deg);
    pointer-events: none;
    opacity: 0.55;
}

.corner-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(24px);
    pointer-events: none;
    z-index: 1;
}

.corner-glow.top-right {
    top: -30px;
    right: -30px;
    width: 130px;
    height: 130px;
    background: rgba(255, 179, 0, 0.12);
}

.corner-glow.bottom-left {
    bottom: -30px;
    left: -30px;
    width: 140px;
    height: 140px;
    background: rgba(51, 170, 255, 0.10);
}

.top-accent,
.title-block,
.status,
.form-shell,
.footer-note {
    position: relative;
    z-index: 2;
}

.top-accent {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(17, 30, 60, 0.85);
    border: 1px solid rgba(255, 183, 0, 0.22);
    color: var(--gold-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 0 18px rgba(255, 179, 0, 0.08);
}

.badge::before {
    content: "◆";
    color: var(--blue-glow);
    font-size: 10px;
    text-shadow: 0 0 10px rgba(51, 170, 255, 0.7);
}

.hero-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,183,0,0.35), rgba(51,170,255,0.05), rgba(51,170,255,0.35));
}

.title-block {
    margin-bottom: 18px;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 7vw, 3.4rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #f8fbff;
    text-shadow:
        0 0 14px rgba(255,255,255,0.08),
        0 0 28px rgba(51,170,255,0.10);
    overflow-wrap: break-word;
}

.title-highlight {
    display: inline-block;
    background: linear-gradient(90deg, #ffffff 0%, #ffe8a3 24%, #6dc7ff 60%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.65;
}

.status {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.55;
    border: 1px solid transparent;
    word-break: break-word;
    backdrop-filter: blur(8px);
}

.status.success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.status.error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

.form-shell {
    display: grid;
    gap: 14px;
}

.panel {
    background: linear-gradient(180deg, rgba(9, 20, 46, 0.78) 0%, rgba(6, 14, 33, 0.90) 100%);
    border: 1px solid rgba(66, 133, 244, 0.14);
    border-radius: 18px;
    padding: 14px;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.02),
        0 12px 30px rgba(0,0,0,0.25);
}

.form-group {
    margin: 0;
}

label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #d9e7ff;
    line-height: 1.4;
}

label::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 3px;
    flex: 0 0 9px;
    background: linear-gradient(135deg, var(--gold-glow), var(--blue-glow));
    box-shadow: 0 0 12px rgba(255, 179, 0, 0.4);
}

textarea,
input[type="number"] {
    width: 100%;
    border: 1px solid rgba(100, 136, 202, 0.18);
    background: linear-gradient(180deg, rgba(3, 12, 30, 0.96) 0%, rgba(4, 14, 35, 0.98) 100%);
    color: var(--text-main);
    border-radius: 16px;
    padding: 14px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.015);
    appearance: none;
    -webkit-appearance: none;
}

textarea::placeholder,
input::placeholder {
    color: #6f84a7;
}

textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

textarea:focus,
input:focus {
    border-color: rgba(255, 183, 0, 0.35);
    box-shadow:
        0 0 0 4px rgba(51, 170, 255, 0.10),
        0 0 18px rgba(255, 179, 0, 0.12);
}

.helper-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.helper {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.counter {
    font-size: 12px;
    color: #c5d6f4;
    font-weight: 700;
    letter-spacing: 0.03em;
    align-self: flex-end;
}

.captcha-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.captcha-question {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    text-align: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(17, 31, 61, 0.95), rgba(11, 21, 45, 0.98));
    border: 1px solid rgba(255, 183, 0, 0.16);
    font-weight: 900;
    color: #f8fbff;
    font-size: 16px;
    letter-spacing: 0.01em;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.02),
        0 0 18px rgba(255, 179, 0, 0.05);
}

.input-wrap {
    position: relative;
}

.input-wrap::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 12px;
    border: 1px solid rgba(51,170,255,0.05);
    pointer-events: none;
}

.submit-bar {
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding-top: 2px;
    background: linear-gradient(to bottom, rgba(4, 12, 28, 0), rgba(4, 12, 28, 0.9) 35%);
}

.btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 16px 18px;
    min-height: 54px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: linear-gradient(90deg, #ffb300 0%, #ffd86b 16%, #35a8ff 55%, #0d67ff 100%);
    color: #06111f;
    box-shadow:
        0 0 20px rgba(51, 170, 255, 0.22),
        0 0 26px rgba(255, 179, 0, 0.18),
        0 12px 35px rgba(0, 0, 0, 0.35);
    -webkit-tap-highlight-color: transparent;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -20%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.45s ease;
}

.footer-note {
    margin-top: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.65;
    padding: 0 2px;
}

.footer-note strong {
    color: #cfe2ff;
    font-weight: 800;
}

/* Tablet y escritorio */
@media (min-width: 640px) {
    .page {
        padding: 28px 18px;
    }

    .card {
        padding: 28px;
        border-radius: 24px;
    }

    .top-accent {
        margin-bottom: 20px;
    }

    .badge {
        font-size: 12px;
        padding: 10px 16px;
    }

    .subtitle {
        font-size: 15px;
    }

    .status {
        padding: 15px 16px;
        font-size: 14px;
        border-radius: 18px;
    }

    .panel {
        padding: 18px;
        border-radius: 20px;
    }

    label {
        font-size: 12px;
        margin-bottom: 12px;
    }

    textarea,
    input[type="number"] {
        padding: 16px;
        border-radius: 18px;
    }

    textarea {
        min-height: 220px;
    }

    .helper-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }

    .counter {
        align-self: auto;
        white-space: nowrap;
    }

    .captcha-grid {
        grid-template-columns: minmax(0, 1.3fr) minmax(140px, 0.7fr);
        align-items: stretch;
        gap: 14px;
    }

    .captcha-question {
        justify-content: flex-start;
        text-align: left;
        min-height: 58px;
        padding: 14px 18px;
        font-size: 17px;
    }

    .submit-bar {
        position: static;
        background: none;
        padding-top: 0;
    }

    .btn {
        border-radius: 18px;
        min-height: 56px;
        font-size: 15px;
        padding: 17px 20px;
    }

    .footer-note {
        margin-top: 18px;
        font-size: 12px;
    }
}

@media (min-width: 769px) {
    .page {
        align-items: center;
    }

    .card::after {
        display: block;
    }
}

/* Móvil puro */
@media (max-width: 520px) {
    body::before {
        opacity: 0.08;
    }

    body::after {
        opacity: 0.55;
        filter: blur(36px);
    }

    .page {
        align-items: flex-start;
        padding: 10px;
    }

    .wrapper {
        max-width: 100%;
    }

    .card {
        width: 100%;
        padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
        border-radius: 18px;
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.02) inset,
            0 0 18px rgba(0, 140, 255, 0.07),
            0 14px 30px rgba(0, 0, 0, 0.42);
    }

    .card::after {
        display: none;
    }

    .corner-glow.top-right {
        width: 90px;
        height: 90px;
        top: -18px;
        right: -18px;
    }

    .corner-glow.bottom-left {
        width: 95px;
        height: 95px;
        left: -18px;
        bottom: -18px;
    }

    .top-accent {
        margin-bottom: 14px;
    }

    .hero-line {
        display: none;
    }

    .badge {
        width: 100%;
    }

    h1 {
        margin-bottom: 10px;
    }

    .title-block {
        margin-bottom: 16px;
    }

    .subtitle {
        font-size: 13.5px;
        line-height: 1.55;
    }

    textarea {
        min-height: 160px;
    }

    .captcha-question {
        font-size: 15px;
        min-height: 52px;
    }

    .helper,
    .counter,
    .footer-note {
        font-size: 11px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-2px) scale(1.005);
        box-shadow:
            0 0 24px rgba(51, 170, 255, 0.28),
            0 0 30px rgba(255, 179, 0, 0.22),
            0 18px 45px rgba(0, 0, 0, 0.42);
    }

    .btn:hover::before {
        left: 110%;
    }
}

@media (hover: none) {
    .btn:hover {
        transform: none;
    }

    .btn:hover::before {
        left: -20%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


.stats-panel {
    margin-top: 32px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.stats-panel h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #ffffff;
}

.stats-subtitle {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-box {
    padding: 18px 14px;
    border-radius: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 8px;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
}

.stat-box.total {
    border-color: rgba(120, 180, 255, 0.35);
}

.stat-box.publicado {
    border-color: rgba(70, 220, 140, 0.35);
}

.stat-box.pendiente {
    border-color: rgba(255, 200, 80, 0.35);
}

.stat-box.moderar {
    border-color: rgba(255, 100, 100, 0.35);
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}