/* -------------------------- Base Layout -------------------------- */
body {
    font-family: monospace;
    background-color: #111;
    color: #eee;
    margin: 0;
    padding: 0;
}
h1 {
    color: #fff;
    margin: 0;
    padding: 20px;
    background-color: #000;
}

hr.solid {
  border-top: 1px solid #bbb;
  margin: 16px 0;
}
/* -------------------------- Container Layout -------------------------- */
.container {
    display: flex;
    height: calc(100vh - 60px); /* full viewport minus header */
}
.sidebar {
    width: 260px;
    padding: 20px;
    background-color: #1a1a1a;
    overflow-y: auto;
    box-sizing: border-box;
}
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* -------------------------- Form Elements -------------------------- */
.controls-form button,
.controls-form select,
.controls-form input[type="file"],
.controls-form input[type="checkbox"],
.controls-form input[type="number"] {
    margin-top: 8px;
    padding: 4px 12px;
    font-size: 14px;
    border: none;
    background-color: #444;
    color: white;
    border-radius: 4px;
}

.controls-form button:hover,
.controls-form select:hover,
.controls-form input[type="file"]:hover {
    background-color: #666;
}

/* -------------------------- File Drop Zone -------------------------- */
.file-drop-zone {
    border: 2px dashed #555;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    transition: background 0.2s ease;
    margin-bottom: 12px;
}
.file-drop-zone.dragover {
    background-color: #222;
    border-color: #888;
}
.custom-file {
    position: relative;
    display: inline-block;
    background-color: #444;
    color: #eee;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.custom-file:hover {
    background-color: #666;
}
.custom-file input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* -------------------------- Radio & Custom Input -------------------------- */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    font-size: 14px;
    color: #ddd;
}
.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    line-height: 1.2;
}
.radio-group input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #aaa;
    border-radius: 50%;
    background-color: #111;
    position: relative;
}
.radio-group input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background-color: #eee;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.custom-radio-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.custom-size-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.size-separator {
    color: #bbb;
    font-size: 12px;
}
.custom-input {
    width: 60px;
    padding: 4px 6px;
    background-color: #222;
    color: white;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 12px;
}
.custom-input::-webkit-outer-spin-button,
.custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.input-hint {
    font-size: 11px;
    color: #888;
    margin-left: 44px;
}

/* -------------------------- Dropdown -------------------------- */
.charset-group {
    margin: 12px 0;
    font-size: 14px;
    color: #ddd;
}
.charset-group select {
    margin-left: 8px;
    padding: 4px;
    background: #222;
    border: 1px solid #555;
    border-radius: 4px;
    color: #eee;
}

/* -------------------------- Preview Section -------------------------- */
.preview-section {
    margin-bottom: 20px;
}
.preview-image {
    max-width: 100%;
    max-height: 300px;
    border: 1px solid #555;
    display: none;
    margin-bottom: 10px;
}

/* -------------------------- Output Section -------------------------- */
.output-section {
    margin-top: 20px;
}
.output-section textarea {
    width: 100%;
    height: calc(100vh - 420px);
    font-family: "Fira Mono", "Courier New", monospace;
    font-size: 12px;
    background-color: #222;
    color: #eee;
    border: 1px solid #555;
    padding: 10px;
    resize: vertical;
    white-space: pre;
}

/* -------------------------- Toast Notification -------------------------- */
.toast {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 4px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 9999;
    font-size: 12px;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* -------------------------- Invert Checkbox -------------------------- */
.invert-group {
    margin: 12px 0;
    font-size: 14px;
    color: #ddd;
}
.invert-group input[type="checkbox"] {
    margin-right: 8px;
}

/* -------------------------- Brightness Slider -------------------------- */
.brightness-group {
    margin: 12px 0;
    font-size: 14px;
    color: #ddd;
}
.brightness-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.brightness-group input[type="range"] {
    width: 140px;
    accent-color: #bbb;
}
.brightness-value {
    min-width: 32px;
    text-align: right;
    color: #bbb;
    font-size: 12px;
}

/* -------------------------- Result -------------------------- */
.ascii-output {
  width: 80%;
  max-height: 60vh;      
  overflow: auto;
  white-space: pre;
  word-wrap: normal;
  box-sizing: border-box;
  background-color: #222;
  color: #eee;
  border: 1px solid #555;
  padding: 10px;
  resize: vertical;
}
