/* ==== QR and basic necessities ==== */

/* Base */
*, *::before, *::after { box-sizing: border-box; }

/* Body adaptations from index.css */

body {
    width: 100vw;
    height: 100vh;

    overflow-x: hidden;
    overflow-y: auto;

    background-color: var(--background-colour);

    margin: 0; padding: 0;
}

.container {
    width: 100vw;
    height: auto;
    min-height: 100vh;
    overflow: visible;

    padding: 0; margin: 0;

    display: flex; flex-direction: column; justify-content: center; overflow-y: scroll;

    background-color: rgba(0, 0, 0, 0.4);
}

/* Page */
.page {
    position: relative; z-index: 1;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    padding: 6rem 1.5rem 4rem;
}

/* Page header */
.page-header {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
h1.page-title {
    font-family: jgamestaken-blocky;
    font-size: clamp(1.4rem, 5vw, 2rem);
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(200,170,255,0.85) 50%, rgba(255,170,255,0.9) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 6px;
    border: none;
}
.page-sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

/* Section label */
.section-label {
    font-size: 0.68rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3);
    margin-bottom: 0.75rem;
}

/* Card */
.card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.card-body { padding: 20px; }

/* ── Inputs ── */
.input-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 1rem; }
label {
    font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: rgba(255,255,255,0.35);
}
input[type=text], input[type=url], select, textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px; padding: 0.65rem 0.9rem;
    color: rgba(255,255,255,0.9);
    font-family: inherit; font-size: 0.875rem;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus {
    border-color: rgba(170,85,255,0.5);
    box-shadow: 0 0 0 3px rgba(170,85,255,0.1);
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.2); }

select option { background: #1a1a2e; color: rgba(255,255,255,0.9); }

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Color pair */
.color-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1rem;
}
.color-field {
    display: flex; flex-direction: column; gap: 5px;
}
.color-input-wrap {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 9px;
    padding: 8px 12px;
    transition: border-color 0.2s;
}
.color-input-wrap:focus-within {
    border-color: rgba(170,85,255,0.5);
    box-shadow: 0 0 0 3px rgba(170,85,255,0.1);
}
input[type=color] {
    width: 28px; height: 28px;
    border: none; border-radius: 6px;
    padding: 0; cursor: pointer;
    background: none;
}
.color-hex {
    flex: 1;
    background: none; border: none; padding: 0;
    color: rgba(255,255,255,0.7);
    font-family: monospace; font-size: 0.82rem;
    outline: none;
    border-radius: 0;
    box-shadow: none;
}
.color-hex:focus { border: none; box-shadow: none; }

/* Buttons */
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 18px;
    font-family: inherit; font-size: 0.82rem; font-weight: 500;
    border-radius: 9px; cursor: pointer;
    transition: all 0.2s; text-decoration: none; border: none;
}
.btn-primary {
    background: rgba(170,85,255,0.2);
    border: 1px solid rgba(170,85,255,0.4);
    color: rgba(220,180,255,0.95);
}
.btn-primary:hover {
    background: rgba(170,85,255,0.3);
    border-color: rgba(170,85,255,0.6);
}
.btn-ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(170,85,255,0.5);
    color: rgba(255,255,255,1);
}
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* QR output */
.qr-output {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 28px;
}
#qr-canvas-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}
#qr-canvas-wrap canvas,
#qr-canvas-wrap img {
    border-radius: 10px;
    max-height: 250px;
}
.qr-empty {
    text-align: center;
    color: rgba(255,255,255,0.18);
    font-size: 0.82rem;
    padding: 20px 0;
}

/* Hint */
.hint { font-size: 0.68rem; color: rgba(255,255,255,0.2); margin-top: 4px; }

/* Tabs */
.tab-row {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
}
.tab-btn {
    padding: 5px 14px;
    font-size: 0.75rem; font-family: inherit;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn.active {
    background: rgba(170,85,255,0.15);
    border-color: rgba(170,85,255,0.4);
    color: rgba(220,180,255,0.9);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

@media (max-width: 600px) {
    .input-row, .color-pair { grid-template-columns: 1fr; }
    .page { padding: 5rem 1rem 3rem; }
}

/* ==== Image converter necessities ==== */

/* Drop zone */
.drop-zone {
    border: 1.5px dashed rgba(170,85,255,0.35);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: rgba(170,85,255,0.7);
    background: rgba(170,85,255,0.06);
}
.drop-zone input[type=file] {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.drop-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.5rem;
}
.drop-title {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 4px;
}
.drop-sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.25);
    margin: 0;
}

