@font-face {
    font-family: 'Inconsolata';
    src: url('/font/Inconsolata.ttf') format('truetype');
}

:root {
    --primary-dark: #000000;
    --primary-dark-gray: #404040;
    --primary-gray: #808080;
    --primary-light-gray: #bfbfbf;
    --primary-light: #ffffff;
    --primary-red: #ff5555;
    --primary-orange: #ff8844;
    --primary-yellow: #ffff55;
    --primary-green: #55ff55;
    --primary-blue: #5555ff;
    --primary-magenta: #ff55ff;
    --primary-cyan: #55ffff;

    --black: var(--primary-dark);
    --dark-gray: var(--primary-dark-gray);
    --gray: var(--primary-gray);
    --light-gray: var(--primary-light-gray);
    --white: var(--primary-light);
    --red: var(--primary-red);
    --orange: var(--primary-orange);
    --yellow: var(--primary-yellow);
    --green: var(--primary-green);
    --blue: var(--primary-blue);
    --magenta: var(--primary-magenta);
    --cyan: var(--primary-cyan);

    /* Legacy aliases */
    --warning: var(--yellow);
    --danger: var(--red);
}

body.light-theme {
    --black: var(--primary-light);
    --dark-gray: var(--primary-light-gray);
    --gray: var(--primary-gray);
    --light-gray: var(--primary-dark-gray);
    --white: var(--primary-dark);
    /* Terminal colors stay the same in light theme */
    --red: var(--primary-red);
    --orange: var(--primary-orange);
    --yellow: var(--primary-yellow);
    --green: var(--primary-green);
    --blue: var(--primary-blue);
    --magenta: var(--primary-magenta);
    --cyan: var(--primary-cyan);
    --warning: var(--yellow);
    --danger: var(--red);
}

* {
    background-color: transparent;
    box-sizing: border-box;
    font-family: 'Inconsolata', monospace;
    margin: 0;
    padding: 0;
}

::selection {
    background: var(--dark-gray);
    color: var(--white);
}

html {
    background: var(--black);
    overflow: hidden;
    height: 100%;
}

body {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--black);
}

@supports not (height: 100dvh) {
    body { height: 100vh; }
}

h1 {
    font-size: 64px;
    color: transparent;
    -webkit-text-stroke: 1px var(--white);
    transition: color 0.3s ease, -webkit-text-stroke 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    width: auto;
    text-align: center;
}
h1:hover { color: var(--white); }

p {
    margin-bottom: 1rem;
}

p, .box, .count, .dropdown-item { color: var(--white); }

.terminal-window {
    position: relative;
    height: 95%;
    width: 95dvw;
    border: 2px solid var(--white);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    background: var(--black);
    color: var(--white);
}

@supports not (width: 95dvw) {
    .terminal-window { width: 95vw; }
}

.window-bar {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 10px;
}

.bar-left, .bar-right {
    display: flex;
    gap: 6px;
}
.bar-right { margin-left: auto; }

.bar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.bar-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid var(--white);
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}
.bar-button svg {
    width: 14px;
    height: 14px;
    transition: fill 0.3s ease;
}
.bar-button:hover {
    background: var(--white);
    color: var(--black);
}
.bar-button:active { transform: translateY(3px); }

.window-content {
    padding: 30px;
    flex: 1;
    color: var(--white);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--gray) transparent;
    word-break: break-word;
}

.window-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.window-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
    margin: 5px;
}
.window-content::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 10px;
    transition: background 0.3s ease;
}
.window-content::-webkit-scrollbar-thumb:hover { background: var(--white); }
.window-content::-webkit-scrollbar-corner { background: transparent; }

.window-footer {
    padding: 0 16px 12px 0;
    text-align: right;
    font-size: 12px;
    color: var(--dark-gray);
    user-select: none;
    pointer-events: none;
    flex-shrink: 0;
}

.btn {
    background: transparent;
    border: 1px solid var(--white);
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    width: auto;
    color: var(--white);
}
.btn:hover {
    background: var(--white);
    color: var(--black);
}
.btn:active { transform: translateY(3px); }

