:root {
    --bg-main: #02050a;
    --bg-card: rgba(4, 9, 20, 0.75);
    --border-card: rgba(0, 240, 255, 0.08);
    --cyan: #00f0ff;
    --cyan-glow: rgba(0, 240, 255, 0.2);
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.2);
    --primary: var(--cyan);
    --primary-glow: var(--cyan-glow);
    --accent-red: #ff003c;
    --accent-red-glow: rgba(255, 0, 60, 0.25);
    --text-white: #ffffff;
    --text-main: #cbd5e1;
    --text-muted: #64748b;
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 4px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 50% 0px, rgba(0, 240, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 0px 50%, rgba(255, 215, 0, 0.03) 0px, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.003) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.003) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background Canvas */
#cyber-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Animated Kali Dragon Watermark Background */
.dragon-watermark-wrap {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vw;
    max-width: 700px;
    height: auto;
    z-index: -2;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.kali-dragon-svg {
    width: 100%;
    height: 100%;
    animation: dragonGlow 12s ease-in-out infinite;
}

@keyframes dragonGlow {
    0%, 100% {
        opacity: 0.12;
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.15));
    }
    50% {
        opacity: 0.28;
        transform: scale(1.04) rotate(1deg);
        filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.35)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.1));
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Luxury Header */
.luxury-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 48px;
    background: rgba(2, 5, 10, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    color: var(--cyan);
    filter: drop-shadow(0 0 10px var(--cyan-glow));
}

.logo-text {
    font-size: 22px;
    font-weight: 950;
    letter-spacing: 2px;
    color: var(--text-white);
}

.gold-text {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold-glow);
}

.back-dashboard-btn {
    text-decoration: none;
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.back-dashboard-btn:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
}

.hero-container {
    max-width: 950px;
    z-index: 10;
    width: 100%;
}

.badge-hud {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--cyan);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.05);
}

.hud-dot {
    width: 6px;
    height: 6px;
    background-color: var(--cyan);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 28px;
    color: var(--text-white);
    text-transform: uppercase;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gold) 0%, #00f0ff 60%, #0080ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(0, 240, 255, 0.15));
}

.hero-subtitle {
    font-size: 19px;
    color: var(--text-main);
    max-width: 760px;
    margin: 0 auto 48px auto;
    font-weight: 400;
    line-height: 1.7;
}

/* Stats Panel */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 24px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.stat-box:hover {
    border-color: rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.05);
}

.stat-val {
    font-size: 34px;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 12px var(--gold-glow);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Sections */
.section {
    padding: 80px 0;
    position: relative;
}

.light-bg {
    background: rgba(4, 9, 20, 0.4);
    border-top: 1px solid var(--border-card);
    border-bottom: 1px solid var(--border-card);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-white);
    text-transform: uppercase;
}

.section-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Methodology Grid */
.methodology-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.methodology-text-block h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
}

.methodology-text-block > p {
    color: var(--text-main);
    margin-bottom: 30px;
}

.methodology-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.methodology-list li {
    display: flex;
    gap: 16px;
}

.list-arrow {
    color: var(--gold);
    font-size: 14px;
    margin-top: 5px;
}

.methodology-list li strong {
    color: var(--text-white);
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

.methodology-list li p {
    font-size: 14px;
    color: var(--text-main);
}

/* HUD Monitor Box */
.hud-monitor-box {
    background: #03060a;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 240, 255, 0.03);
    font-family: var(--font-mono);
    transition: var(--transition-smooth);
    max-width: 100%;
}

.hud-monitor-box:hover {
    border-color: var(--cyan);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 35px rgba(0, 240, 255, 0.15);
}

.hud-header {
    background: #060c14;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.hud-dot.green { background: #22c55e; }
.hud-dot.yellow { background: #eab308; }
.hud-dot.red { background: #ff003c; }

.hud-title {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-left: 8px;
}

.hud-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 250px;
    background-image: linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.hud-line {
    font-size: 12px;
    color: #00f0ff;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap; /* Wrap long lines on mobile screens */
}

.hud-time {
    color: #475569;
    font-weight: 500;
}

.blink-line {
    color: var(--gold);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Directory Container & Tree */
.directory-container {
    background: #03060a;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    max-width: 100%;
}

.directory-tree-header {
    background: #060c14;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    padding: 16px 24px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.directory-tree-body {
    padding: 24px;
    overflow-x: auto;
    background: #020408;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.directory-tree-body code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.6;
    white-space: pre;
}

.tree-folder {
    color: #38bdf8; /* Light blue */
    font-weight: 700;
}

.tree-file {
    color: var(--text-white);
    font-weight: 500;
}

.tree-comment {
    color: #475569; /* Gray comment */
}

/* Pipeline Flow Layout */
.pipeline-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 30px;
    position: relative;
}

.pipeline-step {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.pipeline-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.04), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: -1;
}

.pipeline-step:hover::before {
    opacity: 1;
}

.pipeline-step:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
    transform: translateY(-3px);
}

.step-number {
    font-size: 48px;
    font-weight: 900;
    color: var(--gold);
    font-family: var(--font-mono);
    line-height: 1;
    opacity: 0.15;
    transition: var(--transition-smooth);
}

.pipeline-step:hover .step-number {
    opacity: 0.8;
    text-shadow: 0 0 15px var(--gold-glow);
}

.step-content h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.6;
}

/* Interactive API Explorer Layout */
.explorer-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    margin-top: 30px;
    min-width: 0; /* Let grid columns shrink below initial auto width */
}