/* File list */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 1rem;
}
.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.8rem;
}
.file-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
}
.file-info { flex: 1; min-width: 0; }
.file-name {
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}
.file-meta {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.3);
    margin-top: 2px;
}
.file-status {
    font-size: 0.72rem;
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 6px;
}
.file-status.ready   { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.35); }
.file-status.done    { background: rgba(100,220,140,0.12); color: rgba(130,240,160,0.85); }
.file-status.error   { background: rgba(255,80,80,0.12);   color: rgba(255,130,130,0.85); }
.file-status.working { background: rgba(170,85,255,0.12);  color: rgba(200,150,255,0.85); }
.file-remove {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.2); font-size: 1rem;
    padding: 0 0 0 4px; line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.file-remove:hover { color: rgba(255,100,100,0.7); }

/* Format grid */
.format-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}
.fmt-btn {
    padding: 6px 16px;
    font-size: 0.78rem; font-family: inherit; font-weight: 500;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fmt-btn.active {
    background: rgba(170,85,255,0.18);
    border-color: rgba(170,85,255,0.5);
    color: rgba(220,180,255,0.95);
}
.fmt-btn:hover:not(.active) {
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}

/* Quality slider row */
.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}
.slider-row label {
    flex-shrink: 0;
    min-width: 56px;
}
input[type=range] {
    flex: 1;
    accent-color: rgba(170,85,255,0.8);
}
.slider-val {
    font-size: 0.8rem;
    font-family: monospace;
    color: rgba(255,255,255,0.55);
    min-width: 32px;
    text-align: right;
}

/* Output area */
.output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 0.5rem;
}
.out-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.out-preview {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
}
.out-footer {
    padding: 8px 10px;
    display: flex; flex-direction: column; gap: 2px;
}
.out-name {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.out-size {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.25);
}
.out-dl {
    display: block;
    margin: 0 10px 10px;
    padding: 5px 0;
    text-align: center;
    font-size: 0.72rem; font-family: inherit; font-weight: 500;
    background: rgba(170,85,255,0.12);
    border: 1px solid rgba(170,85,255,0.3);
    color: rgba(220,180,255,0.85);
    border-radius: 7px;
    cursor: pointer; text-decoration: none;
    transition: all 0.2s;
}
.out-dl:hover {
    background: rgba(170,85,255,0.22);
    border-color: rgba(170,85,255,0.5);
}

.empty-out {
    color: rgba(255,255,255,0.18);
    font-size: 0.82rem;
    padding: 20px 0;
    text-align: center;
}

@media (max-width: 600px) {
    .output-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

/* ==== Homepage necessities ==== */

/* Tool grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 20px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    cursor: pointer;
}
.tool-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(170,85,255,0.45);
    transform: translateY(-2px);
}
.tool-card:active { transform: translateY(0); }

.tool-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.tool-text { display: contents; }

.tool-name {
    font-family: jgamestaken-blocky;
    font-size: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(200,170,255,0.85) 50%, rgba(255,170,255,0.9) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.tool-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin: 0;
    line-height: 1.5;
}

.tool-tag {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    padding: 3px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-radius: 6px;
    background: rgba(170,85,255,0.12);
    border: 1px solid rgba(170,85,255,0.25);
    color: rgba(200,160,255,0.7);
}

/* Coming soon state */
.tool-card.soon {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}
.tool-card.soon .tool-tag {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.3);
}

/* Mobile */
@media (max-width: 600px) {
    .page { padding: 3.5rem 1rem 3rem; }

    .tool-grid { grid-template-columns: 1fr; gap: 10px; }

    .tool-card {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
    }

    .tool-text {
        display: flex;
        flex-direction: column;
        gap: 3px;
        flex: 1;
        min-width: 0;
    }

    .tool-desc { display: none; }

    .tool-tag { margin-top: 0; align-self: center; flex-shrink: 0; }
}


/* ==== Timestamp generator ==== /*

/* Mono value display */

.ts-display {
    font-family: monospace;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    word-break: break-all;
}
.ts-display span { flex: 1; }
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.25);
    font-size: 0.85rem;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s;
    font-family: inherit;
}
.copy-btn:hover { color: rgba(200,160,255,0.8); }

/* Output rows */
.output-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 1rem;
}
.output-row:last-child { margin-bottom: 0; }

/* Live clock */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(130,240,160,0.7);
}
.live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(130,240,160,0.7);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin: 1.25rem 0;
}

/* ==== SVG converter ==== */