.textbox, input[type="text"], input[type="text"].textbox, select.textbox, pre {
    background: transparent;
    border: 1px solid var(--gray);
    border-radius: 4px;
    padding: 12px;
    font-size: 14px;
    color: var(--white);
    transition: border 0.3s ease;
    width: 100%;
}
.textbox {
    resize: vertical;
    min-height: 180px;
    max-height: 40vh;
    word-break: break-word;
    overflow: auto;
    background-image:
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 3px,
            var(--gray) 3px,
            var(--gray) 4px
        );
    background-size: 20px 20px;
    background-position: bottom right;
    background-repeat: no-repeat;
    border-bottom-right-radius: 0;
    padding-bottom: 24px;
}
.textbox::-webkit-resizer { display: none; }
.textbox::-moz-resizer { background: transparent; border: none; }
.textbox[readonly] {
    resize: none;
    background-image: none;
    padding-bottom: 12px;
	border-bottom-right-radius: 4px;
}
input[type="text"], input[type="text"].textbox, select.textbox { padding: 10px; }
.textbox:focus, input[type="text"]:focus, input[type="text"].textbox:focus, select.textbox:focus {
    outline: none;
    border-color: var(--white);
}
select option {
    background: var(--black);
    color: var(--white);
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--white);
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    border-radius: 4px;
    cursor: pointer;
    height: 6px;
    margin: 0;
}

pre {
    margin: 0;
    word-break: break-word;
}

select {
    background: transparent;
    border: 1px solid var(--gray);
    border-radius: 4px;
    padding: 6px 24px 6px 10px;
    font-family: inherit;
    font-size: 13px;
    color: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    transition: border 0.3s ease;
}
body.light-theme select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
}
select:hover, select:focus { border-color: var(--white); outline: none; }

.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--black);
    border: 1px solid var(--white);
    border-radius: 4px;
    padding: 0.5rem;
    min-width: 320px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    margin-top: 5px;
}
.dropdown-content.show {
    opacity: 1;
    visibility: visible;
}
.dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid var(--gray);
    font-size: 13px;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item select { min-width: 110px; background-color: transparent; }

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--white);
    transition: 0.3s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--black);
    transition: 0.3s;
    border-radius: 50%;
}
input:checked + .slider:before { transform: translateX(26px); }

.box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.count {
    font-size: 13px;
    opacity: 1;
    transition: color 0.3s ease;
}
.count-normal { color: var(--white); }
.count-warning { color: var(--yellow); }
.count-danger { color: var(--red); }

.icon {
    width: 48px;
    height: 48px;
    fill: var(--gray);
    flex-shrink: 0;
    transition: fill 0.3s ease;
}
.icon:hover { fill: var(--white); }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

.category-section {
    margin-bottom: 2.5rem;
}
.category-section:last-child { margin-bottom: 0; }

.category-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--dark-gray);
}

/* Tool Cards — Icon-first design */
.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--black);
    border: 1px solid var(--gray);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.tool-card:hover {
    border-color: var(--white);
    background: color-mix(in srgb, var(--black) 70%, var(--dark-gray) 30%);
    transform: translateY(-2px);
}
.tool-card:active { transform: scale(0.97); }

.tool-card-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Icon — the hero element */
.tool-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    color: var(--white);
    transition: color 0.2s ease;
}
.tool-card-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.tool-card:hover .tool-card-icon {
    color: var(--light-gray);
}

/* Card body */
.tool-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.tool-card-name {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    word-break: break-word;
}

.tool-card-desc {
    color: var(--light-gray);
    font-size: 0.7rem;
    line-height: 1.4;
    word-break: break-word;
}
.tool-card:hover .tool-card-desc {
    color: var(--white);
}

/* Badge for disabled/SOON tools */
.tool-card-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.6rem;
    color: var(--yellow);
    border: 1px solid var(--yellow);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    background: var(--black);
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.25rem;
    width: 100%;
    padding-bottom: 2rem;
}

.http-code {
    border: 1px solid var(--gray);
    border-radius: 4px;
    padding: 1.25rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--black);
}
.http-code:hover {
    border-color: var(--white);
    background: var(--dark-gray);
    transform: translateY(-2px);
}

.http-badge {
    font-size: 1.6rem;
    font-weight: bold;
    min-width: 68px;
    height: fit-content;
    text-align: center;
    padding: 0.65rem 0.75rem;
    border-radius: 4px;
    color: var(--white);
    background: var(--gray);
    font-family: monospace;
    flex-shrink: 0;
}

