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

body {
    min-height: 100vh;
    background: #0a0a0f;
    color: #e8e8f0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    display: flex;
    justify-content: center;
    padding: 30px 16px;
}

.container {
    width: 100%;
    max-width: 640px;
}

h1 {
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #f7c948, #ee5a9b, #7c5cf7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    padding: 10px;
    border: 1px solid #2a2a3a;
    border-radius: 10px;
    background: #12121a;
    color: #888;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.tab.active {
    background: #1e1e2e;
    color: #e8e8f0;
    border-color: #7c5cf7;
}

.mode { display: flex; flex-direction: column; gap: 12px; }
.hidden { display: none !important; }

.input-row {
    display: flex;
    gap: 10px;
}

.input-row input, textarea {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid #2a2a3a;
    border-radius: 12px;
    background: #12121a;
    color: #e8e8f0;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.input-row input:focus, textarea:focus {
    border-color: #7c5cf7;
}

textarea {
    resize: vertical;
    min-height: 160px;
}

.action-btn {
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c5cf7, #ee5a9b);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.action-btn:hover { opacity: 0.9; }
.action-btn:active { transform: scale(0.98); }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.status {
    text-align: center;
    padding: 12px;
    color: #aaa;
    font-size: 0.95rem;
}

.status.error { color: #f55; }

.result-wrap {
    margin-top: 20px;
    border: 1px solid #2a2a3a;
    border-radius: 14px;
    background: #12121a;
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #2a2a3a;
    background: #16161f;
}

.result-header span {
    font-weight: 600;
    color: #aaa;
    font-size: 0.9rem;
}

.copy-btn {
    padding: 6px 14px;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    background: #1e1e2e;
    color: #ccc;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.copy-btn:hover { background: #2a2a3e; color: #fff; }

#resultText {
    padding: 16px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.92rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 500px;
    overflow-y: auto;
}

@media (max-width: 500px) {
    .input-row { flex-direction: column; }
    h1 { font-size: 1.8rem; }
}
