:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 25px;
}

.logo { font-weight: 600; font-size: 1.5rem; letter-spacing: -1px; }
.logo span { color: var(--accent); }

/* Switch de Modo */
.switch-container { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; }
.switch { position: relative; display: inline-block; width: 44px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(22px); }

.card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid #334155;
    margin-bottom: 15px;
}

.input-row { display: flex; gap: 10px; margin-bottom: 10px; }
.input-row:last-child { margin-bottom: 0; }

input, textarea {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    padding: 12px;
    font-size: 1rem;
    outline: none;
}

input:focus, textarea:focus { border-color: var(--accent); }

textarea { height: 150px; resize: none; }

.counter { text-align: right; font-size: 0.75rem; color: var(--text-dim); margin-top: 5px; }

#actionBtn {
    background: var(--accent);
    color: var(--bg-color);
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    margin: 20px 0;
    cursor: pointer;
}

.result-area label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 8px; }

.output-wrapper { position: relative; }

#resultOutput {
    height: 100px;
    background: #111827;
    border-style: dashed;
    font-family: monospace;
    font-size: 0.9rem;
}

#copyBtn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: #334155;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
}