.http-info {
    flex: 1;
    min-width: 0;
}

.http-name {
    font-weight: bold;
    color: var(--white);
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
}

.http-desc {
    font-size: 0.9rem;
    color: var(--light-gray);
    line-height: 1.45;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: var(--dark-gray);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--gray);
}
.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
    background-color: var(--gray);
}

/* Strength levels - applied to .strength-bar container */
.strength-bar.strength-empty .strength-fill       { width: 0%;   background-color: var(--gray); }
.strength-bar.strength-very-weak .strength-fill    { width: 14%;  background-color: var(--red); }
.strength-bar.strength-weak .strength-fill         { width: 28%;  background-color: var(--orange); }
.strength-bar.strength-fair .strength-fill         { width: 42%;  background-color: var(--yellow); }
.strength-bar.strength-good .strength-fill         { width: 70%;  background-color: var(--green); }
.strength-bar.strength-very-good .strength-fill    { width: 85%;  background-color: var(--cyan); }
.strength-bar.strength-excellent .strength-fill    { width: 100%; background-color: var(--green); }

/* Strength label colors */
.strength-label.strength-empty      { color: var(--gray); }
.strength-label.strength-very-weak  { color: var(--red); }
.strength-label.strength-weak       { color: var(--orange); }
.strength-label.strength-fair       { color: var(--yellow); }
.strength-label.strength-good       { color: var(--green); }
.strength-label.strength-very-good  { color: var(--cyan); }
.strength-label.strength-excellent  { color: var(--green); }

/* Password check items */
.check-passed { color: var(--white); }
.check-failed { color: var(--light-gray); }

/* ========== TOOL RESULTS (Structured Output) ========== */
.tool-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}
.tool-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-table {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--dark-gray);
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.95rem;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray) transparent;
}
.result-row {
    display: flex;
    gap: 1rem;
    padding: 0.6rem 0.85rem;
    background: var(--black);
    transition: background 0.2s ease;
}
.result-row:hover { background: color-mix(in srgb, var(--black) 80%, var(--dark-gray) 20%); }
.result-label {
    min-width: 140px;
    color: var(--light-gray);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.result-value {
    color: var(--white);
    font-family: monospace;
    font-size: 0.95rem;
    word-break: break-all;
    flex: 1;
}
.result-value-success { color: var(--green); }
.result-value-warning { color: var(--yellow); }
.result-value-error { color: var(--red); }
.result-value-info { color: var(--cyan); }

/* Status indicators for results */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot-ok { background: var(--green); }
.status-dot-error { background: var(--red); }
.status-dot-warning { background: var(--yellow); }
.status-dot-info { background: var(--cyan); }
.status-dot-unknown { background: var(--gray); }

/* Tool loading state */
.tool-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--light-gray);
    font-size: 0.9rem;
}
.tool-loading::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid var(--dark-gray);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tool copy feedback */
.copy-feedback {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--green);
    color: var(--black);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}
.copy-feedback.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Result items for list-style output (DNS records, subdomains) */
.result-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--gray) transparent;
}

/* Scrollbar for result containers */
.result-table::-webkit-scrollbar,
.result-list::-webkit-scrollbar {
    width: 8px;
}
.result-table::-webkit-scrollbar-track,
.result-list::-webkit-scrollbar-track {
    background: transparent;
}
.result-table::-webkit-scrollbar-thumb,
.result-list::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 4px;
}
.result-table::-webkit-scrollbar-thumb:hover,
.result-list::-webkit-scrollbar-thumb:hover {
    background: var(--light-gray);
}
.result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    background: var(--black);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: monospace;
    transition: background 0.2s ease;
}
.result-item:hover { background: var(--dark-gray); }
.result-item-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--dark-gray);
    color: var(--light-gray);
    white-space: nowrap;
    flex-shrink: 0;
}
.result-item-value {
    color: var(--white);
    word-break: break-all;
    flex: 1;
}
.result-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.65rem;
    background: var(--black);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: monospace;
}
.result-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.result-group-values {
    display: flex;
    flex-direction: column;
    padding-left: 0.5rem;
}
.result-group-value {
    color: var(--white);
    padding: 0.15rem 0;
    word-break: break-all;
}
.result-empty-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    background: var(--black);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--gray);
}
.result-empty-line .result-item-badge {
    background: transparent;
    padding: 0;
}

