:root {
    --bg-color: #0c0d18;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.04);
    --primary: #a855f7;
    --secondary: #22d3ee;
    --text-main: #f8f9fa;
    --text-muted: #94a3b8;
}

body {
    background: var(--bg-color) !important;
    color: var(--text-main) !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(34, 211, 238, 0.08) 0px, transparent 50%) !important;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif !important;
    margin: 0; padding: 0; min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scrolling from overflowing content */
}

/* Global Image Safety */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 0 20px 60px !important;
}

/* Glass Section styles */
.section {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px !important;
    color: #f3f4f6 !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 2rem !important;
}

.section h2, .gradient-text {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    color: #fff !important; /* Base color for icons/emojis */
}

/* The actual gradient effect for text nodes */
.text-gradient {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block; /* Ensure it wraps carefully */
}

.section h2 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
    width: 100%; /* Ensure border is visible */
    display: block; /* Back to block for full-width border */
}

/* Commands items list */
.command {
    background: rgba(255, 255, 255, 0.02) !important;
    border-left: 4px solid #22d3ee !important;
    border-radius: 8px !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    padding: 1.2rem !important;
}

.command:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    transform: translateX(4px) !important;
}

.command-title, .command-name {
    color: #22d3ee !important;
    font-weight: 700 !important;
}

.example, .example-box {
    background: rgba(0, 0, 0, 0.25) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.02) !important;
    color: #e5e7eb !important;
}

code {
    background: #11121d !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #22d3ee !important;
}

.stat-card, .credit-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    color: #fff !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.stat-label, .credit-content, .credit-content a, .command-description {
    color: #cbd5e1 !important;
}

.stat-card:hover, .credit-card:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(34, 211, 238, 0.3) !important;
}

.stat-number {
    color: #a855f7 !important;
}

.back-button, .support-button {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #d1d5db !important;
    border-radius: 20px !important;
}

.back-button:hover, .support-button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.bot-link {
    background: linear-gradient(45deg, #a855f7, #22d3ee) !important;
    color: #0c0d18 !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3) !important;
    border: none !important;
}

.filter-buttons .filter-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #9ca3af !important;
}

.filter-buttons .filter-btn.active {
    background: linear-gradient(45deg, #a855f7, #22d3ee) !important;
    color: #0c0d18 !important;
}

footer {
    background: transparent !important;
    color: #6b7280 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    text-align: center !important;
    padding: 30px 20px !important;
}

.header-logo {
    display: block !important;
    margin: 0 auto 25px !important;
    width: 110px;
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.3));
}

header {
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 5rem 0 !important;
    text-align: center !important;
    position: relative !important;
}

/* Copy Button */
.copy-button {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #e2e8f0 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Back to Top Arrow with Glassmorphism */
.back-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    display: none; /* Managed by JS */
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-5px) !important;
    color: #ffd147 !important;
}

footer p {
    color: #e2e8f0 !important;
    font-size: 0.9rem !important;
}

.disclaimer {
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
    margin: 5px auto !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
}

.fab {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    z-index: 1000 !important;
}

.fab-button {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    font-size: 20px !important;
    transition: all 0.3s ease !important;
}

.fab-button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-5px) !important;
    color: #ffd147 !important;
}

footer a {
    color: #22d3ee !important;
    text-decoration: none !important;
}

footer a:hover {
    text-decoration: underline !important;
}

