/* Base Styles */
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --text-color: #333;
    --light-text: #666;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

*:focus,
*:focus-visible {
    outline: none;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: #ffffff;
    color: var(--text-color);
    padding: 12px 0;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    max-width: 100%;
    padding: 0 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

.back-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.back-btn svg {
    transition: transform 0.3s ease;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .back-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* Header styles for non-home pages */
.non-home-header {
    background-color: #ffffff;
    color: var(--text-color);
    padding: 12px 0;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.non-home-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.non-home-header .search-container {
    display: none;
}

.non-home-header .back-btn {
    margin: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--logo-color, #1e293b);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    animation: elegantSlideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.header-logo-img {
    height: 36px;
    width: auto;
}

@keyframes elegantSlideIn {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Header Search Icon Button */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #1e293b;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover {
    background-color: #f1f5f9;
}

.icon-btn:focus,
.icon-btn:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Desktop Top Navigation & Profile Icon */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
}

.desktop-nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.2s;
    padding: 6px 10px;
    border-radius: 8px;
}

.desktop-nav-link:hover {
    background-color: #f1f5f9;
}

.header-profile-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer !important;
    object-fit: cover;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    flex-shrink: 0;
    pointer-events: auto !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.header-profile-pic:hover {
    border-color: var(--primary-color);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.35);
}

/* YouTube style full screen search */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 3000;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.2s ease-out;
}

.search-overlay.active {
    display: flex;
}

.search-overlay-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
    background-color: #fff;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #f1f5f9;
    border-radius: 20px;
    padding: 0 15px;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#overlaySearchInput {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 0;
    font-size: 1rem;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-color);
}

#overlaySearchInput:focus,
#overlaySearchInput:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}
/* Hero Section */
.hero {
    background: #ffffff;
    color: var(--text-color);
    padding: 70px 0;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.05) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
    animation: fadeUp 1s ease-out forwards;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 18px;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.15rem;
    color: var(--light-text);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Featured Tools Section */
.featured-tools {
    padding: 20px 0 40px;
}

.featured-tools h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Footer */
footer {
    background-color: #1e293b;
    color: white;
    padding: 25px 0;
    margin-top: 40px;
    opacity: 0; /* Shuru mein footer hide rahega */
    transform: translateY(20px); /* Thoda niche se upar aayega */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

footer.visible {
    opacity: 1; /* Load hone ke baad show hoga */
    transform: translateY(0);
}

footer p {
    text-align: center;
    margin-bottom: 15px;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
    }

    .hero h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* Mobile-specific optimizations */
@media (max-width: 480px) {
    header {
        padding: 6px 0;
    }

    .logo {
        font-size: 1.35rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .header-actions {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0 !important;
    }

    .header-profile-pic,
    .desktop-only-profile,
    #headerProfileLink {
        display: none !important;
    }

    /* Search & Guest Mode Group on Mobile */
    .search-guest-group {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    #headerSearchBtn {
        margin: 0 !important;
    }
    .guest-indicator-btn {
        position: absolute !important;
        top: 36px !important;
        right: 0 !important;
        padding: 3px 8px !important;
        font-size: 0.68rem !important;
        margin: 0 !important;
        display: inline-flex;
        align-items: center !important;
        gap: 5px !important;
        height: auto !important;
        border-radius: 12px !important;
        background: #0f172a !important;
        color: #ffffff !important;
        border: 1px solid #1e293b !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35) !important;
        z-index: 50 !important;
    }
    .guest-indicator-btn.hidden,
    .guest-indicator-btn[style*="display: none"],
    .guest-indicator-btn[style*="display:none"],
    body.user-logged-in .guest-indicator-btn,
    html.user-logged-in .guest-indicator-btn {
        display: none !important;
    }
    .guest-indicator-btn:hover {
        background: #1e293b !important;
        border-color: #334155 !important;
        transform: translateY(-1px);
    }
    .guest-indicator-btn .guest-dot {
        width: 5px !important;
        height: 5px !important;
        background: #94a3b8 !important;
        border-radius: 50% !important;
        display: inline-block !important;
        box-shadow: 0 0 4px rgba(148, 163, 184, 0.6) !important;
    }
}

.guest-indicator-btn.hidden,
.guest-indicator-btn[style*="display: none"],
.guest-indicator-btn[style*="display:none"],
body.user-logged-in .guest-indicator-btn,
html.user-logged-in .guest-indicator-btn {
    display: none !important;
}

/* Guest Mode Indicator Button - Desktop & Default (Black Theme) */
.guest-indicator-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #1e293b;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    text-decoration: none;
}
.guest-indicator-btn:hover {
    background: #1e293b;
    border-color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.guest-indicator-btn .guest-dot {
    width: 7px;
    height: 7px;
    background: #94a3b8;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 4px rgba(148, 163, 184, 0.6);
}
.search-guest-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Desktop Sidebar Toggle Button (Beside Logo) */
.desktop-sidebar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #1e293b;
    padding: 6px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    margin-right: 8px;
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
    flex-shrink: 0;
}
.desktop-sidebar-btn:hover {
    background-color: #f1f5f9;
    color: #0284c7;
}
.desktop-sidebar-btn:active {
    transform: scale(0.95);
}

