@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
    --bg-main: #0a0b16;
    --bg-card: rgba(22, 25, 48, 0.45);
    --bg-card-hover: rgba(28, 32, 60, 0.6);
    --border-color: rgba(139, 92, 246, 0.15);
    --border-hover: rgba(245, 158, 11, 0.3);
    
    /* Neon Palettes */
    --color-violet: #8b5cf6;
    --color-violet-glow: rgba(139, 92, 246, 0.4);
    --color-yellow: #f59e0b;
    --color-yellow-glow: rgba(245, 158, 11, 0.4);
    --color-cyan: #06b6d4;
    --color-green: #10b981;
    --color-red: #ef4444;
    
    /* Typography Colors */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Layout */
    --sidebar-width: 280px;
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: var(--color-violet) var(--bg-main);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.06) 0%, transparent 45%);
    background-attachment: fixed;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-violet);
}

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    position: relative;
}

/* ==========================================
   SIDEBAR (NAVIGATION)
   ========================================== */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 11, 22, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    padding: 0 0.5rem;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--color-violet-glow));
    animation: rotateLogo 8s linear infinite;
}

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

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #fff 30%, var(--color-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    width: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    cursor: pointer;
}

.nav-link i {
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active .nav-link {
    color: #fff;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid var(--border-color);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 12px rgba(139, 92, 246, 0.1);
}

.nav-item.active .nav-link i {
    color: var(--color-yellow);
    filter: drop-shadow(0 0 5px var(--color-yellow-glow));
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-footer-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    padding: 3rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1400px;
    position: relative;
}

/* Header styling */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.welcome-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.title-badge {
    align-self: flex-start;
    padding: 0.35rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--color-yellow);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 40%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* ==========================================
   TAB CONTENT STRUCTURE
   ========================================== */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

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

/* ==========================================
   NANO BANANA FLOAT BANNER
   ========================================== */
.nano-tip-box {
    background: linear-gradient(135deg, rgba(22, 25, 48, 0.6) 0%, rgba(15, 12, 30, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nano-tip-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-yellow), var(--color-violet));
}

.nano-mascot-container {
    flex-shrink: 0;
    position: relative;
}

.nano-mascot {
    width: 90px;
    height: 90px;
    object-fit: contain;
    animation: floatMascot 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.25));
}

@keyframes floatMascot {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.nano-tip-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nano-tip-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-yellow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nano-tip-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================
   GRID CARDS & FEATURES
   ========================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 0 15px rgba(245, 158, 11, 0.05);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--color-yellow);
    transform: scale(1.05);
}

.feature-icon-wrapper i {
    font-size: 1.5rem;
    color: var(--color-violet);
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper i {
    color: var(--color-yellow);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================
   GUIDE STEPS (TIMELINE STYLE)
   ========================================== */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    backdrop-filter: blur(10px);
}

.step-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-num-badge {
    align-self: flex-start;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--color-violet) 0%, rgba(245, 158, 11, 0.8) 100%);
    color: #fff;
    font-weight: 800;
    border-radius: 50px;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.step-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.step-meta-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.step-meta-item {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
}

.step-meta-item i {
    position: absolute;
    left: 0;
    top: 0.25rem;
    color: var(--color-cyan);
}

.step-media {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    cursor: zoom-in;
    transition: var(--transition-smooth);
}

.step-media:hover {
    transform: scale(1.02);
    border-color: rgba(245, 158, 11, 0.4);
}

.step-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.step-media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 22, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.step-media:hover .step-media-overlay {
    opacity: 1;
}

.step-media-overlay i {
    font-size: 2rem;
    color: #fff;
    transform: scale(0.8);
    transition: var(--transition-smooth);
}

.step-media:hover .step-media-overlay i {
    transform: scale(1);
}

/* Reverse steps */
.step-card.reverse {
    grid-template-columns: 1fr 1fr;
}
.step-card.reverse .step-info {
    order: 2;
}
.step-card.reverse .step-media {
    order: 1;
}

/* ==========================================
   CODE BLOCKS & COPY BUTTON
   ========================================== */
.code-container {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1rem;
}

.code-header {
    background: rgba(15, 18, 36, 0.9);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-lang-tag {
    font-family: monospace;
    font-weight: 700;
    color: var(--color-cyan);
    text-transform: uppercase;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.copy-btn:hover {
    color: var(--color-yellow);
}

.code-content {
    background: rgba(10, 12, 24, 0.95);
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #a78bfa;
}

/* ==========================================
   INTERACTIVE SIMULATOR (PostgreSQL Pooler)
   ========================================== */
.simulator-box {
    background: rgba(22, 25, 48, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sim-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sim-title i {
    color: var(--color-yellow);
}

.sim-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.sim-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.sim-input {
    background: rgba(10, 11, 22, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.9rem 1.25rem;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.sim-input:focus {
    border-color: var(--color-yellow);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.sim-output {
    margin-top: 1rem;
    background: rgba(10, 12, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    position: relative;
}

.sim-output-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.sim-output-string {
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--color-yellow);
    word-break: break-all;
    line-height: 1.5;
}

/* ==========================================
   LIGHTBOX (IMAGE ZOOM EFFECT)
   ========================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 6, 12, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition-smooth);
}

.lightbox-close:hover {
    background: var(--color-red);
    border-color: var(--color-red);
    transform: rotate(90deg);
}

/* ==========================================
   RESPONSIVENESS (MOBILE/TABLET)
   ========================================== */
@media (max-width: 1024px) {
    .step-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    .step-card.reverse {
        grid-template-columns: 1fr;
    }
    .step-card.reverse .step-info {
        order: 1;
    }
    .step-card.reverse .step-media {
        order: 2;
    }
    .sim-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .brand-container {
        margin-bottom: 1.5rem;
        justify-content: center;
    }
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        justify-content: start;
        gap: 0.5rem;
    }
    .nav-link {
        padding: 0.75rem 1rem;
        white-space: nowrap;
        font-size: 0.9rem;
    }
    .sidebar-footer {
        display: none;
    }
    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }
    .main-title {
        font-size: 2rem;
    }
    .nano-tip-box {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
}