/* Fix mobile break points for subpages */
@media (max-width: 768px) {
    .hero h1, header h1 {
        font-size: 2.2rem !important;
    }
    .stats-grid {
        grid-template-columns: 1fr !important; /* Stack on very small screens */
        gap: 12px !important;
    }
    .stat-card {
        padding: 15px !important;
    }
    .section, .glass {
        padding: 20px !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
    .footer-content, footer {
        text-align: center !important;
    }
    .header-logo {
        width: 90px !important;
        margin-bottom: 20px !important;
    }
    .container {
        padding: 0 10px 40px !important;
    }
}

/* Readability fixes for Telegram Message box mocks */
.telegram-message {
    background: #11121d !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

.telegram-message * {
    color: inherit !important;
}

.message-content {
    background: #1a1b2b !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
}

/* Card overrides inside Subpages for background white solid removal */
.feature-card, .action-button, .action-card, .stats-counter {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

.feature-card h3, .stat-card h3, .action-button .text {
    color: #fff !important;
}

.feature-card p, .stat-card p, .action-button .tooltip-text {
    color: #9ca3af !important;
}

.feature-action, .usage-example, .command-details {
    background: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #e5e7eb !important;
}

.action-button:hover, .stat-card:hover, .feature-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* Custom Scrollbar for Subpages */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0c0d18;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(#a855f7, #22d3ee);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(#22d3ee, #a855f7);
}

/* Scroll Progress Top Bar for Subpages */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #a855f7, #22d3ee) !important;
    z-index: 10000;
    transform: none !important;
}

/* Unified back button style for Subpages */
.back-button {
    position: absolute !important;
    left: 30px !important;
    top: 30px !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    z-index: 100 !important;
}

.back-button:hover {
    color: var(--text-main) !important;
    background: rgba(34, 211, 238, 0.05) !important;
    transform: scale(1.02) !important;
    border-color: var(--secondary) !important;
}

/* Unified footer style for Subpages */
footer {
    background: rgba(255, 255, 255, 0.01) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
    padding: 25px 0 !important;
    margin-top: 50px !important;
    color: #94a3b8 !important;
}

footer a {
    color: #fff !important;
}

/* Restored list padding */
.section ol, .section ul {
    padding-left: 25px !important;
}

/* Interactive Accordion FAQ */
.faq-accordion {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    padding: 12px 15px !important;
    transition: all 0.3s ease !important;
}

.faq-accordion:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.faq-accordion summary {
    cursor: pointer !important;
    font-weight: 500 !important;
    color: #e2e8f0 !important;
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    outline: none !important;
}

.faq-accordion summary::-webkit-details-marker {
    display: none !important;
}

.faq-accordion summary::after {
    content: "▼" !important;
    font-size: 0.8rem !important;
    color: #fe2c55 !important;
    transition: transform 0.3s ease !important;
}

.faq-accordion[open] summary::after {
    transform: rotate(-180deg) !important;
}

.faq-content {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #94a3b8 !important;
    line-height: 1.5 !important;
}

/* --- Phase 3: Global Utility Classes for Clean HTML --- */
.back-button-top {
    position: absolute;
    left: 20px;
    top: 20px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 100;
}

.back-button-top span {
    font-size: 20px;
}

.info-banner-red {
    background: rgba(254, 44, 85, 0.1);
    border-left: 3px solid #fe2c55;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-banner-red .icon {
    font-size: 2rem;
}

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

.hero-title-large {
    font-size: 2.8rem;
    margin: 0 auto;
    text-align: center;
}

.hero-subtitle-muted {
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
}

.highlight-red {
    color: #fe2c55;
    text-decoration: none;
    font-weight: bold;
}

.highlight-red:hover {
    text-decoration: underline;
}


/* Documentation Navigation Buttons */
.doc-navigation {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.nav-btn {
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.nav-btn:hover {
    background: rgba(168, 85, 247, 0.15) !important;
    border-color: #a855f7 !important;
    transform: translateY(-2px) !important;
}

.nav-btn.next {
    background: rgba(34, 211, 238, 0.1) !important;
    border-color: rgba(34, 211, 238, 0.2) !important;
}

.nav-btn.next:hover {
    background: rgba(34, 211, 238, 0.2) !important;
    border-color: #22d3ee !important;
}

/* Documentation Components */
.highlight { 
    color: var(--secondary); 
    font-weight: 600; 
}

pre { 
    background: rgba(0,0,0,0.3); 
    padding: 20px; 
    border-radius: 12px; 
    color: var(--secondary); 
    overflow-x: auto; 
    border: 1px solid var(--glass-border); 
    font-size: 0.85rem; 
    line-height: 1.5; 
    margin-top: 15px;
}

.doc-img, .stat-img, .wizard-img, .proxy-img, .group-img, .data-img, .config-img, .cli-img, .step-img, .responsive-img, .feature-img { 
    width: 100%; 
    height: auto;
    border-radius: 16px; 
    margin-top: 20px; 
    border: 1px solid var(--glass-border); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    background: rgba(255,255,255,0.02); 
    display: block;
}

/* Optional fixed ratio for specific cards if needed elsewhere, 
   but for general docs, height:auto is safer */
.ratio-16-10 {
    aspect-ratio: 16/10;
    object-fit: cover;
}

/* Changelog & Versioning */
.version-tag {
    background: rgba(168, 85, 247, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 800;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.log-item { 
    border-left: 3px solid var(--primary); 
    padding-left: 20px; 
    margin-bottom: 30px; 
    position: relative; 
}

.log-item::before { 
    content: ''; 
    position: absolute; 
    left: -8px; 
    top: 0; 
    width: 13px; 
    height: 13px; 
    border-radius: 50%; 
    background: var(--secondary); 
    border: 3px solid var(--bg-color); 
}

.log-date { 
    font-weight: 800; 
    color: var(--secondary); 
    font-size: 0.9rem; 
    margin-bottom: 5px; 
    display: block; 
}

.log-title { 
    font-weight: 600; 
    font-size: 1.2rem; 
    margin-bottom: 10px; 
    color: var(--text-main); 
}

.log-content { 
    color: var(--text-muted); 
    font-size: 0.95rem; 
}


/* --- Phase 4: Cyber Dossier Operative Upgrades (v46) --- */
.glitch-title {
    position: relative;
    text-shadow: 0.05em 0 0 rgba(168, 85, 247, 0.75),
                 -0.025em -0.05em 0 rgba(34, 211, 238, 0.75),
                 0.025em 0.05em 0 rgba(254, 44, 85, 0.75);
    animation: glitch 500ms infinite;
}

@keyframes glitch {
    0% { text-shadow: 0.05em 0 0 rgba(168, 85, 247, 0.75), -0.025em -0.05em 0 rgba(34, 211, 238, 0.75), 0.025em 0.05em 0 rgba(254, 44, 85, 0.75); }
    14% { text-shadow: 0.05em 0 0 rgba(168, 85, 247, 0.75), -0.025em -0.05em 0 rgba(34, 211, 238, 0.75), 0.025em 0.05em 0 rgba(254, 44, 85, 0.75); }
    15% { text-shadow: -0.05em -0.025em 0 rgba(168, 85, 247, 0.75), 0.025em 0.025em 0 rgba(34, 211, 238, 0.75), -0.05em -0.05em 0 rgba(254, 44, 85, 0.75); }
    49% { text-shadow: -0.05em -0.025em 0 rgba(168, 85, 247, 0.75), 0.025em 0.025em 0 rgba(34, 211, 238, 0.75), -0.05em -0.05em 0 rgba(254, 44, 85, 0.75); }
    50% { text-shadow: 0.025em 0.05em 0 rgba(168, 85, 247, 0.75), 0.05em 0 0 rgba(34, 211, 238, 0.75), 0.05em -0.025em 0 rgba(254, 44, 85, 0.75); }
    99% { text-shadow: 0.025em 0.05em 0 rgba(168, 85, 247, 0.75), 0.05em 0 0 rgba(34, 211, 238, 0.75), 0.05em -0.025em 0 rgba(254, 44, 85, 0.75); }
    100% { text-shadow: -0.025em 0 0 rgba(168, 85, 247, 0.75), -0.025em -0.025em 0 rgba(34, 211, 238, 0.75), -0.025em -0.05em 0 rgba(254, 44, 85, 0.75); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Overrides */
.section, .glass, .stat-card, .command {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Operative Font Override */
.section h2, .glitch-title, header h1 {
    font-family: ''Courier New'', Courier, monospace !important;
    letter-spacing: 2px;
}
