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

:root {
    --gradient-1: #7588ff;
    --gradient-2: #8b5cf6;
    --gradient-3: #f093fb;
    --glass-border: rgba(255, 255, 255, 0.14);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.72);
    --text-soft: rgba(255, 255, 255, 0.52);
    --accent: #fbbf24;
    --green: #34d399;
    --danger: #fb7185;
    --page-bg: #0d0b22;
    --panel-bg: rgba(25, 22, 54, 0.88);
    --control-bg: rgba(255, 255, 255, 0.055);
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -20%, rgba(118, 75, 162, 0.38), transparent 42rem),
        linear-gradient(145deg, #0f0c29 0%, #211b4d 48%, #15132e 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        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: 48px 48px;
    content: "";
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-glow::before,
.bg-glow::after {
    position: absolute;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    content: "";
    filter: blur(120px);
    opacity: 0.22;
    animation: drift 18s ease-in-out infinite;
}

.bg-glow::before {
    top: -15rem;
    left: -10rem;
    background: #667eea;
}

.bg-glow::after {
    right: -12rem;
    bottom: -14rem;
    background: #e879f9;
    animation-delay: -9s;
}

@keyframes drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(2rem, -1.5rem, 0) scale(1.08);
    }
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    max-width: 1200px;
}

.feedback-shell {
    position: relative;
    z-index: 1;
    width: min(1052px, calc(100% - 48px));
    margin: 0 auto;
    padding: 38px 0 80px;
}

.feedback-hero {
    position: relative;
    display: grid;
    min-height: 320px;
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: center;
    gap: 26px;
    overflow: hidden;
    padding: 50px 54px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 32px;
    background:
        radial-gradient(circle at 80% 35%, rgba(240, 147, 251, 0.2), transparent 17rem),
        linear-gradient(125deg, rgba(103, 81, 190, 0.46), rgba(28, 24, 62, 0.9) 62%);
    box-shadow: 0 30px 80px rgba(7, 5, 25, 0.32);
    isolation: isolate;
}

.feedback-hero::before {
    position: absolute;
    top: -7rem;
    right: -2rem;
    z-index: -1;
    width: 24rem;
    height: 24rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow:
        0 0 0 42px rgba(255, 255, 255, 0.025),
        0 0 0 86px rgba(255, 255, 255, 0.018);
    content: "";
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d8d4ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-kicker::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.12);
    content: "";
}

.feedback-hero h1 {
    max-width: 680px;
    margin-top: 15px;
    margin-bottom: 32px;
    font-size: clamp(2.35rem, 5.4vw, 4.35rem);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.feedback-hero h1 span {
    display: block;
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
    color: transparent;
    background: linear-gradient(100deg, #ffffff 10%, #c8c0ff 55%, #f4a9fb 100%);
    background-clip: text;
    -webkit-background-clip: text;
}

.hero-description {
    max-width: 640px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.issue-button,
.secondary-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 13px;
    font-size: 0.92rem;
    font-weight: 750;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.issue-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.issue-button:focus-visible,
.secondary-button:focus-visible,
.btn-submit:focus-visible,
.dismiss-error:focus-visible {
    outline: 3px solid rgba(196, 181, 253, 0.78);
    outline-offset: 3px;
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
    color: var(--text-soft);
    font-size: 0.78rem;
}

.hero-note::before {
    width: 18px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    content: "";
}

.hero-mascot {
    position: relative;
    z-index: 1;
    align-self: end;
    justify-self: center;
}

.hero-mascot::before {
    position: absolute;
    right: 50%;
    bottom: 12px;
    z-index: -1;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(117, 136, 255, 0.36), rgba(240, 147, 251, 0.15));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    content: "";
    transform: translateX(50%);
}

.hero-mascot img {
    display: block;
    width: 205px;
    height: auto;
    filter: drop-shadow(0 18px 25px rgba(5, 4, 19, 0.34));
}

.feedback-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.82fr);
    align-items: start;
    gap: 24px;
    margin-top: 24px;
}

.form-card,
.side-card {
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    background: var(--panel-bg);
    box-shadow: 0 22px 60px rgba(7, 5, 25, 0.22);
    backdrop-filter: blur(18px);
}