/* Mobile Navigation Hamburger & Drawer */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #1e293b;
    padding: 6px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background-color: #f1f5f9;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

@media (min-width: 769px) {
    .hide-on-desktop {
        display: none !important;
    }
    .desktop-sidebar-btn {
        display: inline-flex !important;
    }
    .mobile-drawer-container {
        left: 0 !important;
        right: auto !important;
        transform: translateX(-100%) !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15) !important;
    }
    .mobile-drawer-overlay.active .mobile-drawer-container {
        transform: translateX(0) !important;
    }
}

@media (max-width: 768px) {
    .desktop-sidebar-btn {
        display: none !important;
    }
    .desktop-only-profile,
    #headerProfileLink {
        display: none !important;
    }
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    pointer-events: none;
}

.mobile-drawer-overlay.active {
    display: block;
    pointer-events: auto;
}

.mobile-drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active .mobile-drawer-backdrop {
    opacity: 1;
}

.mobile-drawer-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 84%;
    max-width: 340px;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    overflow: hidden;
}

.mobile-drawer-overlay.active .mobile-drawer-container {
    transform: translateX(0);
}

.drawer-header {
    padding: 18px 20px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    color: #ffffff;
}

.drawer-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-logo-img {
    width: 28px;
    height: 28px;
}

.drawer-logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.drawer-close-btn {
    background: #1e293b;
    border: 1px solid #334155;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.drawer-close-btn:hover {
    background: #334155;
    color: #ffffff;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}

.drawer-section {
    display: flex;
    flex-direction: column;
}

.drawer-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 8px;
    padding-left: 4px;
}

/* User Profile Card inside Drawer */
.drawer-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 14px;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    transition: all 0.2s ease;
}

.drawer-profile-card:hover {
    background: #1e293b;
    border-color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}

.drawer-profile-pic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #38bdf8;
    background: #1e293b;
    flex-shrink: 0;
}

.drawer-profile-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.drawer-profile-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-profile-subtitle {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

.drawer-profile-card svg {
    stroke: #94a3b8;
    transition: stroke 0.2s;
}

.drawer-profile-card:hover svg {
    stroke: #38bdf8;
}

/* Official Solutions Button inside Drawer */
.drawer-official-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #0f172a;
    color: #ffffff !important;
    border: 1px solid #1e293b;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
    transition: all 0.2s ease;
}

.drawer-official-btn:hover {
    background: #1e293b;
    border-color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.24);
}

.drawer-official-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-official-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
}

.drawer-official-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}

.drawer-official-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

