:root {
    --glass: rgba(20, 20, 20, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --rainbow: linear-gradient(90deg, #a8edea, #fed6e3, #fac1ff, #d4fc79, #96e6a1, #a8edea);
    --nav-h: 64px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    padding-top: var(--nav-h);
    background: #050505;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
    max-width: 960px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 16px;
}

.nav-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.nav-brand span {
    background: var(--rainbow);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow_move 5s linear infinite;
}

@keyframes rainbow_move {
    to {
        background-position: 200% center;
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    color: #fff;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.2s;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
}

.nav-link.active {
    background: rgba(79, 172, 254, 0.15);
    border-color: rgba(79, 172, 254, 0.4);
    color: #9fd6ff;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 20px;
        background: rgba(12, 12, 12, 0.97);
        border-bottom: 1px solid var(--glass-border);
        gap: 6px;
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
    }

    .nav-menu.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        justify-content: flex-start;
    }
}

.main-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.55);
}

.glass-card h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.sub {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    margin-bottom: 22px;
}

label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
}

textarea {
    min-height: 72px;
    resize: vertical;
}

.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .row-2 {
        grid-template-columns: 1fr;
    }
}

.check-proxy {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 8px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.check-proxy input {
    width: 18px;
    height: 18px;
    accent-color: #4facfe;
}

.btn-submit {
    margin-top: 20px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--rainbow);
    background-size: 200% auto;
    color: #111;
    animation: rainbow_move 4s linear infinite;
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.35);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#result {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.82rem;
    line-height: 1.5;
    max-height: 560px;
    overflow: auto;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--glass-border);
}

.hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 12px;
}

footer {
    text-align: center;
    padding: 16px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
}