.form-card {
    position: relative;
    overflow: hidden;
    padding: 34px;
    scroll-margin-top: 24px;
}

.form-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-3), var(--accent));
    content: "";
}

.form-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.form-card-header h2,
.side-card h2,
.success-state h2 {
    margin-top: 7px;
    font-size: 1.55rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.required-note {
    flex: 0 0 auto;
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 0.76rem;
}

.required-note b,
.required-mark {
    color: #f9a8d4;
}

#feedbackForm {
    display: grid;
    gap: 24px;
}

.form-section {
    min-width: 0;
    border: 0;
}

.form-section legend,
.field-label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.88rem;
    font-weight: 720;
}

.field-optional {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 500;
}

.type-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.type-option {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.type-label {
    display: flex;
    min-height: 96px;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    user-select: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.type-label:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.065);
    transform: translateY(-2px);
}

.type-option:focus-visible + .type-label {
    outline: 3px solid rgba(196, 181, 253, 0.7);
    outline-offset: 2px;
}

.type-option:checked + .type-label {
    border-color: rgba(139, 92, 246, 0.85);
    background: linear-gradient(145deg, rgba(117, 136, 255, 0.2), rgba(139, 92, 246, 0.12));
    box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.12);
}

.type-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 11px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    font-size: 1rem;
    font-weight: 850;
}

#type-bug:checked + .type-label .type-mark {
    color: #fecdd3;
    background: rgba(251, 113, 133, 0.16);
}

#type-feature:checked + .type-label .type-mark {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.16);
}

#type-question:checked + .type-label .type-mark {
    color: #bfdbfe;
    background: rgba(96, 165, 250, 0.16);
}

.type-text {
    min-width: 0;
}

.type-text strong,
.type-text small {
    display: block;
}

.type-text strong {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.87rem;
}

.type-text small {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 0.7rem;
    line-height: 1.35;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    min-width: 0;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 13px;
    outline: none;
    color: var(--text);
    background: var(--control-bg);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.form-input,
.form-select {
    min-height: 49px;
    padding: 0 14px;
}

.form-select {
    color-scheme: dark;
}

.form-select option {
    color: #ffffff;
    background: #211b4d;
}

.form-textarea {
    min-height: 180px;
    padding: 13px 14px;
    line-height: 1.55;
    resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: rgba(255, 255, 255, 0.24);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: rgba(139, 92, 246, 0.95);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.message-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 0.72rem;
}

.message-counter {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.form-alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 44px 14px 14px;
    border: 1px solid rgba(251, 113, 133, 0.3);
    border-radius: 14px;
    color: #fecdd3;
    background: rgba(159, 18, 57, 0.18);
    font-size: 0.84rem;
    line-height: 1.5;
}

.alert-mark {
    display: inline-grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    color: #3f0712;
    background: #fda4af;
    font-size: 0.8rem;
    font-weight: 900;
}

.dismiss-error {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #fecdd3;
    background: transparent;
    font-size: 1.2rem;
}

.dismiss-error:hover {
    background: rgba(255, 255, 255, 0.08);
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 2px;
}

.form-privacy {
    max-width: 285px;
    color: var(--text-soft);
    font-size: 0.72rem;
    line-height: 1.55;
}

.form-privacy a {
    color: rgba(255, 255, 255, 0.74);
    text-underline-offset: 3px;
}

.form-privacy a:hover {
    color: #ffffff;
}

.btn-submit {
    display: inline-flex;
    min-width: 218px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea, #8b5cf6);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.28);
    font-size: 0.91rem;
    font-weight: 780;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
    box-shadow: 0 16px 38px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-submit:disabled {
    cursor: wait;
    opacity: 0.66;
}

.button-arrow {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

.btn-submit:hover:not(:disabled) .button-arrow {
    transform: translateX(3px);
}

.button-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.34);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-submit.is-loading .button-arrow {
    display: none;
}

.btn-submit.is-loading .button-spinner {
    display: block;
}

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

.feedback-aside {
    display: grid;
    gap: 18px;
}

.side-card {
    padding: 25px;
}

.github-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.17);
    background:
        radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.11), transparent 12rem),
        linear-gradient(145deg, rgba(19, 20, 29, 0.96), rgba(29, 25, 54, 0.96));
}

