:root {
    --bg-color: #050507;
    --card-bg: #121214;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --accent: #22d3ee;
    --danger: #ef4444;
    --border: #27272a;
    --radius: 16px;
    --font-main: 'Inter', 'Microsoft YaHei', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 40px 20px;
    text-align: center;
}

header {
    margin-bottom: 40px;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.nav-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.highlight {
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.hidden {
    display: none !important;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

input,
textarea {
    width: 100%;
    background: #1e1e22;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.2s;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.primary {
    background: var(--primary);
    color: white;
}

.primary:hover {
    background: var(--primary-hover);
}

.secondary {
    background: #27272a;
    color: white;
}

.secondary:hover {
    background: #3f3f46;
}

.info-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 16px;
    text-align: center;
}

/* Result States */
#read-result {
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.burn-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.message-content {
    background: #000;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    text-align: left;
    overflow-x: auto;
}

pre {
    font-family: var(--font-mono);
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-main);
}

.warning-text {
    color: var(--danger);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    animation: fadeUp 0.3s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}