@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;500;600;700;800&display=swap');

/* =========================================================
   CleanFiles.click
   Futuristic dark UI — shared styles
   ========================================================= */

:root {
    --bg: #03070c;
    --bg-2: #071019;
    --panel: rgba(8, 17, 28, 0.88);
    --panel-2: rgba(5, 13, 22, 0.94);
    --border: #173044;
    --border-bright: #1b6078;
    --text: #f4f8fb;
    --muted: #a4b7c8;
    --muted-2: #71899c;
    --cyan: #18d9ff;
    --cyan-soft: rgba(24, 217, 255, 0.12);
    --green: #8cff66;
    --max-width: 1180px;
}

/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: "Oxanium", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- Global animated background ---------- */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(24, 217, 255, 0.075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 217, 255, 0.075) 1px, transparent 1px);
    background-size: 46px 46px;
    background-position: center center;
    opacity: 0.9;
}

body::after {
    content: "";
    position: fixed;
    top: -18%;
    left: -12%;
    width: 124%;
    height: 136%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 18% 24%,
            rgba(24, 217, 255, 0.17) 0,
            rgba(24, 217, 255, 0.08) 13%,
            transparent 31%
        ),
        radial-gradient(
            circle at 82% 68%,
            rgba(140, 255, 102, 0.11) 0,
            rgba(140, 255, 102, 0.05) 12%,
            transparent 30%
        ),
        radial-gradient(
            circle at 66% 12%,
            rgba(0, 150, 255, 0.10) 0,
            transparent 25%
        );
    filter: blur(28px);
    opacity: 0.9;
    transform: translate3d(0, 0, 0) scale(1);
    animation: ambientBackgroundMove 14s ease-in-out infinite alternate;
}

@keyframes ambientBackgroundMove {
    0% {
        transform: translate3d(-3%, -2%, 0) scale(1);
    }

    35% {
        transform: translate3d(2%, 3%, 0) scale(1.04);
    }

    70% {
        transform: translate3d(4%, -2%, 0) scale(1.02);
    }

    100% {
        transform: translate3d(-2%, 4%, 0) scale(1.05);
    }
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(var(--max-width), calc(100% - 48px));
    margin: 0 auto;
}

/* ---------- Header ---------- */

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid #13222f;
    background: rgba(3, 7, 12, 0.94);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.logo {
    color: #f4f8fb;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.045em;
    white-space: nowrap;
}