.drawer-badge {
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Modern Drawer Menu Item */
.drawer-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.drawer-menu-item:hover {
    background: #0f172a;
    color: #ffffff !important;
    border-color: #0f172a;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.drawer-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #0f172a;
    color: #ffffff;
    transition: all 0.2s ease;
}

.drawer-menu-item:hover .drawer-icon-wrap {
    background: #1e293b;
}

.drawer-menu-item svg:last-child {
    stroke: #94a3b8;
    transition: stroke 0.2s, transform 0.2s;
}

.drawer-menu-item:hover svg:last-child {
    stroke: #38bdf8;
    transform: translateX(2px);
}

.doc-icon {
    background: #0f172a;
    color: #38bdf8;
}

.support-icon {
    background: #0f172a;
    color: #38bdf8;
}

.report-icon {
    background: #0f172a;
    color: #f87171;
}

.studio-icon {
    background: #0f172a;
    color: #c084fc;
}

.featured-doc-item {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    color: #ffffff;
    margin-bottom: 8px;
    padding: 14px 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

.featured-doc-item:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #475569;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.24);
}

.featured-doc-item .drawer-icon-wrap {
    background: rgba(255, 255, 255, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.featured-doc-item .drawer-item-title {
    display: block;
    font-size: 0.94rem;
    font-weight: 700;
    color: #ffffff;
}

.featured-doc-item .drawer-item-desc {
    display: block;
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 400;
    margin-top: 1px;
}

.featured-doc-item svg:last-child {
    stroke: #38bdf8;
}

.drawer-item-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.drawer-item-desc {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
}

button, a {
    cursor: pointer;
}

/* Accessibility */
:focus {
    outline: none !important;
}

:focus-visible, input:focus, textarea:focus, select:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1) !important;
}

button:active, a:active {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1) !important;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Reduce render-blocking CSS */
@media print {
    .hero {
        display: none;
    }
}

/* Problem Section Styles */
.problem-section {
    background-color: var(--card-bg);
    padding: 40px 0;
    margin-top: 20px;
    border-top: 2px solid var(--primary-color);
    animation: fadeIn 0.5s ease-out;
}

.problem-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.problem-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.problem-content p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.problem-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.problem-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.problem-btn:hover {
    background-color: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.problem-btn:active {
    transform: translateY(0);
}

/* Animation for problem section */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    border-top: 1px solid #eee;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--light-text);
    font-size: 10px;
    letter-spacing: 0.2px;
    font-weight: 500;
    padding: 5px;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: var(--text-color);
    font-weight: 600;
}

.nav-item.active svg {
    stroke-width: 2.2;
    color: var(--text-color);
}

.nav-item svg {
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

body.has-bottom-nav {
    padding-bottom: 70px;
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
    .desktop-nav {
        display: flex;
    }
    body.has-bottom-nav {
        padding-bottom: 0;
    }
}

/* Profile Modal New Buttons */
.modal-btn-creator {
    background: var(--primary-color); color: white; width: 100%;
    padding: 12px; border: none; border-radius: 8px; margin-top: 15px;
    cursor: pointer; font-weight: bold; transition: 0.2s;
}
.modal-btn-creator:hover { background: #3367d6; }

.modal-btn-delete {
    background: transparent; color: #ea4335; width: 100%;
    padding: 10px; border: 1px solid #ea4335; border-radius: 8px; margin-top: 10px;
    cursor: pointer; font-weight: bold; transition: 0.2s;
}
.modal-btn-delete:hover { background: #ea4335; color: white; }

/* Responsive Tools Grid & Social Cards */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
    align-items: start;
}

.tool-card-wrapper {
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
    min-width: 0;
    width: 100%;
}

.tool-card-main-box {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: none;
    min-width: 0;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card-main-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Mobile & Tablet (<=768px): strictly 2 equal columns and compact spacing */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .tool-card-link > div {
        padding: 0 !important;
    }
    .tool-card-link h4 {
        font-size: 0.9rem !important;
    }
    .tool-actions {
        padding: 6px 4px !important;
        min-height: 36px;
    }
    .action-btn {
        padding: 3px 2px !important;
        font-size: 0.75rem !important;
        gap: 2px !important;
    }
    .action-btn svg {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (max-width: 380px) {
    .tools-grid {
        gap: 8px;
    }
}

.tool-card-link {
    text-decoration: none;
    color: inherit;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Disable inside card hover so wrapper handles it cleanly */
.tool-card-link > div {
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    margin: 0 !important;
}

/* --- Card Strict Size Limits --- */
.card-content-limit {
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

/* Fix for all inner elements inside card-content-limit to strictly stay 100% square */
.card-content-limit > * {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    box-sizing: border-box !important;
}

.card-content-limit img,
.dynamic-tool-img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Tool Dev Footer below Card */
.tool-dev-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 6px;
    padding: 0 4px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    width: 100%;
    box-sizing: border-box;
}

.tool-dev-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    height: 100%;
}

.show-on-mobile-only {
    display: none;
}

.mobile-more-container {
    position: relative;
}

.mobile-more-dropdown {
    display: none;
    position: absolute;
    bottom: 110%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 50;
    flex-direction: column;
    min-width: 140px;
    overflow: hidden;
}

.mobile-more-dropdown.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.mobile-more-dropdown .action-btn {
    width: 100%;
    padding: 10px 15px;
    border-radius: 0;
    justify-content: flex-start;
}

.mobile-more-dropdown .action-btn:hover {
    background: var(--background-color);
}

/* --- Clean Transparent 3-Dot Menu on Tool Cards --- */
.tool-card-menu-container {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
}

.tool-card-menu-btn {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    color: #0f172a !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    padding: 0 !important;
}

.tool-card-menu-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.tool-card-menu-btn svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
}

.tool-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 6px;
    min-width: 150px;
    z-index: 30;
    animation: fadeIn 0.15s ease-out;
}

.tool-dropdown-menu button {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.tool-dropdown-menu button:hover {
    background: #f1f5f9;
    color: #0f172a;
}

@media (max-width: 768px) {
    .tool-card-menu-container {
        display: none !important;
    }
}

.tool-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    box-sizing: border-box;
    gap: 2px;
    overflow: hidden;
}

.action-btn {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s ease;
    font-weight: 500;
    padding: 4px 5px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.action-btn:hover { 
    color: var(--text-color);
    background: var(--background-color);
}

.action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-btn:active svg {
    transform: scale(0.85);
}

.action-btn span {
    white-space: nowrap;
    font-size: 0.8rem;
}

.action-btn.share-btn {
    flex-shrink: 0;
    padding: 4px 6px;
}

.action-btn.share-btn span {
    white-space: nowrap;
    display: inline-block;
}

.action-btn.active.like-btn { color: var(--primary-color); }
.action-btn.active.like-btn svg { fill: var(--primary-color); stroke: var(--primary-color); animation: popIcon 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

.action-btn.active.dislike-btn { color: #ea4335; }
.action-btn.active.dislike-btn svg { fill: #ea4335; stroke: #ea4335; animation: popIcon 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

@keyframes popIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Mobile & Tablet adjustments for Cards and Menus */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
    .show-on-mobile-only {
        display: block !important;
    }
}

/* Central Custom Notification System (Centered Toast) */
.sh-toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.98);
    color: #1e293b;
    padding: 16px 30px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    pointer-events: none;
    border: 1px solid #e2e8f0;
}
.sh-toast-notification.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.sh-toast-success { border-bottom: 4px solid #10b981; }
.sh-toast-error { border-bottom: 4px solid #ef4444; }
.sh-toast-info { border-bottom: 4px solid #3b82f6; }

/* Skeleton Loading Styles */
.skeleton-wrapper {
    background: transparent;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-img, .skeleton-text, .skeleton-icon {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}



/* Custom Confirm Modal */
.custom-notification-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; opacity: 0; visibility: hidden; transition: 0.3s;
}
.custom-notification-overlay.active { opacity: 1; visibility: visible; }
.custom-notification-box { background: #ffffff; border-radius: 16px; padding: 30px; width: 90%; max-width: 400px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.2); transform: scale(0.9); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.custom-notification-overlay.active .custom-notification-box { transform: scale(1); }

/* AI Sidebar Modern Search & Chat Items */
.sidebar-search-btn {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 5px 15px 15px 15px;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
    width: calc(100% - 30px);
    text-align: left;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}
.sidebar-search-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.sidebar-search-btn .search-icon {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.history-label {
    padding: 5px 15px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-history {
    padding: 0 10px 20px;
    overflow-y: auto;
}
.chat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: #475569;
}
.chat-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.chat-item.active {
    background: #eff6ff;
    color: var(--primary-color);
    font-weight: 700;
}
.chat-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}
.chat-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}
.chat-options-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    opacity: 0;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.chat-item:hover .chat-options-btn,
.chat-item.active .chat-options-btn {
    opacity: 1;
}
.chat-options-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* AI Chat Item Dropdown */
.chat-item .dropdown-menu {
    position: absolute;
    top: 40px;
    right: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    flex-direction: column;
    min-width: 140px;
    overflow: hidden;
}
.chat-item .dropdown-menu.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}
.chat-item .dropdown-menu button {
    background: none;
    border: none;
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transition: background 0.2s;
}
.chat-item .dropdown-menu button:hover {
    background: #f8fafc;
    color: var(--primary-color);
}
.chat-item .dropdown-menu button.delete-btn {
    color: #ef4444;
}
.chat-item .dropdown-menu button.delete-btn:hover {
    background: #fef2f2;
}

/* AI Page Professionalism Tweaks */
.sidebar .brand-name {
    font-weight: 500;
    font-size: 1.1rem;
}

.new-chat-btn .btn-text {
    font-weight: 500;
}

.main-area .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-spacer {
    flex: 1;
}

.ai-modal-overlay .modal-close-btn {
    background: transparent;
    color: #94a3b8;
    padding: 4px;
}

.chat-search-modal-body .modal-empty-message {
    text-align: center;
    color: #64748b;
    padding: 30px 20px;
}

.message.loading-msg .content {
    color: var(--ai-text-light);
}

/* AI Page - Empty State Professional & Humble Redesign */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

.empty-state-logo {
    background: #eef2ff; /* Lighter blue background */
    border-radius: 50%;
    padding: 15px;
    margin-bottom: 20px;
    border: 6px solid #ffffff;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.1);
}

.empty-state-logo img {
    width: 48px;
    height: 48px;
    display: block;
}

.empty-state-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.empty-state-subtitle {
    font-size: 1.1rem;
    color: #475569;
    max-width: 550px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.example-prompts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; width: 100%; max-width: 800px; }
.prompt-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 15px; text-align: left; cursor: pointer; transition: all 0.2s ease; }
.prompt-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.07); border-color: var(--primary-color); }
.prompt-card h4 { font-size: 0.95rem; font-weight: 600; color: #334155; margin: 0 0 4px 0; }
.prompt-card p { font-size: 0.9rem; color: #64748b; margin: 0; line-height: 1.5; }

@media (max-width: 768px) {
    .example-prompts {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .empty-state-title { font-size: 1.5rem; }
    .empty-state-subtitle { font-size: 1rem; }
}

/* Official Card Badges (Unified across index.html and official.html) */
.official-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}
.official-card-badge svg {
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
}
.official-card-badge.spotlight-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}
.official-card-badge.spotlight-badge svg {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}
.official-card-badge.editors-choice-badge {
    background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
    color: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.65);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}
.official-card-badge.editors-choice-badge svg {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.7));
}
.official-card-badge.flagship-badge {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

/* Persistent Fixed Floating Request Button */
.fixed-request-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 950;
    pointer-events: auto;
}
.fixed-request-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border: 1px solid rgba(56, 189, 248, 0.45);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}
.fixed-request-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.55);
    border-color: rgba(56, 189, 248, 0.8);
    background: linear-gradient(135deg, #0369a1, #0284c7);
}
.fixed-request-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    animation: requestPulse 2s infinite;
}
@keyframes requestPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(56, 189, 248, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}
@media (max-width: 768px) {
    .fixed-request-container {
        bottom: 74px;
        right: 14px;
    }
    .fixed-request-btn {
        padding: 10px 16px;
        font-size: 0.82rem;
    }
}

