* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #e0e7ff 0%, #f4f4f4 100%);
    min-height: 100vh;
}

/* ===== APP LAYOUT ===== */
.app {
    display: grid;
    grid-template-columns: 260px 1fr 1fr;
    gap: 14px;
    padding: 14px;
    min-height: 100vh;
}

/* ===== PANELS ===== */
.panel {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 4px 20px rgba(60,80,180,0.08);
    display: flex;
    flex-direction: column;
    position: relative;
}

.panel h2 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: #3730a3;
}

/* ===== OPTIONS ===== */
.options input,
.options button {
    margin-bottom: 10px;
}

/* ===== INPUTS ===== */
input,
textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 7px;
    border: 1.5px solid #c7d2fe;
    background: #f8fafc;
    font-size: 14px;
    color: #222;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px #a5b4fc55;
}

/* ===== TEXTAREAS ===== */
textarea {
    flex: 1;
    resize: none;
    line-height: 1.55;
    font-family: Consolas, Monaco, monospace;
    font-size: 13.5px;
}

.output textarea {
    background: #f1f5f9;
}

/* ===== BUTTONS ===== */
button {
    padding: 11px;
    border-radius: 7px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(90deg, #6366f1 0%, #60a5fa 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(99,102,241,0.15);
    transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s;
}

button:hover {
    opacity: 0.95;
    box-shadow: 0 4px 18px rgba(99,102,241,0.25);
}

button:active {
    transform: scale(0.98);
}

button.danger {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

/* ===== ERROR ===== */
.error {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
    color: #dc2626;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1100px) {
    .app {
        grid-template-columns: 260px 1fr;
    }

    .output {
        grid-column: span 2;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .app {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .panel {
        padding: 12px;
    }

    textarea {
        min-height: 160px;
        font-size: 13px;
    }
}