.logo span {
    color: var(--cyan);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    position: relative;
    color: #9cafbf;
    font-size: 13px;
    font-weight: 600;
    transition: color 160ms ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 1px;
    background: var(--cyan);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #f2f9fc;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

/* ---------- Tool page ---------- */

.tool-page {
    position: relative;
    z-index: 1;
    padding: 70px 0 92px;
}

.tool-intro {
    max-width: 830px;
    margin-bottom: 42px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 25px;
    padding: 7px 14px;
    border: 1px solid #18536a;
    border-radius: 999px;
    background: rgba(8, 30, 41, 0.7);
    color: #67e9ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px rgba(24, 217, 255, 0.8);
}

.tool-intro h1 {
    margin: 0;
    color: #f6f9fb;
    font-family: "Oxanium", "Segoe UI", Arial, sans-serif;
    font-size: clamp(50px, 6.2vw, 78px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.tool-intro > p:last-child {
    max-width: 720px;
    margin: 23px 0 0;
    color: #9fb5c7;
    font-size: 15px;
    line-height: 1.75;
}

/* ---------- Main workspace ---------- */

.workspace {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
    gap: 20px;
    align-items: start;
}

.workspace:has(.text-tool-input) {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.panel {
    position: relative;
    min-width: 0;
    border: 1px solid #1b3040;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(16, 34, 49, 0.55), rgba(5, 12, 20, 0.88)),
        var(--panel);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 18px 50px rgba(0, 0, 0, 0.18);
}

.folder-panel,
.rename-panel {
    min-height: 100%;
    padding: 30px;
}

.panel h2 {
    margin: 0;
    color: #8cff66;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.panel-description {
    margin: 14px 0 22px;
    color: #9eb2c3;
    font-size: 13px;
    line-height: 1.7;
}

/* ---------- Buttons ---------- */

.primary-btn,
.secondary-btn {
    min-height: 46px;
    border-radius: 10px;
    padding: 0 19px;
    font-family: "Oxanium", "Segoe UI", Arial, sans-serif;
    font-weight: 800;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        background 150ms ease,
        box-shadow 150ms ease;
}

.primary-btn {
    border: 1px solid var(--cyan);
    background: var(--cyan);
    color: #031016;
    box-shadow: 0 0 18px rgba(24, 217, 255, 0.09);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(24, 217, 255, 0.18);
}

.secondary-btn {
    border: 1px solid #243b4d;
    background: rgba(7, 15, 24, 0.9);
    color: #eaf4f8;
}

.secondary-btn:hover:not(:disabled) {
    border-color: #2c7187;
    background: rgba(11, 26, 38, 0.95);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

/* ---------- Rename options ---------- */

.rename-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.rename-option-group {
    overflow: hidden;
    border: 1px solid #1d3547;
    border-radius: 13px;
    background: rgba(4, 11, 18, 0.72);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.rename-option-group.is-active {
    border-color: #1b6078;

    background:
        linear-gradient(
            135deg,
            rgba(140, 255, 102, 0.075),
            rgba(140, 255, 102, 0.025)
        ),
        rgba(4, 11, 18, 0.72);

    box-shadow:
        inset 2px 0 0 rgba(24, 217, 255, 0.75),
        inset 0 0 24px rgba(140, 255, 102, 0.025);
}

.option-header {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    width: 100%;
    min-height: 67px;
    padding: 16px 18px;
    cursor: pointer;
}

.option-header:hover {
    background: rgba(24, 217, 255, 0.025);
}

.option-header input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--cyan);
}

.option-header > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.option-header strong {
    color: #edf6fa;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0.12em;
}

.option-header small {
    color: #7791a5;
    font-size: 12px;
    line-height: 1.45;
    letter-spacing: 0.08em;
}

/* Important: JS controls whether these sections are visible. */
.option-fields {
    display: grid;
    gap: 14px;
    padding: 0 18px 18px;
    border-top: 1px solid #142632;
    background: rgba(0, 0, 0, 0.08);
}

.option-fields[hidden] {
    display: none !important;
}

.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field > span {
    color: #d4e1e8;
    font-size: 11px;
    font-weight: 700;
}

.field input[type="text"],
.field input[type="number"],
.field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #213a4c;
    border-radius: 9px;
    outline: none;
    background: #050b11;
    color: #edf7fb;
    padding: 0 12px;
}

.field input::placeholder {
    color: #60798c;
}

.field input:focus,
.field select:focus {
    border-color: #1b9abb;
    box-shadow: 0 0 0 3px rgba(24, 217, 255, 0.07);
}

/* ---------- Text Cleaner ---------- */

.text-tool-input,
.text-tool-output {
    display: block;
    width: 100%;
    min-height: 405px;
    padding: 15px;
    border: 1px solid #213a4c;
    border-radius: 10px;
    outline: none;
    background: #050b11;
    color: #edf7fb;
    font-family: Arial, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
    overflow-y: scroll;
}

#findInput,
#replaceInput {
    font-family: Arial, "Segoe UI", sans-serif;
}


.character-count {
    margin: 8px 0 0;
    color: #60798c;
    font-size: 10px;
    line-height: 1.4;
    text-align: right;
}

/* Textarea scrollbar */

.text-tool-input,
.text-tool-output {
    scrollbar-width: thin;
    scrollbar-color: #1b6078 #050b11;
}

.text-tool-input::-webkit-scrollbar,
.text-tool-output::-webkit-scrollbar {
    width: 8px;
}

.text-tool-input::-webkit-scrollbar-track,
.text-tool-output::-webkit-scrollbar-track {
    background: #050b11;
    border-radius: 10px;
}

.text-tool-input::-webkit-scrollbar-thumb,
.text-tool-output::-webkit-scrollbar-thumb {
    background: #1b6078;
    border-radius: 10px;
}

.text-tool-input::-webkit-scrollbar-thumb:hover,
.text-tool-output::-webkit-scrollbar-thumb:hover {
    background: #18d9ff;
}

.text-tool-input::placeholder {
    color: #60798c;
}

.text-tool-input:focus,
.text-tool-output:focus {
    border-color: #1b9abb;
    box-shadow: 0 0 0 3px rgba(24, 217, 255, 0.07);
}


.checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 1px 0;
}

.checkbox-field input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--cyan);
}

.checkbox-field span {
    color: #b8cbd7;
    font-size: 12px;
    font-weight: 600;
}

/* ---------- Preview ---------- */

.preview {
    grid-column: 1 / -1;
    padding: 30px;
}

.preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.preview-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #152a38;
    border-radius: 9px;
    background: rgba(4, 11, 18, 0.78);
}

.preview-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #bfd0db;
    font-size: 12px;
}