/* =========================================================
   LEGACY NATIVE BADGE SUPPRESSION
   Suppresses duplicate internal badges baked into Card_Code
   ========================================================= */
.card-content-limit div[style*="position:absolute"][style*="top:12px"],
.card-content-limit div[style*="position: absolute"][style*="top: 12px"],
.card-content-limit div[style*="position:absolute"][style*="top: 12px"],
.card-content-limit div[style*="position: absolute"][style*="top:12px"],
.card-content-limit [style*="rgba(56,189,248,0.2)"],
.card-content-limit [style*="rgba(56, 189, 248, 0.2)"],
.card-content-limit .tool-native-badge {
    display: none !important;
}

/* =========================================================
   UNIVERSAL TOOL DETAILS MODAL STYLING
   ========================================================= */
.tool-details-overlay {
    z-index: 6000;
    display: none;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.tool-details-container {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    position: relative;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.tool-details-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    z-index: 20;
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    padding: 0;
}

.tool-details-close-btn:hover {
    background: #ffffff;
    transform: scale(1.08);
}

.tool-details-layout {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 90vh;
}

.tool-details-hero {
    width: 100%;
    height: 100%;
    background: #091220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.tool-hero-official-card {
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 24px 20px;
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 30%, #1e3a8a 0%, #0f172a 75%, #070c18 100%);
    overflow: hidden;
}

.tool-hero-logo-wrapper {
    width: 105px;
    height: 105px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(6px);
    transition: transform 0.3s ease;
}

.tool-hero-logo-wrapper:hover {
    transform: scale(1.06);
}

.tool-details-hero img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: scale-down;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.08));
    transition: transform 0.4s ease;
}