.explorer-tabs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 16px 20px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-smooth);
    width: 100%;
}

.tab-btn i {
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    background: rgba(0, 240, 255, 0.04);
    border-color: rgba(0, 240, 255, 0.2);
    color: var(--text-white);
}

.tab-btn:hover i {
    color: var(--cyan);
}

.tab-btn.active {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.tab-btn.active i {
    color: var(--cyan);
    filter: drop-shadow(0 0 5px var(--cyan-glow));
}

.explorer-content {
    background: #03070d;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    min-height: 500px;
    min-width: 0; /* Let pane content shrink to prevent overflowing the wrapper */
}

.tab-pane {
    display: none;
    flex-direction: column;
    gap: 28px;
    animation: fadeIn 0.4s ease;
    min-width: 0;
}

.tab-pane.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 18px;
    width: 100%;
}

.pane-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
}

.http-method {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.http-method.get {
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.http-method.post {
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.05);
}

.pane-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-main);
}

.doc-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

.doc-section h5 {
    font-size: 13px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.code-box {
    background: #070e17;
    border: 1px solid var(--border-card);
    padding: 16px 20px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: #00f0ff;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.code-block {
    background: #070e17;
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    max-height: 320px;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #38bdf8;
    line-height: 1.5;
    white-space: pre;
}

.integration-text {
    font-size: 14px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.01);
    border-left: 3px solid var(--cyan);
    padding: 12px 18px;
    border-radius: 0 8px 8px 0;
}

/* Strength Cards Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Reduced min bounds to prevent mobile overflow */
    gap: 28px;
}

.strength-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 36px;
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.strength-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.05);
}

.strength-icon {
    font-size: 28px;
    color: var(--cyan);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.strength-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 12px;
}

.strength-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer */
.luxury-footer {
    border-top: 1px solid var(--border-card);
    background: #010204;
    padding: 32px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Global media element resets to prevent any child overflow */
pre, code, blockquote, iframe, img, svg {
    max-width: 100%;
}

/* Responsive Queries */
@media (max-width: 1024px) {
    .explorer-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .explorer-tabs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 4px 12px 4px;
        gap: 10px;
        scrollbar-width: thin;
        scrollbar-color: var(--cyan) rgba(255, 255, 255, 0.02);
    }
    
    .explorer-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .explorer-tabs::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.02);
        border-radius: 4px;
    }
    
    .explorer-tabs::-webkit-scrollbar-thumb {
        background: var(--cyan);
        border-radius: 4px;
    }

    .tab-btn {
        white-space: nowrap;
        width: max-content;
        padding: 12px 18px;
        font-size: 13px;
        display: inline-flex;
    }
    
    .methodology-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    body {
        background-size: 100% 100%, 100% 100%, 25px 25px, 25px 25px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .luxury-header {
        padding: 15px 20px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .back-dashboard-btn {
        padding: 8px 16px;
        font-size: 11px;
    }
    
    .hero-section {
        padding: 60px 16px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 30px;
        letter-spacing: -1px;
    }
    
    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .explorer-content {
        padding: 20px;
        min-height: auto;
    }
    
    .pane-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .pane-title {
        font-size: 18px;
    }
    
    .doc-section h5 {
        font-size: 11px;
    }
    
    .code-block, .code-box, .directory-tree-body {
        padding: 14px;
    }
    
    .code-block code, .code-box, .directory-tree-body code {
        font-size: 11px;
    }
    
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 24px;
    }
    
    .stat-box {
        padding: 12px 8px; /* Reduced padding for mobile space */
    }
    
    .stat-val {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 9px;
        letter-spacing: 1px;
    }
    
    .strength-card {
        padding: 24px;
    }
    
    .strength-title {
        font-size: 16px;
    }
    
    .strength-desc {
        font-size: 13px;
    }
    
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px;
    }
    
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-box {
        padding: 12px 6px;
    }
    
    .stat-val {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 8px;
    }
}
