:root {
    --bg-1: #050f2c;
    --bg-2: #08163f;
    --line: rgba(80, 150, 255, 0.2);
    --panel: rgba(11, 21, 48, 0.86);
    --soft-border: rgba(122, 165, 245, 0.28);
    --text: #f5f7ff;
    --muted: #b5c4e8;
    --accent: #ff8b2c;
}

body {
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(circle at center, #0a1a35 0%, #071022 52%, #020617 100%);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: -2;
    background:
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 64px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 100%;
    opacity: 0.2;
}

body::after {
    z-index: -1;
    background:
        radial-gradient(circle at 16% 18%, rgba(65, 118, 255, 0.22), transparent 34%),
        radial-gradient(circle at 86% 14%, rgba(255, 139, 44, 0.16), transparent 34%),
        radial-gradient(circle at 50% 84%, rgba(40, 155, 255, 0.14), transparent 42%);
}

.page {
    max-width: 1160px;
    margin: 26px auto 36px;
    padding: 0 16px;
}

.title {
    text-align: center;
    font-size: clamp(2rem, 3.5vw, 2.9rem);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.subtitle {
    text-align: center;
    max-width: 920px;
    margin: 0 auto 22px;
    color: var(--muted);
    font-size: 1.06rem;
    line-height: 1.55;
}

.tool-card {
    background: var(--panel);
    border: 1px solid var(--soft-border);
    border-radius: 18px;
    min-height: 380px;
    padding: 28px 20px;
    box-shadow: 0 18px 36px rgba(5, 12, 32, 0.36);
}

.inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.label {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #e6eeff;
}

.input-wrap {
    display: inline-flex;
    width: 620px;
    max-width: 100%;
    border: 1px solid rgba(122, 165, 245, 0.4);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(5, 12, 28, 0.85);
}

.input-wrap input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 14px 16px;
    text-align: left;
    color: #f4f7ff;
    background: transparent;
}

.sound-btn {
    border: none;
    border-left: 1px solid rgba(122, 165, 245, 0.4);
    background: rgba(12, 24, 52, 0.92);
    width: 60px;
    cursor: pointer;
    font-size: 1.1rem;
}

.sound-btn:hover {
    background: rgba(20, 36, 72, 0.95);
}

.modes {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 0.98rem;
}

.modes label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #dbe7ff;
}

.modes input[type="radio"] {
    width: 16px;
    height: 16px;
}

.submit-btn {
    margin-top: 20px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: rgba(255, 138, 61, 0.08);
    color: #ffd4b2;
    font-size: 1rem;
    font-weight: 700;
    padding: 11px 28px;
    cursor: pointer;
}

.submit-btn:hover {
    background: rgba(255, 138, 61, 0.2);
}

.result-card {
    margin: 22px auto 0;
    background: rgba(16, 35, 74, 0.95);
    border: 1px solid rgba(122, 165, 245, 0.36);
    border-radius: 14px;
    width: min(320px, 100%);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px 12px;
}

.result-text {
    width: 100%;
    text-align: center;
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.35;
    color: #dbe9ff;
    word-break: break-word;
}

.copy-btn {
    margin-top: 12px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 138, 61, 0.9);
    border-radius: 10px;
    background: rgba(255, 138, 61, 0.12);
    color: #ffe4cf;
    font-size: 1rem;
    cursor: pointer;
}

.copy-btn:hover {
    background: rgba(255, 138, 61, 0.24);
}

@media (max-width: 760px) {
    .page {
        margin-top: 18px;
        padding: 0 12px;
    }

    .title {
        font-size: clamp(1.65rem, 8vw, 2.15rem);
    }

    .subtitle {
        font-size: 0.98rem;
        margin-bottom: 16px;
    }

    .tool-card {
        min-height: 320px;
        padding: 18px 14px;
    }

    .modes {
        gap: 16px;
        font-size: 0.94rem;
    }

    .submit-btn {
        padding: 10px 20px;
    }
}
