/* GIAO DIỆN SOFT BRUTALISM - COLOR CONVERTER */
.tool-container {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    max-width: 1100px; margin: 20px auto;
    border: 3px solid #111111; border-radius: 12px;
    box-shadow: 6px 6px 0px #111111; padding: 30px;
    background: #ffffff; color: #111111; box-sizing: border-box;
}

h2.tool-title {
    font-family: 'Montserrat', sans-serif; font-size: 2rem; text-align: center;
    text-transform: uppercase; margin-top: 0; margin-bottom: 30px; font-weight: 900;
}

.main-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }

/* --- CỘT PREVIEW & PHỐI MÀU --- */
.visual-panel { display: flex; flex-direction: column; gap: 20px; }

.color-preview {
    width: 100%; height: 200px; border: 3px solid #111111; border-radius: 12px;
    background-color: #ffb7b2; box-shadow: 4px 4px 0px #111111;
    display: flex; align-items: center; justify-content: center; position: relative;
    transition: background-color 0.2s;
}

/* Ẩn input color thật nhưng làm nó to bằng thẻ cha để click đâu cũng ăn */
#nativeColorPicker {
    opacity: 0; position: absolute; width: 100%; height: 100%; cursor: pointer;
}

.harmony-section {
    border: 3px solid #111111; border-radius: 8px; padding: 20px;
    background-color: #f9f9f9; box-shadow: 4px 4px 0px #111111;
}

.harmony-section h4 { margin: 0 0 20px 0; font-family: 'Montserrat', sans-serif; border-bottom: 2px dashed #ccc; padding-bottom: 10px; }

.harmony-group { margin-bottom: 15px; }
.harmony-group:last-child { margin-bottom: 0; }
.harmony-label { font-size: 0.9rem; font-weight: 700; display: block; margin-bottom: 8px; color: #555; }

.palette { display: flex; height: 40px; border: 2px solid #111111; border-radius: 6px; overflow: hidden; }
.swatch { flex: 1; cursor: pointer; transition: flex 0.2s; position: relative; }
.swatch:hover { flex: 1.5; }
.swatch::after {
    content: "Copy"; position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; background: rgba(0,0,0,0.5); color: #fff;
    font-weight: bold; font-size: 0.8rem; opacity: 0; transition: opacity 0.2s;
}
.swatch:hover::after { opacity: 1; }

/* --- CỘT NHẬP LIỆU --- */
.conversion-panel { display: flex; flex-direction: column; gap: 15px; }

.input-card {
    border: 3px solid #111111; border-radius: 8px; padding: 15px;
    box-shadow: 3px 3px 0px #111111; position: relative;
}

.input-card label { display: block; font-weight: 800; font-size: 0.95rem; margin-bottom: 8px; }

.input-wrapper { display: flex; gap: 10px; }

.input-wrapper input {
    flex: 1; padding: 12px 15px; font-size: 1.1rem; font-weight: 700;
    font-family: 'Inter', monospace; border: 2px solid #111111;
    border-radius: 6px; outline: none; text-transform: lowercase;
}
.input-wrapper input:focus { background-color: #ffffff; }

.btn-copy-color {
    background-color: #ffffff; width: 50px; font-size: 1.2rem;
    padding: 0; border: 2px solid #111111; border-radius: 6px;
    box-shadow: 2px 2px 0px #111111; display: flex; align-items: center; justify-content: center;
}
.btn-copy-color:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #111111; }

/* Custom Backgrounds cho thẻ */
.bg-hex { background-color: #fdfd96; }
.bg-rgb { background-color: #b5ead7; }
.bg-hsl { background-color: #cbaacb; }
.bg-cmyk { background-color: #e6f7ff; }

/* Slider Alpha */
.slider-panel { border: 3px solid #111111; border-radius: 8px; padding: 15px; background-color: #f4f4f4; box-shadow: 3px 3px 0px #111111; }
.slider-group label { display: flex; justify-content: space-between; font-weight: 800; font-size: 0.95rem; margin-bottom: 10px; }
.slider-brutal {
    -webkit-appearance: none; width: 100%; height: 12px; background: #ddd;
    border: 2px solid #111111; border-radius: 6px; outline: none; cursor: pointer;
}
.slider-brutal::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 22px; height: 22px;
    background: #ffb7b2; border: 3px solid #111111; border-radius: 50%; cursor: pointer; box-shadow: 2px 2px 0px #111;
}

/* Toast */
#toastColor {
    visibility: hidden; min-width: 200px; background-color: #111111; color: #ffffff;
    text-align: center; border-radius: 8px; padding: 12px; position: fixed;
    z-index: 9999; bottom: 30px; left: 50%; transform: translateX(-50%);
    font-weight: bold; opacity: 0; transition: opacity 0.3s, bottom 0.3s;
}
#toastColor.show { visibility: visible; opacity: 1; bottom: 50px; }

@media (max-width: 850px) {
    .main-layout { grid-template-columns: 1fr; }
}