/* Mode selector */
.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1rem;
}
.mode-card {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: rgba(255,255,255,0.03);
    user-select: none;
}
.mode-card:hover { background: rgba(255,255,255,0.06); }
.mode-card.active {
    background: rgba(170,85,255,0.1);
    border-color: rgba(170,85,255,0.5);
}
.mode-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin: 0 0 4px;
}
.mode-card.active .mode-card-title { color: rgba(220,180,255,0.95); }
.mode-card-desc {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    margin: 0;
    line-height: 1.5;
}
.mode-card-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 5px;
    margin-bottom: 8px;
}
.badge-quality {
    background: rgba(100,200,255,0.12);
    color: rgba(130,210,255,0.8);
    border: 1px solid rgba(100,200,255,0.2);
}
.badge-pixel {
    background: rgba(255,170,85,0.12);
    color: rgba(255,200,120,0.8);
    border: 1px solid rgba(255,170,85,0.2);
}

/* Image preview */
.img-preview-wrap {
    margin-top: 1rem;
    display: none;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
}
.img-preview-wrap.visible { display: flex; }
.img-preview {
    width: 56px; height: 56px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
}
.img-preview-info { flex: 1; min-width: 0; }
.img-preview-name {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.img-preview-meta { font-size: 0.68rem; color: rgba(255,255,255,0.3); margin-top: 2px; }
.img-clear-btn {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.2); font-size: 1rem;
    padding: 0; transition: color 0.15s;
}
.img-clear-btn:hover { color: rgba(255,100,100,0.7); }

/* Slider rows */
.slider-row {
    display: flex; align-items: center; gap: 12px; margin-bottom: 1rem;
}
.slider-row label { flex-shrink: 0; min-width: 120px; }
input[type=range] { flex: 1; accent-color: rgba(170,85,255,0.8); }
.slider-val {
    font-size: 0.8rem; font-family: monospace;
    color: rgba(255,255,255,0.55); min-width: 40px; text-align: right;
}

/* Progress */
.progress-wrap {
    display: none;
    margin: 1rem 0 0;
}
.progress-wrap.visible { display: block; }
.progress-bar-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(170,85,255,0.7), rgba(255,170,255,0.7));
    border-radius: 2px;
    width: 0%;
    transition: width 0.15s;
}
.progress-label { font-size: 0.7rem; color: rgba(255,255,255,0.3); }

/* Output preview */
.output-preview {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
    display: flex; align-items: center; justify-content: center;
    min-height: 200px;
}
.output-preview svg, .output-preview img {
    max-width: 100%; max-height: 400px;
    border-radius: 8px;
}
.output-empty {
    color: rgba(255,255,255,0.18);
    font-size: 0.82rem;
    text-align: center;
    padding: 2rem;
}
.output-stats {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-top: 0.75rem; margin-bottom: 1rem;
}
.output-stat { font-size: 0.72rem; color: rgba(255,255,255,0.3); }
.output-stat strong { color: rgba(255,255,255,0.6); font-weight: 500; }

@media (max-width: 600px) {
    .mode-grid { grid-template-columns: 1fr; }
}

/* ==== Warning field ==== */

.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 14px 16px;
    margin-bottom: 1rem;

    background: rgba(255, 180, 60, 0.08);
    border: 1px solid rgba(255, 180, 60, 0.22);
    border-radius: 12px;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.warning-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;

    opacity: 0.9;
    margin-top: 1px;
}

.warning-content {
    flex: 1;
    min-width: 0;
}

.warning-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;

    color: rgba(255, 210, 120, 0.95);
    margin-bottom: 4px;
}

.warning-text {
    font-size: 0.82rem;
    line-height: 1.55;

    color: rgba(255,255,255,0.72);
}

.warning-text strong {
    color: rgba(255,230,170,0.95);
    font-weight: 600;
}

/* ==== Embed Sender ==== */

/* Live embed preview */
.embed-preview-wrap {
    background: #313338;
    border-radius: 10px;
    padding: 16px;
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.embed-preview-message {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 4px;
}

.embed-preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(170,85,255,0.4);
    flex-shrink: 0;
    object-fit: cover;
}

.embed-preview-meta {
    flex: 1;
    min-width: 0;
}

.embed-preview-username {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.embed-preview-content {
    font-size: 0.85rem;
    color: #dbdee1;
    margin-bottom: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

.embed-card {
    background: #2b2d31;
    border-radius: 4px;
    border-left: 4px solid #5865f2;
    padding: 12px 16px 16px;
    max-width: 520px;
    position: relative;
}

.embed-card-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 16px;
}

.embed-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    grid-column: 1;
}
.embed-author-icon {
    width: 24px; height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.embed-author-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #dbdee1;
}
.embed-author-name a { color: inherit; text-decoration: none; }
.embed-author-name a:hover { text-decoration: underline; }