.tool-details-hero img:hover {
    transform: scale(1.04);
}

.tool-details-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex: 1;
}

.tool-details-title {
    color: #0f172a;
    margin: 0 0 12px 0;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

/* Owner Row in Modal */
.tool-details-owner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.tool-details-owner-clickable {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-width: 0;
    flex: 1;
    border-radius: 8px;
    padding: 2px 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.tool-details-owner-clickable:hover {
    background: rgba(37, 99, 235, 0.06);
}

.tool-details-owner-clickable:hover .tool-details-owner-name {
    color: #2563eb;
}

.tool-details-owner-clickable:hover .tool-details-owner-photo {
    border-color: #93c5fd;
    transform: scale(1.05);
}

.tool-details-owner-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    image-rendering: -webkit-optimize-contrast;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.tool-details-owner-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tool-details-owner-name-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-details-owner-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.tool-details-owner-sub {
    font-size: 0.76rem;
    color: #475569;
    font-weight: 600;
}

.tool-details-owner-row.is-official {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #bae6fd;
}

/* Follow Button in Modal */
.tool-details-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
    font-family: inherit;
}

.tool-details-follow-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.tool-details-follow-btn.following {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
    box-shadow: 0 1px 3px rgba(46, 125, 50, 0.15);
}

.tool-details-follow-btn.following:hover {
    background: #c8e6c9;
    border-color: #81c784;
    color: #1b5e20;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.25);
}

/* Stats Badges */
.tool-details-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #ffffff;
    color: #475569;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    box-sizing: border-box;
}

