/* -----------------------------------------------------------------------
   Nexus tool frame
   The shared look for the single-purpose tool pages: hero, frosted panel,
   drop zone, buttons and footer. Individual pages add their own bits on top.
   ----------------------------------------------------------------------- */
:root {
    --nx-accent: #60a5fa;
    --nx-grad: linear-gradient(145deg, #a855f7, #6366f1 55%, #3b82f6);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #030304;
    color: #e4e4e7;
    font-family: 'Inter', sans-serif;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 0%, rgba(3,3,4,0.55) 100%);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.hidden { display: none !important; }

/* ---------- page frame (matches the background remover) ---------- */
.page-shell {
    width: min(1120px, calc(100% - 40px));
    flex: 1 0 auto;
    margin: 0 auto;
    padding: 22px 0 0;
}

.tool-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    padding: 0 6px 18px;
}
.tool-kicker {
    margin: 0 0 7px;
    color: #52525b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.tool-intro h1 {
    margin: 0;
    color: #fff;
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: .055em;
    line-height: 1.1;
    text-transform: uppercase;
}
.tool-intro h1 span { color: #3b82f6; }
.tool-intro > p {
    max-width: 370px;
    margin: 0 0 2px;
    color: #71717a;
    font-size: 12px;
    line-height: 1.5;
    text-align: right;
}

.workspace {
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 28px;
    background: rgba(3,3,6,0.62);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 32px 90px rgba(0,0,0,0.42);
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 330px;
    padding: 34px 22px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    background: rgba(7,8,11,0.55);
}

/* ---------- the drop zone ---------- */
.upload-state {
    position: relative;
    width: min(620px, 100%);
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 38px;
    border: 1px dashed rgba(96,165,250,0.42);
    border-radius: 20px;
    background: rgba(59,130,246,0.025);
    color: #fff;
    text-align: center;
    cursor: pointer;
    transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.upload-state:hover,
.upload-state:focus-visible,
.upload-state.drag-active {
    outline: none;
    transform: translateY(-2px);
    border-color: rgba(96,165,250,0.9);
    background: rgba(59,130,246,0.07);
    box-shadow: 0 0 0 1px rgba(96,165,250,0.18), 0 22px 60px rgba(59,130,246,0.14);
}
.upload-state.drag-active { border-style: solid; }

.upload-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(96,165,250,0.28);
    border-radius: 16px;
    background: rgba(59,130,246,0.08);
    color: #60a5fa;
    font-size: 28px;
    font-weight: 300;
}
.upload-title { font-size: 17px; font-weight: 800; }
.upload-copy { color: #71717a; font-size: 12px; }
.upload-formats {
    margin-top: 8px;
    color: #52525b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.folder-line {
    margin: 0;
    color: #52525b;
    font-size: 11px;
}
.folder-line button {
    border: 0;
    background: none;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.folder-line button:hover { color: #fff; }

/* ---------- action row ---------- */
.result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 6px 4px;
}
.result-meta { color: #52525b; font-size: 11px; }
.action-buttons { display: flex; gap: 10px; }
.action-button {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    color: #e4e4e7;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease, color .2s ease;
}
.action-button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(255,255,255,0.24); color: #fff; }
.action-button.primary {
    min-width: 230px;
    border-color: transparent;
    background: var(--nx-grad);
    color: #fff;
    box-shadow: 0 14px 34px rgba(99,102,241,0.3);
}
.action-button.primary:hover:not(:disabled) { box-shadow: 0 18px 42px rgba(99,102,241,0.42); }
.action-button:disabled { opacity: .4; cursor: not-allowed; }

.privacy-line {
    margin: 16px 0 0;
    color: #52525b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: center;
    text-transform: uppercase;
}
.privacy-dot { color: #4ade80; }

/* ---------- footer ---------- */
.site-footer {
    width: 100%;
    margin-top: 34px;
    padding: 22px 0 20px;
    color: #52525b;
    font-size: 12px;
    letter-spacing: .2em;
    text-align: center;
    text-transform: uppercase;
}
.footer-links { display: inline-flex; gap: 18px; margin-left: 20px; }
.footer-links a { color: #71717a; text-decoration: none; transition: color .2s; }
.footer-links a:hover, .footer-links a:focus-visible { color: #fff; outline: none; }

@media (max-width: 720px) {
    .page-shell { width: min(100% - 24px, 1120px); padding: 18px 0 0; }
    .tool-intro { display: block; padding: 0 3px 14px; }
    .tool-intro > p { margin-top: 8px; text-align: left; }
    .workspace { padding: 8px; border-radius: 20px; }
    .stage { padding: 20px 12px; }
    .upload-state { width: 100%; padding: 28px 18px; }
    .result-actions { flex-direction: column; align-items: stretch; padding: 14px 4px 2px; }
    .result-meta { text-align: center; }
    .action-buttons { width: 100%; }
    .action-button { flex: 1 1 0; padding: 0 12px; }
    .action-button.primary { min-width: 0; }
    .site-footer { margin-top: 28px; }
    .footer-links { display: flex; justify-content: center; margin: 10px 0 0; }
}

/* ---------- shared layout: settings column + preview ---------- */
.tool-split {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 12px;
}
.tool-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    background: rgba(255,255,255,0.02);
}
.tool-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 420px;
    padding: 30px 22px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    background: rgba(7,8,11,0.55);
}

/* ---------- shared form controls ---------- */
.nx-section > h2 {
    margin: 0 0 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: #a1a1aa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.nx-field { display: grid; gap: 7px; min-width: 0; }
.nx-field > label {
    color: #71717a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.nx-input, .nx-select, .nx-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.nx-textarea { min-height: 120px; line-height: 1.6; resize: vertical; }
.nx-input::placeholder, .nx-textarea::placeholder { color: #52525b; }
.nx-input:focus, .nx-select:focus, .nx-textarea:focus {
    border-color: rgba(96,165,250,0.7);
    background: rgba(59,130,246,0.05);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.14);
}
.nx-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 15px;
}
.nx-select option { background: #0b0b10; color: #fff; }

/* Colour wells */
.nx-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
}
.nx-swatch input[type="color"] {
    width: 26px;
    height: 26px;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}
.nx-swatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.nx-swatch input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.25); border-radius: 7px; }
.nx-swatch span {
    color: #71717a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .tool-split { grid-template-columns: minmax(0, 1fr); }
    .tool-stage { min-height: 340px; padding: 22px 14px; }
}