/* ========== TOOL-SPECIFIC COMPONENTS ========== */
.stat-box {
    border: 1px solid var(--gray);
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
    background: color-mix(in srgb, var(--black) 50%, var(--dark-gray) 50%);
    flex: 1;
    min-width: 120px;
    transition: all 0.3s ease;
}
.stat-box:hover {
    border-color: var(--white);
    background: var(--dark-gray);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--light-gray);
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    font-family: monospace;
}

.uuid-output {
    background: var(--black);
    border: 1px solid var(--dark-gray);
    border-radius: 4px;
    padding: 1.5rem;
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
    font-family: monospace;
    font-size: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--gray) transparent;
}
.uuid-output::-webkit-scrollbar { width: 6px; }
.uuid-output::-webkit-scrollbar-track { background: transparent; }
.uuid-output::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 4px; }
.uuid-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--dark-gray);
    gap: 1rem;
}
.uuid-item:last-child { border-bottom: none; }
.uuid-value {
    color: var(--white);
    word-break: break-all;
    flex: 1;
    font-size: 0.95rem;
}
.uuid-copy {
    background: none;
    border: 1px solid var(--gray);
    border-radius: 4px;
    color: var(--light-gray);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.uuid-copy:hover {
    border-color: var(--white);
    color: var(--white);
}
.uuid-placeholder {
    color: var(--gray);
    font-style: italic;
}

.timestamp-now {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--cyan);
}
.timestamp-result {
    background: var(--black);
    border: 1px solid var(--dark-gray);
    border-radius: 4px;
    padding: 1rem;
}
.timestamp-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--dark-gray);
}
.timestamp-row:last-child { border-bottom: none; }
.timestamp-section-title {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 0 0.2rem;
}
.timestamp-divider {
    border-top: 1px solid var(--dark-gray);
    margin: 0.5rem 0;
}

.btn-small {
    background: none;
    border: 1px solid var(--gray);
    border-radius: 4px;
    color: var(--light-gray);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}
.btn-small:hover {
    border-color: var(--white);
    color: var(--white);
}

.color-layout {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}
.color-preview-area {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}
.color-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
}
.color-swatch {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    border: 2px solid var(--dark-gray);
    background: #00ff88;
    transition: background 0.2s ease;
}
.color-native-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.color-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.color-row label {
    color: var(--gray);
    font-size: 0.85rem;
    min-width: 32px;
    font-family: monospace;
}

.box-label {
    font-size: 0.8rem;
    color: var(--light-gray);
}
.select-box, .input-box {
    background: var(--black);
    border: 1px solid var(--dark-gray);
    border-radius: 4px;
    color: var(--white);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}
.select-box:focus, .input-box:focus {
    outline: none;
    border-color: var(--white);
}
.input-box { width: 80px; }
.align-end { align-self: flex-end; }
.align-self-center { align-self: center; }

#dropZone {
    transition: border-color 0.3s ease, background 0.3s ease;
    cursor: pointer;
}
#dropZone:hover {
    border-color: var(--white);
    background: var(--dark-gray);
}
#dropZone.dragover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

.dropzone-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
}

.img-badge { height: 50px; width: auto; }
.img-badge-abuseipdb {
    height: 50px;
    width: auto;
    background: #808080 linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.3) 50%, rgba(0,0,0,.2) 51%, rgba(0,0,0,0));
    padding: 5px;
}

a.link-white {
    color: var(--white);
    text-decoration: underline;
}

.flex-row, .flex-col {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}
.flex-col { flex-direction: column; }

.flex-full { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }
.flex-gap-05 { gap: 0.5rem; }
.flex-gap-1 { gap: 1rem; }
.flex-gap-1-5 { gap: 1.5rem; }
.flex-gap-2 { gap: 2rem; }
.flex-gap-3 { gap: 3rem; }
.flex-center { justify-content: center; }
.flex-between { justify-content: space-between; }
.flex-stretch { align-items: stretch; }
.flex-wrap { flex-wrap: wrap; }