.stat-badge-clickable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-family: inherit;
}

.stat-badge-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    border-color: #93c5fd;
    color: #2563eb;
}

.stat-badge-clickable.active {
    background: #eff6ff;
    color: #2563eb;
    border-color: #93c5fd;
}

.stat-badge-clickable.active svg {
    fill: #2563eb;
}

.stat-badge-readonly {
    cursor: default;
    pointer-events: none;
    user-select: none;
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
}

/* About / Desc Box */
.tool-details-desc-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
    flex-grow: 1;
}

.tool-details-desc-title {
    margin: 0 0 8px 0;
    font-size: 0.88rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-details-desc-text {
    color: #334155;
    margin: 0;
    line-height: 1.6;
    font-size: 0.96rem;
}

/* Footer Actions */
.tool-details-footer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 6px;
}

.tool-details-cancel-btn {
    background: transparent;
    color: #64748b;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tool-details-cancel-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.tool-details-open-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.94rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.tool-details-open-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

/* Desktop 2-Column Layout */
@media (min-width: 768px) {
    .tool-details-layout {
        flex-direction: row;
        overflow: hidden;
    }
    .tool-details-hero {
        width: 44%;
        height: auto;
        min-height: 440px;
        padding: 0;
        margin: 0;
        border-right: 1px solid #e2e8f0;
        border-top-left-radius: 20px;
        border-bottom-left-radius: 20px;
        background: #091220;
        display: flex;
        align-items: stretch;
        justify-content: stretch;
        overflow: hidden;
    }
    .tool-details-body {
        width: 56%;
        overflow-y: auto;
        padding: 32px;
        max-height: 85vh;
    }
}

/* Mobile Adjustments: Eliminate bulky / oversized buttons */
@media (max-width: 640px) {
    .tool-details-overlay {
        padding: 10px;
    }
    .tool-details-container {
        border-radius: 16px;
        max-height: 92vh;
        width: 100%;
    }
    .tool-details-close-btn {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        padding: 4px;
    }
    .tool-details-hero {
        width: 100%;
        height: 185px;
        min-height: 185px;
        padding: 0;
        margin: 0;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        border-bottom: 1px solid #e2e8f0;
        overflow: hidden;
        background: #091220;
    }
    .tool-hero-official-card {
        padding: 12px 14px;
    }
    .tool-hero-logo-wrapper {
        width: 72px !important;
        height: 72px !important;
        border-radius: 18px !important;
    }
    .tool-hero-logo-wrapper img {
        width: 50px !important;
        height: 50px !important;
    }
    .tool-hero-title-text {
        font-size: 1.15rem !important;
    }
    .tool-details-body {
        padding: 16px 14px;
    }
    .tool-details-title {
        font-size: 1.25rem;
        margin: 0 0 8px 0;
    }
    .tool-details-owner-row {
        padding: 7px 11px;
        margin-bottom: 12px;
        gap: 8px;
    }
    .tool-details-owner-clickable {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    .tool-details-owner-photo {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }
    .tool-details-owner-meta {
        flex: 1;
        min-width: 0;
    }
    .tool-details-owner-name-wrap {
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
        flex-wrap: nowrap;
    }
    .tool-details-owner-name {
        font-size: 0.88rem;
        max-width: none;
        flex-shrink: 1;
        min-width: 0;
    }
    #toolDetailsOwnerBadge {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
    }
    .tool-details-owner-sub {
        font-size: 0.72rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .tool-details-follow-btn {
        padding: 4px 10px;
        font-size: 0.76rem;
        border-radius: 14px;
        height: 28px;
        gap: 4px;
    }
    .tool-details-stats {
        gap: 6px;
        margin-bottom: 12px;
    }
    .stat-badge {
        padding: 5px 9px;
        font-size: 0.78rem;
        gap: 4px;
        border-radius: 16px;
    }
    .stat-badge svg {
        width: 14px;
        height: 14px;
    }
    .tool-details-desc-box {
        padding: 10px 12px;
        border-radius: 10px;
        margin-bottom: 12px;
    }
    .tool-details-desc-title {
        font-size: 0.78rem;
        margin-bottom: 4px;
    }
    .tool-details-desc-text {
        font-size: 0.85rem;
        line-height: 1.45;
    }
    .tool-details-footer-actions {
        gap: 8px;
        padding-top: 4px;
    }
    .tool-details-cancel-btn {
        padding: 7px 12px;
        font-size: 0.82rem;
        border-radius: 6px;
    }
    .tool-details-open-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        border-radius: 8px;
        gap: 5px;
    }
    .tool-details-open-btn svg {
        width: 15px;
        height: 15px;
    }
}

