/* ===== GLOBAL RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 700px;
    margin: 40px auto;
    padding: 25px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* ===== TITLES ===== */
.title {
    text-align: center;
    font-weight: bold;
    color: rebeccapurple;
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.section-title {
    margin-bottom: 10px;
    color: #555;
}

/* ===== SECTIONS ===== */
.section {
    margin-top: 30px;
}

/* ===== TEXT AREAS ===== */
.input-area, 
.output-area {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: monospace;
    font-size: 14px;
    resize: none;
}

.html-output {
    min-height: 100px;
    white-space: pre-wrap;
}

/* ===== BUTTONS CONTAINER ===== */
.buttons {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* ===== BASE BUTTON STYLE ===== */
.btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* ===== PRIMARY BUTTONS (Encode / Decode) ===== */
#encodeBtn, #decodeBtn {
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    color: white;
}
#encodeBtn:hover, #decodeBtn:hover {
    background: linear-gradient(135deg, #4338ca, #2563eb);
}
#encodeBtn:active, #decodeBtn:active {
    transform: scale(0.96);
}

/* ===== SECONDARY BUTTONS (Copy / Paste) ===== */
#copyEncodeBtn, #pasteEncodeBtn,
#copyDecodeBtn, #pasteDecodeBtn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
#copyEncodeBtn:hover, #pasteEncodeBtn:hover,
#copyDecodeBtn:hover, #pasteDecodeBtn:hover {
    background: #e5e7eb;
}
#copyEncodeBtn:active, #pasteEncodeBtn:active,
#copyDecodeBtn:active, #pasteDecodeBtn:active {
    background: #d1d5db;
    transform: scale(0.97);
}

/* ===== DANGER BUTTONS (Clear) ===== */
.clear-btn {
    background: #ef4444;
    color: white;
}
.clear-btn:hover {
    background: #dc2626;
}
.clear-btn:active {
    background: #b91c1c;
    transform: scale(0.96);
}

/* ===== ERROR HIGHLIGHT ===== */
.error-char {
    color: red;
    font-weight: bold;
}