*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.fts-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Hero */
.fts-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    margin-bottom: 30px;
    color: white;
}
.fts-hero h1 { font-size: 2.6rem; margin-bottom: 12px; }
.fts-hero p  { font-size: 1.1rem; opacity: 0.92; }

/* Search */
.fts-search-bar { margin-bottom: 36px; }
.fts-search-bar input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    transition: border 0.2s;
}
.fts-search-bar input:focus { border-color: #667eea; }

/* Grid */
.fts-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Cards */
.fts-tool-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    border: 1px solid #ebebeb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
}
.fts-tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(102,126,234,0.18);
    border-color: #c5cef9;
}
.fts-tool-card.fts-hidden { display: none; }
.fts-tool-icon { font-size: 2.6rem; margin-bottom: 12px; }
.fts-tool-card h3 { font-size: 1.15rem; margin-bottom: 8px; color: #222; }
.fts-tool-card p  { color: #777; font-size: 0.88rem; margin-bottom: 18px; min-height: 36px; }

/* Open button */
.fts-open-tool {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: opacity 0.2s, transform 0.2s;
}
.fts-open-tool:hover { opacity: 0.88; transform: scale(1.04); }

/* Modal */
.fts-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    animation: ftsBackdrop 0.25s ease;
}
.fts-modal-content {
    background: #fff;
    margin: 4% auto;
    padding: 36px 32px;
    border-radius: 20px;
    width: 92%;
    max-width: 680px;
    max-height: 88vh;
    overflow-y: auto;
    animation: ftsSlidein 0.3s ease;
    position: relative;
}
.fts-close {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.fts-close:hover { color: #333; }

/* Tool inner styles */
.tool-wrapper h2 { color: #667eea; margin-bottom: 18px; font-size: 1.35rem; }

.tool-wrapper input[type="text"],
.tool-wrapper input[type="number"],
.tool-wrapper input[type="date"],
.tool-wrapper input[type="password"],
.tool-wrapper select,
.tool-wrapper textarea {
    width: 100%;
    padding: 11px 14px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border 0.2s;
    background: #fafafa;
}
.tool-wrapper input:focus,
.tool-wrapper select:focus,
.tool-wrapper textarea:focus { outline: none; border-color: #667eea; background: #fff; }

.tool-wrapper button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 11px 28px;
    border-radius: 8px;
    cursor: pointer;
    margin: 8px 4px 8px 0;
    font-size: 0.92rem;
    font-weight: 500;
    transition: opacity 0.2s, transform 0.15s;
}
.tool-wrapper button:hover { opacity: 0.88; transform: translateY(-1px); }

.fts-output {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f5f7ff;
    border: 1px solid #e0e5ff;
    border-radius: 10px;
    font-size: 0.98rem;
    line-height: 1.6;
    min-height: 44px;
}

/* Stats grid */
.fts-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.fts-stat {
    background: #f5f7ff;
    border: 1px solid #e0e5ff;
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
}
.fts-stat-num   { display: block; font-size: 1.6rem; font-weight: 700; color: #667eea; }
.fts-stat-label { display: block; font-size: 0.75rem; color: #888; margin-top: 4px; }

/* Btn group */
.fts-btn-group { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.fts-btn-group button { padding: 8px 16px; font-size: 0.83rem; }

/* Row */
.fts-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 10px 0; }
.fts-row label { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }

/* Tabs */
.fts-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.fts-tab {
    background: #f0f0f0; color: #555; border: none;
    padding: 8px 14px; border-radius: 6px; cursor: pointer;
    font-size: 0.83rem; transition: all 0.2s;
    background: #f5f7ff; color: #667eea;
}
.fts-tab.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }

/* Download btn */
.fts-download-btn {
    display: inline-block; margin-top: 12px;
    background: #2ecc71; color: white;
    padding: 8px 20px; border-radius: 20px;
    text-decoration: none; font-size: 0.88rem;
    transition: opacity 0.2s;
}
.fts-download-btn:hover { opacity: 0.85; color: white; }

/* Animations */
@keyframes ftsBackdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes ftsSlidein  { from { transform: translateY(-40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Responsive */
@media (max-width: 768px) {
    .fts-hero h1 { font-size: 1.8rem; }
    .fts-tools-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
    .fts-modal-content { width: 96%; margin: 8% auto; padding: 24px 18px; }
    .fts-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .fts-hero { padding: 40px 16px; }
    .fts-tools-grid { grid-template-columns: 1fr 1fr; }
    .fts-btn-group button { font-size: 0.78rem; padding: 7px 10px; }
}