.github-card::after {
    position: absolute;
    right: -28px;
    bottom: -40px;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
}

.github-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.github-logo {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    background: #ffffff;
}

.github-logo img {
    width: 23px;
    height: 23px;
}

.github-card h2 {
    margin-top: 0;
    font-size: 1.3rem;
}

.github-card p,
.tips-intro {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

.issue-button {
    width: 100%;
    margin-top: 20px;
    padding: 0 16px;
    color: #17171d;
    background: #ffffff;
}

.issue-button:hover {
    background: #f4f4f5;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.public-note {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.68rem;
    line-height: 1.5;
}

.tips-card {
    background: linear-gradient(145deg, rgba(36, 31, 74, 0.92), rgba(24, 21, 51, 0.92));
}

.tips-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
    list-style: none;
}

.tips-list li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 11px;
    color: var(--text-muted);
    font-size: 0.79rem;
    line-height: 1.5;
}

.tip-number {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(196, 181, 253, 0.23);
    border-radius: 10px;
    color: #ddd6fe;
    background: rgba(139, 92, 246, 0.11);
    font-size: 0.72rem;
    font-weight: 800;
}

.tips-list strong {
    display: block;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
}

.privacy-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 18px;
    color: rgba(209, 250, 229, 0.76);
    background: rgba(6, 78, 59, 0.16);
    font-size: 0.74rem;
    line-height: 1.55;
}

.privacy-mark {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    color: #a7f3d0;
    background: rgba(52, 211, 153, 0.13);
    font-size: 0.9rem;
}

.success-state {
    display: grid;
    min-height: 520px;
    place-items: center;
    align-content: center;
    padding: 30px;
    text-align: center;
}

.success-icon {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    margin-bottom: 20px;
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 24px;
    color: #a7f3d0;
    background: rgba(52, 211, 153, 0.13);
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.12);
    font-size: 2rem;
}

.success-state p {
    max-width: 420px;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.secondary-button {
    min-height: 46px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.secondary-button:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
}

button.secondary-button {
    cursor: pointer;
}

.repo-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.repo-badges img {
    max-width: 100%;
}

@media (max-width: 900px) {
    .feedback-hero {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) 180px;
        padding: 44px 40px;
    }

    .hero-mascot img {
        width: 165px;
    }

    .hero-mascot::before {
        width: 170px;
        height: 170px;
    }

    .feedback-grid {
        grid-template-columns: 1fr;
    }

    .feedback-aside {
        grid-template-columns: 1fr 1fr;
    }

    .privacy-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .feedback-shell {
        width: calc(100% - 32px);
        padding: 22px 0 60px;
    }

    .feedback-hero {
        display: block;
        padding: 36px 28px;
        border-radius: 25px;
    }

    .feedback-hero h1 {
        max-width: 480px;
        font-size: clamp(2.2rem, 12vw, 3.25rem);
    }

    .hero-description {
        font-size: 0.96rem;
    }

    .hero-copy {
        max-width: 92%;
    }

    .hero-mascot {
        position: absolute;
        right: -28px;
        bottom: -40px;
        z-index: -1;
        opacity: 0.16;
    }

    .hero-mascot img {
        width: 190px;
    }

    .form-card {
        padding: 26px 20px;
        border-radius: 22px;
    }

    .form-card-header {
        display: block;
    }

    .required-note {
        display: inline-block;
        margin-top: 10px;
    }

    .type-selector,
    .form-grid,
    .feedback-aside {
        grid-template-columns: 1fr;
    }

    .type-label {
        min-height: 78px;
    }

    .privacy-card {
        grid-column: auto;
    }

    .form-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-privacy {
        max-width: none;
        text-align: center;
    }

    .btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-note {
        align-items: flex-start;
    }

    .message-meta {
        align-items: flex-end;
        flex-direction: column;
        gap: 4px;
    }

    .success-state {
        min-height: 460px;
        padding: 18px 0;
    }

    .success-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