.mb-05 { margin-bottom: 0.5rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-05 { margin-top: 0.5rem; }
.mt-1 { margin-top: 1rem; }

.text-center { text-align: center; }
.text-gray-sm { font-size: 0.9rem; color: var(--gray); }
.text-gray-xs { font-size: 0.8rem; color: var(--gray); }
.text-light-gray { color: var(--light-gray); }
.text-white { color: var(--white); }
.fs-13 { font-size: 13px; }
.fs-80 { font-size: 0.8rem; }
.fs-60 { font-size: 0.6rem; }
.fs-90 { font-size: 0.9rem; }
.lh-1-6 { line-height: 1.6; }
.ws-prewrap { white-space: pre-wrap; }
.h2-style {
    font-size: 1.5rem;
    color: var(--white);
    -webkit-text-stroke: 0;
}

.display-none { display: none; }
.display-flex { display: flex; }
.full-height { height: 100%; }
.full-width { width: 100%; }
.full-height-width { height: 100%; width: 100%; }

.font-mono { font-family: monospace; }
.textarea-mono { font-family: monospace; }

.input-min-auto { min-height: auto; padding: 10px; }
.input-min-150 { min-height: 150px; }
.input-min-200 { min-height: 200px; }
.input-min-250 { min-height: 250px; }
.input-max-45vh { max-height: 45vh; }
.input-60px { min-height: 60px; }
.input-pre { white-space: pre-wrap; font-size: 13px; overflow: auto; resize: none; }

.box-cursor { cursor: pointer; }
.box-gap-05 { gap: 0.5rem; }

.btn-sm { padding: 2px 8px; }

/* Tool content width constraint — desktop only */
.tool-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
.tool-content-wide {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.btn-copy {
    background: none;
    border: 1px solid var(--dark-gray);
    border-radius: 4px;
    color: var(--gray);
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.btn-copy:hover {
    border-color: var(--white);
    color: var(--white);
}
.btn-text {
    transition: opacity 0.15s ease;
}
.color-row .btn-copy {
    align-self: stretch;
    min-width: 2.5rem;
}

.svg-16, .svg-24, .svg-48, .svg-64, .svg-128 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.svg-16 { width: 16px !important; height: 16px !important; }
.svg-24 { width: 24px !important; height: 24px !important; }
.svg-48 { width: 48px !important; height: 48px !important; }
.svg-64 { width: 64px !important; height: 64px !important; }
.svg-128 { width: 128px !important; height: 128px !important; }
.svg-16 svg, .svg-24 svg, .svg-48 svg, .svg-64 svg, .svg-128 svg {
    width: 100%;
    height: 100%;
}

.delay-0 { animation-delay: 0s; }
.delay-05 { animation-delay: 0.5s; }
.delay-08 { animation-delay: 0.8s; }
.delay-1 { animation-delay: 1s; }

.fade, .fade-in {
    opacity: 0;
    animation: fade 1s ease forwards;
}
.fade-in { animation: fadeIn 1s ease forwards; }

@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html, body { transition: background-color 0.3s ease; }
.terminal-window,
.terminal-window *,
.bar-button svg,
.icon,
.tool-card,
.dropdown-content,
select,
.slider,
.slider:before,
.window-footer,
h1,
pre,
.textbox,
.btn,
.window-content {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, fill 0.3s ease, filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, -webkit-text-stroke 0.3s ease;
}

body.no-animations, body.no-animations * {
    transition: none !important;
}
body.no-animations .fade,
body.no-animations .fade-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

@media (max-width: 1000px) {
    h1 {
        font-size: 40px;
        white-space: normal;
        word-wrap: break-word;
        overflow: visible;
        -webkit-text-stroke: 0.5px var(--white);
    }
    .textbox { resize: none; }
    .mobile { flex-direction: column; }
}

@media (max-width: 1000px) and (max-height: 852px) {
    .window-footer { display: none; }
}

@media (max-width: 600px) {
    .codes-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .tool-card { padding: 1.25rem 0.75rem; }
    .tool-card-icon { width: 2.75rem; height: 2.75rem; }
    .color-layout { flex-direction: column; align-items: center; }
    .color-preview-area { width: 140px; height: 140px; }
    .tool-content, .tool-content-wide { max-width: none; margin-left: 0; margin-right: 0; }
}