.preview-row .arrow {
    color: var(--cyan);
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.status {
    margin: 14px 0 0;
    color: #8da5b5;
    font-size: 12px;
}

.status.warning {
    color: #ffd27a;
}

/* ---------- How it works ---------- */

.tool-note {
    max-width: 820px;
    margin-top: 42px;
}

.tool-note h2 {
    margin: 0 0 15px;
    color: #f2f7fa;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.tool-note ol {
    margin: 0;
    padding-left: 22px;
    color: #a9bdca;
}

.tool-note li {
    margin: 6px 0;
    padding-left: 3px;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.tool-note > p {
    margin: 16px 0 0;
    color: #6f8798;
    font-size: 11px;
    letter-spacing: 0.06em;
}

/* ---------- FAQ ---------- */

.faq-section {
    max-width: 900px;
    margin-top: 52px;
}

.faq-section > h2 {
    margin: 0 0 22px;
    color: #8cff66;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.faq-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.faq-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 18px;
    padding: 21px 22px;
    border: 1px solid #173044;
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            rgba(16, 34, 49, 0.45),
            rgba(5, 12, 20, 0.82)
        ),
        var(--panel);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 12px 30px rgba(0, 0, 0, 0.12);
}

.faq-number {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.4;
}

.faq-content {
    min-width: 0;
}

.faq-content h3 {
    margin: 0 0 9px;
    color: #edf6fa;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 800;
}

.faq-content p {
    margin: 0;
    color: #9eb2c3;
    font-size: 13px;
    line-height: 1.7;
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid #13232f;
    padding: 28px 0;
    background: rgba(3, 7, 12, 0.96);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 0;
    color: #62798a;
    font-size: 11px;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-inner a {
    color: #718a9b;
    font-size: 11px;
}

.footer-inner a:hover {
    color: #dcecf2;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {

    .workspace {
        grid-template-columns: 1fr;
    }

    .folder-panel,
    .rename-panel {
        min-height: 0;
    }

    .preview {
        grid-column: auto;
    }

    .faq-section {
        max-width: none;
    }
}

@media (max-width: 640px) {

    .container {
        width: min(100% - 28px, var(--max-width));
    }

    /* Header */

    .header-inner {
        min-height: 70px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 9px 0;
    }

    .main-nav {
        width: 100%;
        gap: 18px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a {
        flex: 0 0 auto;
        font-size: 12px;
    }

    /* Page */

    .tool-page {
        padding: 48px 0 65px;
    }

    .tool-intro {
        margin-bottom: 30px;
    }

    .eyebrow {
        margin-bottom: 19px;
    }

    .tool-intro h1 {
        font-size: clamp(43px, 14vw, 62px);
        line-height: 0.99;
    }

    .tool-intro > p:last-child {
        margin-top: 18px;
        font-size: 13px;
    }

    /* Main panels */

    .folder-panel,
    .rename-panel,
    .preview {
        padding: 22px;
        border-radius: 15px;
    }

    .panel h2 {
        font-size: 18px;
    }

    /* Rename options */

    .rename-options {
        gap: 8px;
    }

    .option-header {
        min-height: 62px;
        padding: 15px;
        gap: 11px;
    }

    .option-header strong {
        font-size: 13px;
    }

    .option-header small {
        font-size: 10px;
    }

    .option-fields {
        padding: 0 15px 15px;
    }

    .fields {
        grid-template-columns: 1fr;
    }

    /* Preview */

    .preview-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .preview-row .arrow {
        display: none;
    }

    .tool-actions {
        flex-direction: column;
    }

    .tool-actions button,
    .folder-panel .primary-btn,
    .rename-panel .secondary-btn {
        width: 100%;
    }

    /* How it works */

    .tool-note {
        margin-top: 34px;
    }

    .tool-note h2 {
        font-size: 22px;
    }

    .tool-note li {
        font-size: 12px;
    }

    .tool-note > p {
        font-size: 10px;
    }

    /* FAQ */

    .faq-section {
        margin-top: 40px;
    }

    .faq-section > h2 {
        margin-bottom: 18px;
        font-size: 22px;
    }

    .faq-list {
        gap: 10px;
    }

    .faq-item {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 12px;
        padding: 17px 16px;
        border-radius: 12px;
    }

    .faq-number {
        font-size: 11px;
    }

    .faq-content h3 {
        margin-bottom: 7px;
        font-size: 13px;
        line-height: 1.5;
    }

    .faq-content p {
        font-size: 12px;
        line-height: 1.65;
    }

    /* Footer */

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

/* ---------- Motion safety ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
