/* Free Tools shared styles (marketing site, English master).
   Brand tokens follow ai-admin/Public/index.html: dark #0a0a23 base, cyan #00e6fe accent. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: #0a0a23;
    color: #e8e8f0;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: #00e6fe; text-decoration: none; }
img { max-width: 100%; }

/* ===== Navbar ===== */
.ft-navbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 5vw;
    background: rgba(10, 10, 35, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 230, 254, 0.15);
}
/* Logo sized to match the main-site navbar (.navbar .logo span): 42px icon, 1.6rem white bold text */
.ft-logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.6rem; letter-spacing: 1px; color: #fff; }
.ft-logo img { width: 42px; height: 42px; border-radius: 10px; }
.ft-nav { display: flex; align-items: center; gap: 28px; }
.ft-nav a { color: #cfcfe6; font-size: 0.98rem; }
.ft-nav a:hover { color: #00e6fe; }
.ft-nav .ft-cta {
    background: linear-gradient(135deg, #00e6fe, #7b5cff);
    color: #08081c; font-weight: 700; border-radius: 8px; padding: 8px 18px;
}
/* Navbar dropdowns (AI Video / AI Image / Free Tools) */
.ft-dropdown { position: relative; }
.ft-dropdown > button, .ft-dropdown > .ft-drop-btn {
    background: none; border: none; color: #cfcfe6; font: inherit; cursor: pointer; padding: 6px 0;
}
.ft-dropdown > button:hover, .ft-dropdown.open > button,
.ft-dropdown > .ft-drop-btn:hover, .ft-dropdown.open > .ft-drop-btn { color: #00e6fe; }
.ft-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    margin-top: 10px; min-width: 240px; padding: 10px;
    background: #12122e; border: 1px solid rgba(0, 230, 254, 0.25); border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.ft-dropdown.open .ft-dropdown-menu { display: block; }
.ft-nav .ft-dropdown:hover .ft-dropdown-menu { display: block; }
.ft-dropdown-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: #cfcfe6; font-size: 0.92rem; }
.ft-dropdown-menu a:hover { background: rgba(0, 230, 254, 0.1); color: #00e6fe; }
.ft-dropdown-menu a.active { color: #00e6fe; font-weight: 600; }
.ft-menu-btn { display: none; background: none; border: none; color: #00e6fe; font-size: 1.5rem; cursor: pointer; }

/* ===== Layout ===== */
.ft-main { max-width: 1180px; margin: 0 auto; padding: 40px 5vw 80px; }
/* Breadcrumb (SEO) */
.ft-breadcrumb { margin-bottom: 22px; font-size: 0.85rem; color: #8a8fb0; }
.ft-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ft-breadcrumb a { color: #8a8fb0; }
.ft-breadcrumb a:hover { color: #00e6fe; }
.ft-breadcrumb li[aria-current="page"] { color: #cfcfe6; }
.ft-hero { text-align: center; margin-bottom: 32px; }
.ft-hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); color: #fff; margin-bottom: 10px; }
.ft-hero h1 span { color: #00e6fe; }
.ft-hero p { color: #a9a9c5; max-width: 720px; margin: 0 auto; }
.ft-badge {
    display: inline-block; margin-bottom: 14px; padding: 4px 14px; border-radius: 999px;
    background: rgba(0, 230, 254, 0.1); border: 1px solid rgba(0, 230, 254, 0.35);
    color: #00e6fe; font-size: 0.82rem; letter-spacing: 0.5px;
}
.ft-workspace { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: stretch; }
/* left column: upload card + settings card stacked, result card stretches to match */
.ft-left { display: flex; flex-direction: column; gap: 24px; }
.ft-card {
    background: #12122e; border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px; padding: 22px;
}
.ft-card h2 { font-size: 1.05rem; color: #fff; margin-bottom: 14px; }

/* ===== Upload zone ===== */
.ft-drop {
    border: 2px dashed rgba(0, 230, 254, 0.4); border-radius: 12px;
    padding: 28px 16px; text-align: center; cursor: pointer; transition: 0.2s;
    color: #a9a9c5; font-size: 0.92rem;
}
.ft-drop:hover, .ft-drop.dragover { background: rgba(0, 230, 254, 0.06); border-color: #00e6fe; color: #e8e8f0; }
.ft-drop .ft-drop-icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.ft-file-meta { margin-top: 10px; font-size: 0.85rem; color: #00e6fe; word-break: break-all; }
.ft-progress { display: none; margin-top: 12px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ft-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #00e6fe, #7b5cff); transition: width 0.2s; }

/* ===== Parameter form ===== */
.ft-field { margin-bottom: 14px; }
.ft-field label { display: block; font-size: 0.85rem; color: #a9a9c5; margin-bottom: 5px; }
.ft-field input[type="number"], .ft-field input[type="text"], .ft-field select {
    width: 100%; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 0.9rem;
    background: #0d0d26; color: #e8e8f0; border: 1px solid rgba(255, 255, 255, 0.12);
}
.ft-field input:focus, .ft-field select:focus { outline: none; border-color: #00e6fe; }
.ft-field input[type="range"] { width: 100%; accent-color: #00e6fe; }
.ft-field input[type="color"] { width: 48px; height: 34px; border: none; background: none; cursor: pointer; }
.ft-field .ft-range-val { color: #00e6fe; font-size: 0.85rem; margin-left: 6px; }
.ft-field-check { display: flex; align-items: center; gap: 8px; }
.ft-field-check label { margin: 0; }
.ft-field-check input { accent-color: #00e6fe; width: 16px; height: 16px; }
.ft-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* parameter form: number fields pair two per row, other fields span full width */
#ft-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#ft-form .ft-span2 { grid-column: 1 / -1; }

/* ===== Visual crop editor (image-crop) ===== */
.ft-crop-wrap { grid-column: 1 / -1; }
.ft-crop-stage {
    position: relative; height: 50vh; display: flex;
    align-items: center; justify-content: center; overflow: hidden;
    background: rgba(0, 0, 0, 0.25); border-radius: 8px; line-height: 0;
}
.ft-crop-inner { position: relative; }
.ft-crop-img {
    max-width: 100%; max-height: 50vh; width: auto; height: auto;
    display: block; user-select: none; -webkit-user-drag: none;
}
.ft-crop-box {
    position: absolute; box-sizing: border-box;
    border: 1px dashed #00e6fe; cursor: move; touch-action: none;
    box-shadow: 0 0 0 9999px rgba(6, 18, 42, 0.55);
}
.ft-crop-hd {
    position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px;
    background: #00e6fe; border: 1px solid #06122a; border-radius: 2px; touch-action: none;
}
.ft-crop-hd.nw { left: 0; top: 0; cursor: nwse-resize; }
.ft-crop-hd.n { left: 50%; top: 0; cursor: ns-resize; }
.ft-crop-hd.ne { left: 100%; top: 0; cursor: nesw-resize; }
.ft-crop-hd.e { left: 100%; top: 50%; cursor: ew-resize; }
.ft-crop-hd.se { left: 100%; top: 100%; cursor: nwse-resize; }
.ft-crop-hd.s { left: 50%; top: 100%; cursor: ns-resize; }
.ft-crop-hd.sw { left: 0; top: 100%; cursor: nesw-resize; }
.ft-crop-hd.w { left: 0; top: 50%; cursor: ew-resize; }
.ft-crop-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ft-crop-size { font-size: 13px; color: #00e6fe; }
.ft-crop-tip { font-size: 12px; color: #8a8fb0; }

/* ===== Preview ===== */
.ft-preview { min-height: 380px; display: flex; flex-direction: column; }
.ft-preview-stage {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: #0d0d26; border-radius: 12px; padding: 16px; min-height: 300px; overflow: hidden;
}
.ft-preview-stage img, .ft-preview-stage video { max-width: 100%; max-height: 60vh; border-radius: 8px; }
.ft-preview-empty { color: #6c6c8a; font-size: 0.92rem; }
.ft-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.ft-size-info { font-size: 0.85rem; color: #a9a9c5; }
.ft-size-info b { color: #00e6fe; }
.ft-btn {
    display: inline-block; border: none; cursor: pointer; font: inherit; font-weight: 700;
    border-radius: 10px; padding: 11px 26px; font-size: 0.95rem;
    background: linear-gradient(135deg, #00e6fe, #7b5cff); color: #08081c; transition: 0.2s;
}
.ft-btn:hover { filter: brightness(1.12); }
.ft-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ft-btn.ghost { background: transparent; color: #00e6fe; border: 1px solid rgba(0, 230, 254, 0.5); }

/* ===== Notices / errors ===== */
.ft-notice { margin-top: 14px; padding: 10px 14px; border-radius: 10px; font-size: 0.86rem; display: none; }
.ft-notice.show { display: block; }
.ft-notice.err { background: rgba(255, 90, 90, 0.12); border: 1px solid rgba(255, 90, 90, 0.4); color: #ff9c9c; }
.ft-notice.warn { background: rgba(255, 190, 60, 0.1); border: 1px solid rgba(255, 190, 60, 0.35); color: #ffd27d; }

/* ===== SEO content sections ===== */
.ft-sections { margin-top: 48px; display: grid; gap: 20px; }
.ft-sections h2 { color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.ft-sections h3 { color: #fff; font-size: 1rem; margin: 14px 0 6px; }
.ft-sections p, .ft-sections li { color: #a9a9c5; font-size: 0.95rem; }
.ft-sections p + p { margin-top: 10px; }
.ft-sections ul { padding-left: 20px; }
.ft-feature-list { margin-top: 6px; display: grid; gap: 6px; padding-left: 20px; }
.ft-feature-list li { color: #a9a9c5; }
.ft-feature-list b { color: #e8e8f0; }
.ft-faq h3 { margin-top: 16px; }
.ft-faq h3:first-of-type { margin-top: 4px; }
.ft-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 6px; }
.ft-step { background: #12122e; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px; padding: 20px; }
.ft-step i { font-style: normal; display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(0, 230, 254, 0.12); color: #00e6fe; font-weight: 700; margin-bottom: 10px; }
.ft-step h3 { font-size: 0.98rem; color: #fff; margin-bottom: 6px; }
.ft-step p { font-size: 0.87rem; }
.ft-more { margin-top: 48px; }
.ft-more h2 { color: #fff; font-size: 1.2rem; }
.ft-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.ft-more-grid a { background: #12122e; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px; padding: 14px 16px; color: #cfcfe6; font-size: 0.9rem; transition: 0.2s; }
.ft-more-grid a:hover { border-color: rgba(0, 230, 254, 0.5); color: #00e6fe; }

/* ===== Footer ===== */
.ft-footer { padding: 26px 5vw; text-align: center; color: #6c6c8a; font-size: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* ===== Directory page ===== */
.ft-tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.ft-tool-card {
    background: #12122e; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px;
    padding: 22px; color: #e8e8f0; transition: 0.2s; display: block;
}
.ft-tool-card:hover { border-color: rgba(0, 230, 254, 0.5); transform: translateY(-2px); }
.ft-tool-card .ft-tool-ico { font-size: 1.5rem; margin-bottom: 10px; display: block; }
.ft-tool-card h3 { color: #fff; font-size: 1.02rem; margin-bottom: 6px; }
.ft-tool-card p { color: #a9a9c5; font-size: 0.86rem; }
.ft-tool-group { margin: 36px 0 4px; color: #00e6fe; font-size: 1.05rem; letter-spacing: 0.5px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .ft-workspace { grid-template-columns: 1fr; }
    .ft-steps { grid-template-columns: 1fr; }
    .ft-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: #12122e; padding: 12px 5vw 20px; border-bottom: 1px solid rgba(0, 230, 254, 0.2); }
    .ft-nav.open { display: flex; }
    .ft-nav a { padding: 10px 0; }
    .ft-nav .ft-dropdown:hover .ft-dropdown-menu { display: none; }
    .ft-nav .ft-dropdown.open .ft-dropdown-menu { display: block; }
    .ft-dropdown-menu { position: static; transform: none; box-shadow: none; border: none; background: rgba(0, 230, 254, 0.05); }
    .ft-menu-btn { display: block; }
    .ft-logo img { width: 36px; height: 36px; }
}
