/* ==========================================================================
   XESTUS TOOLS — SMART DAILY UTILITY & DEVELOPER HUB
   Scoped Stylesheet: css/xestus-tools.css
   High Performance & High Contrast Edition
   ========================================================================== */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.xestus-tools-section {
    position: relative;
    padding: 80px 24px;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Header & Intro */
.xestus-tools-header {
    text-align: center;
    margin-bottom: 36px;
}

.xestus-tools-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--stitch-mono, 'JetBrains Mono', monospace);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #38d6ff;
    background: rgba(0, 191, 255, 0.12);
    border: 1px solid rgba(0, 191, 255, 0.35);
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.xestus-tools-title {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.xestus-tools-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #cbd5e1;
    margin: 0 auto;
    max-width: 680px;
    line-height: 1.5;
}

/* Search Bar Wrapper */
.xestus-tools-search-wrapper {
    max-width: 720px;
    margin: 0 auto 32px auto;
    position: relative;
}

.xestus-tools-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(14, 22, 42, 0.85);
    border: 1px solid rgba(0, 191, 255, 0.28);
    border-radius: 14px;
    padding: 6px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.xestus-tools-search-box:focus-within {
    border-color: #38d6ff;
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.2), 0 0 25px rgba(0, 191, 255, 0.3);
}

.xestus-tools-search-icon {
    width: 20px;
    height: 20px;
    color: #38d6ff;
    flex-shrink: 0;
    margin-right: 12px;
}

.xestus-tools-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    color: #ffffff;
    padding: 10px 0;
}

.xestus-tools-search-input::placeholder {
    color: #94a3b8;
}

.xestus-tools-search-clear {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #94a3b8;
    display: none;
}

.xestus-tools-search-clear:hover {
    color: #ffffff;
}

.xestus-tools-search-box.has-query .xestus-tools-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Filter Tabs (High Contrast, Bold, Crystal Clear) */
.xestus-tools-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.xestus-tools-tab-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 18px !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    background: rgba(14, 22, 42, 0.85) !important;
    border: 1px solid rgba(0, 191, 255, 0.25) !important;
    border-radius: 9999px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.xestus-tools-tab-btn span,
.xestus-tools-tab-btn i,
.xestus-tools-tab-btn svg {
    color: #e2e8f0 !important;
    position: relative !important;
    z-index: 3 !important;
}

.xestus-tools-tab-btn:hover {
    color: #38d6ff !important;
    border-color: #38d6ff !important;
    background: rgba(16, 28, 56, 0.95) !important;
    box-shadow: 0 6px 18px rgba(0, 191, 255, 0.3) !important;
    transform: translateY(-2px) !important;
}

.xestus-tools-tab-btn:hover span,
.xestus-tools-tab-btn:hover i,
.xestus-tools-tab-btn:hover svg {
    color: #38d6ff !important;
}

.xestus-tools-tab-btn.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7, #0077cc) !important;
    border-color: #38d6ff !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.5), 0 0 14px rgba(56, 214, 255, 0.4) !important;
}

.xestus-tools-tab-btn.active span,
.xestus-tools-tab-btn.active i,
.xestus-tools-tab-btn.active svg {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Category Group */
.xestus-tools-category-group {
    margin-bottom: 40px;
}

.xestus-tools-category-group.is-hidden {
    display: none !important;
}

.xestus-tools-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.xestus-tools-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 191, 255, 0.12);
    border: 1px solid rgba(0, 191, 255, 0.3);
    color: #38d6ff;
    font-size: 1rem;
}

.xestus-tools-category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.xestus-tools-category-badge {
    font-size: 0.75rem;
    font-family: var(--stitch-mono, monospace);
    color: #94a3b8;
    background: rgba(16, 25, 45, 0.8);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Responsive Grid */
.xestus-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Tool Card */
.xestus-tools-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(11, 19, 36, 0.75);
    border: 1px solid rgba(0, 191, 255, 0.2);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.xestus-tools-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 214, 255, 0.55);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 191, 255, 0.28);
}

.xestus-tools-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.xestus-tools-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 191, 255, 0.12);
    border: 1px solid rgba(0, 191, 255, 0.3);
    color: #38d6ff;
    font-size: 1.25rem;
}

.xestus-tools-badge {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--stitch-mono, monospace);
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
}

.xestus-tools-badge.live {
    color: #34d399;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.xestus-tools-badge.coming-soon {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.xestus-tools-card-name {
    font-size: 1.12rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.xestus-tools-card-desc {
    font-size: 0.88rem;
    color: #cbd5e1;
    margin: 0 0 18px 0;
    line-height: 1.5;
    flex: 1;
}

/* Card Action Buttons (Bold, High Contrast, 100% Readable) */
.xestus-tools-card-action {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 11px 18px !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.xestus-tools-card-action.open-btn {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7, #0077cc) !important;
    border: 1px solid rgba(56, 214, 255, 0.45) !important;
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.35) !important;
}

.xestus-tools-card-action.open-btn span,
.xestus-tools-card-action.open-btn i,
.xestus-tools-card-action.open-btn svg {
    color: #ffffff !important;
    font-weight: 700 !important;
    position: relative !important;
    z-index: 3 !important;
}

.xestus-tools-card-action.open-btn:hover {
    background: linear-gradient(135deg, #00d2ff, #0077ff) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(0, 191, 255, 0.6), 0 0 16px rgba(56, 214, 255, 0.45) !important;
    transform: translateY(-2px) !important;
}

.xestus-tools-card-action.open-btn:hover span,
.xestus-tools-card-action.open-btn:hover i,
.xestus-tools-card-action.open-btn:hover svg {
    color: #ffffff !important;
}

.xestus-tools-card-action.disabled-btn {
    color: #94a3b8 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: not-allowed !important;
    opacity: 0.75 !important;
}

/* Empty State */
.xestus-tools-empty {
    text-align: center;
    padding: 48px 20px;
    background: rgba(14, 22, 42, 0.6);
    border: 1px dashed rgba(0, 191, 255, 0.25);
    border-radius: 16px;
    margin: 20px 0;
}

.xestus-tools-empty-icon {
    width: 48px;
    height: 48px;
    color: #38d6ff;
    margin: 0 auto 14px;
}

.xestus-tools-empty h4 {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.xestus-tools-empty p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

@media (max-width: 768px) {
    .xestus-tools-section {
        padding: 50px 16px;
    }
    .xestus-tools-grid {
        grid-template-columns: 1fr;
    }
}