.embed-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    grid-column: 1;
}
.embed-title a { color: #00aff4; text-decoration: none; }
.embed-title a:hover { text-decoration: underline; }

.embed-description {
    font-size: 0.85rem;
    color: #dbdee1;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
    grid-column: 1;
}

.embed-thumbnail {
    grid-column: 2;
    grid-row: 1 / 4;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    align-self: start;
}

.embed-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    grid-column: 1 / -1;
}
.embed-field {
    min-width: 0;
}
.embed-field.inline { flex: 1; min-width: 120px; }
.embed-field-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #dbdee1;
    margin-bottom: 2px;
}
.embed-field-value {
    font-size: 0.82rem;
    color: #dbdee1;
    white-space: pre-wrap;
}

.embed-image {
    grid-column: 1 / -1;
    width: 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    object-fit: cover;
    max-height: 300px;
}

.embed-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
}
.embed-footer-icon {
    width: 20px; height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.embed-footer-text {
    font-size: 0.75rem;
    color: #b5bac1;
}

.preview-empty {
    text-align: center;
    color: rgba(255,255,255,0.18);
    font-size: 0.82rem;
    padding: 20px 0;
}

/* Fields builder */
.field-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    position: relative;
}
.field-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.field-item-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.25);
}
.field-remove {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.2); font-size: 0.85rem;
    padding: 0; transition: color 0.15s; font-family: inherit;
}
.field-remove:hover { color: rgba(255,100,100,0.7); }

.inline-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    cursor: pointer;
    user-select: none;
}
.inline-toggle input[type=checkbox] {
    width: auto;
    accent-color: rgba(170,85,255,0.8);
    cursor: pointer;
}
.inline-toggle span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* Status toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
    white-space: nowrap;
}
.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success {
    background: rgba(100,220,140,0.15);
    border: 1px solid rgba(100,220,140,0.35);
    color: rgba(130,240,160,0.95);
}
.toast.error {
    background: rgba(255,80,80,0.12);
    border: 1px solid rgba(255,80,80,0.3);
    color: rgba(255,130,130,0.95);
}

/* Char counter */
.char-counter {
    font-size: 0.65rem;
    font-family: monospace;
    color: rgba(255,255,255,0.2);
    text-align: right;
    margin-top: 3px;
}
.char-counter.warn { color: rgba(255,180,60,0.7); }
.char-counter.over { color: rgba(255,80,80,0.8); }

/* Webhook row */
.webhook-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.webhook-row .input-group { flex: 1; margin-bottom: 0; }
.webhook-test-btn {
    flex-shrink: 0;
    height: 38px;
}

/* Section collapse */
.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}
.collapsible-header .section-label { margin-bottom: 0; }
.collapse-arrow {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.2);
    transition: transform 0.2s;
    margin-bottom: 0.75rem;
}
.collapse-arrow.open { transform: rotate(180deg); }
.collapsible-body { display: none; margin-top: 0.75rem; }
.collapsible-body.open { display: block; }



/* ==== Colour picker ==== */

/* Picker canvas */
.picker-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.picker-gradient-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: crosshair;
    touch-action: none;
}
#picker-canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.picker-cursor {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
    pointer-events: none;
    transform: translate(-50%, -50%);
    top: 0; left: 0;
}

.picker-hue-wrap {
    position: relative;
    width: 100%;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    touch-action: none;
    background: linear-gradient(to right,
        hsl(0,100%,50%), hsl(30,100%,50%), hsl(60,100%,50%), hsl(90,100%,50%),
        hsl(120,100%,50%), hsl(150,100%,50%), hsl(180,100%,50%), hsl(210,100%,50%),
        hsl(240,100%,50%), hsl(270,100%,50%), hsl(300,100%,50%), hsl(330,100%,50%),
        hsl(360,100%,50%));
}
.hue-thumb {
    position: absolute;
    top: 50%;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Colour output */
.color-swatch-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.color-swatch {
    width: 56px;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.08);
}
.color-values {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.color-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    padding: 8px 12px;
}
.color-value-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.3);
    min-width: 36px;
    flex-shrink: 0;
}
.color-value-text {
    flex: 1;
    font-family: monospace;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
}

/* Palette grid */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}
.palette-swatch {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.palette-swatch:hover {
    transform: translateY(-2px);
    border-color: rgba(170,85,255,0.4);
}
.palette-swatch-color {
    height: 64px;
}
.palette-swatch-info {
    padding: 7px 9px;
    background: rgba(255,255,255,0.04);
}
.palette-swatch-hex {
    font-family: monospace;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.7);
    display: block;
}
.palette-swatch-pct {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.3);
    margin-top: 1px;
    display: block;
}

.palette-empty {
    text-align: center;
    color: rgba(255,255,255,0.18);
    font-size: 0.82rem;
    padding: 20px 0;
}

/* Extracted palette copy row */
.palette-copy-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

@media (max-width: 600px) {
    .color-swatch-row { flex-direction: column; }
    .color-swatch { width: 100%; height: 48px; }
    .palette-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}