:root {
    --bg-color: #0b0e14;
    --card-bg: rgba(23, 27, 34, 0.7);
    --primary: #4f46e5;
    --accent: #3b82f6;
    --text-main: #f3f4f6;
    --text-dim: #9ca3af;
    --success: #10b981;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 60px 20px;
}

.container {
    max-width: 680px;
    margin: 0 auto;
}

/* Language Switcher */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.lang-switcher button {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-switcher button:hover {
    color: white;
    border-color: var(--primary);
}

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

h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 span {
    display: block;
    font-size: 1.6rem;
    margin-top: 10px;
    color: var(--text-main);
    -webkit-text-fill-color: var(--text-main);
}

.tool-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 32px;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #fff;
}

label {
    display: block;
    font-size: 0.95rem;
    color: var(--accent);
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

label:first-of-type {
    margin-top: 12px;
}

input,
textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
}

.output-area {
    margin-top: 16px;
    background: #000;
    border-radius: 12px;
    padding: 16px;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Monaco, monospace;
    font-size: 0.9rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

pre,
code {
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--success);
}

/* 图标复制按钮 */
.btn-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
}

.btn-copy svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.btn-copy:hover {
    background: var(--accent);
}

/* 优化后的、紧凑的 Action 按钮 */
.btn-action {
    display: block;
    margin: 24px auto 0 auto;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

footer {
    text-align: center;
    margin-top: 50px;
    color: var(--text-dim);
    font-size: 0.8rem;
}