/* ============================================
   PropTechUSA.ai - Global Styles
   Premium Edition with Theme Support
   ============================================ */

/* Variables - Dark Theme (Default) */
:root {
    /* Backgrounds */
    --bg-primary: #030305;
    --bg-card: #0a0a0f;
    --bg-elevated: #111118;
    
    /* Text */
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    /* Accent Colors */
    --accent: #10b981;
    --accent-bright: #34d399;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    
    /* Effects */
    --glow: rgba(16, 185, 129, 0.5);
    --glow-cyan: rgba(6, 182, 212, 0.5);
    
    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(16, 185, 129, 0.3);
    
    /* Spacing */
    --header-height: 70px;
    --container-max: 1200px;
    --container-narrow: 800px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
}

/* Theme Transition */
html {
    transition: background 0.4s ease, color 0.4s ease;
}

body, .header, .card, .btn, .nav-link, .terminal, .footer, 
.feature-card, .pricing-card, .form-group input, .form-group select, 
.form-group textarea, .contact-form-card {
    transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Light theme specific overrides */
[data-theme="light"] .grid-bg {
    opacity: 0.3;
}

[data-theme="light"] .orb {
    opacity: 0.15;
}

[data-theme="light"] .terminal {
    background: #1e293b;
    color: #e2e8f0;
}

[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, #059669, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ============================================
   Live Status Bar (Tech Flex)
   ============================================ */
.live-status-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    z-index: 999;
    overflow-x: auto;
}

[data-theme="light"] .live-status-bar {
    background: rgba(255, 255, 255, 0.9);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
}

.status-item:nth-child(1) { animation-delay: 0.1s; }
.status-item:nth-child(2) { animation-delay: 0.2s; }
.status-item:nth-child(3) { animation-delay: 0.3s; }
.status-item:nth-child(4) { animation-delay: 0.4s; }
.status-item:nth-child(5) { animation-delay: 0.5s; }

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

.status-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    color: var(--text-primary);
    font-weight: 500;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.status-dot-live {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

.status-value .positive {
    color: var(--accent);
    font-size: 10px;
}

.status-value .negative {
    color: var(--accent-red);
    font-size: 10px;
}

/* Adjust body padding when status bar is present */
body.has-status-bar {
    padding-top: calc(var(--header-height) + 36px);
}

body.has-status-bar .header {
    top: 0;
}

/* ============================================
   Theme Toggle (Floating)
   ============================================ */
.theme-toggle-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.theme-toggle-btn.active {
    background: var(--accent);
    color: white;
}

/* ============================================
   Logo Image
   ============================================ */
.logo-img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.3));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.5));
}

/* ============================================
   Mobile Responsive - Status Bar
   ============================================ */
@media (max-width: 768px) {
    .live-status-bar {
        justify-content: flex-start;
        padding: 0 16px;
        gap: 20px;
    }
    
    .status-item:nth-child(n+4) {
        display: none;
    }
    
    .theme-toggle-float {
        bottom: 16px;
        left: 16px;
    }
}


/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ============================================
   Typography
   ============================================ */
.mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.container-narrow {
    max-width: var(--container-narrow);
}

/* ============================================
   Background Effects
   ============================================ */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black, transparent);
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    animation: float-orb 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: -200px;
    left: -150px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    bottom: -100px;
    right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.2;
}

.orb-center {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-orb 8s ease-in-out infinite;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

@keyframes pulse-orb {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.1); }
}

/* Data Stream Particles */
.data-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.data-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: stream-down 8s linear infinite;
}

@keyframes stream-down {
    0% { transform: translateY(-10px); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: rgba(3, 3, 5, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #000;
    position: relative;
}

.logo-mark::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    border-radius: 12px;
    z-index: -1;
    opacity: 0.4;
    filter: blur(8px);
}

.logo-text {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--accent);
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

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

.nav-link.active {
    color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
}

.nav-cta {
    margin-left: 16px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.btn-sm {
    padding: 10px 18px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-glow {
    background: var(--accent);
    color: #000;
    position: relative;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    border-radius: 8px;
    filter: blur(12px);
    opacity: 0.5;
    z-index: -1;
    transition: opacity var(--transition-normal);
}

.btn-glow:hover::before {
    opacity: 0.8;
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.05);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
}

.card-glow:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Section Styling
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
}

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

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
}

.section-title {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    padding: 160px 0 80px;
    text-align: center;
}

.page-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* ============================================
   Gradient Text
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan), var(--accent-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   Terminal / Code Blocks
   ============================================ */
.terminal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.terminal-bar {
    background: var(--bg-elevated);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #eab308; }
.terminal-dot.green { background: #22c55e; }

.terminal-title {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
}

/* Syntax Highlighting */
.code-comment { color: var(--text-muted); }
.code-keyword { color: var(--accent-purple); }
.code-string { color: var(--accent); }
.code-func { color: var(--accent-cyan); }
.code-number { color: var(--accent-orange); }
.code-prompt { color: var(--accent); }

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-live {
    background: var(--accent);
    color: #000;
}

.badge-npm {
    background: #cb3837;
    color: white;
}

.badge-beta {
    background: var(--accent-purple);
    color: white;
}

.badge-new {
    background: var(--accent-cyan);
    color: #000;
}

/* ============================================
   Status Indicator
   ============================================ */
.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
    box-shadow: 0 0 10px var(--glow);
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    position: relative;
    z-index: 10;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: var(--text-muted);
    font-size: 13px;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent);
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ============================================
   Animations
   ============================================ */
.fade-up {
    animation: fadeUp 0.5s ease forwards;
}

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

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent);
    margin-left: 4px;
    animation: blink-cursor 1s step-end infinite;
    vertical-align: text-bottom;
}

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

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   AI Chatbot Widget
   ============================================ */
.chatbot-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

.chatbot-toggle-icon,
.chatbot-toggle-close {
    font-size: 24px;
    transition: all 0.3s ease;
}

.chatbot-toggle-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
    font-size: 32px;
    color: white;
}

.chatbot-widget.open .chatbot-toggle-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.chatbot-widget.open .chatbot-toggle-close {
    opacity: 1;
    transform: rotate(0);
}

.chatbot-notification {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--accent-red);
    border-radius: 50%;
    font-size: 11px;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 520px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chatbot-widget.open .chatbot-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chatbot-avatar img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.chatbot-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chatbot-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.chatbot-status {
    font-size: 12px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-status .status-dot {
    width: 6px;
    height: 6px;
}

.chatbot-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.chatbot-close:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    max-width: 85%;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.bot {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.bot .message-content {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    animation: typingBounce 1.4s infinite;
    font-weight: bold;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.chatbot-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    background: var(--bg-card);
}

.chatbot-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input-area input:focus {
    border-color: var(--accent);
}

.chatbot-input-area button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-input-area button:hover {
    transform: scale(1.05);
}

.chatbot-powered {
    padding: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ============================================
   Tech Stack Infrastructure Bar
   ============================================ */
.tech-stack-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    z-index: 100;
}

.tech-stack-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.tech-stack-label {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    letter-spacing: 1px;
    flex-shrink: 0;
}

.tech-stack-items {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tech-stack-items::-webkit-scrollbar {
    display: none;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tech-item:hover {
    border-color: var(--accent);
    background: rgba(16, 185, 129, 0.05);
}

.tech-icon {
    font-size: 14px;
}

.tech-name {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

.tech-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

.tech-status.online {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Light theme tech stack */
[data-theme="light"] .tech-stack-bar {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .tech-item {
    background: rgba(0, 0, 0, 0.03);
}

/* Adjust body for tech stack bar */
body {
    padding-bottom: 50px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .section-title { font-size: 36px; }
    .page-title { font-size: 40px; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .section { padding: 80px 0; }
    .section-title { font-size: 32px; }
    .page-header { padding: 120px 0 60px; }
    .page-title { font-size: 32px; }
    .footer-inner { 
        flex-direction: column; 
        gap: 20px; 
        text-align: center; 
    }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .section-title { font-size: 28px; }
    .page-title { font-size: 28px; }
    .btn { width: 100%; }
    
    .chatbot-widget {
        bottom: 60px;
        right: 16px;
    }
    
    .chatbot-window {
        width: calc(100vw - 32px);
        height: 450px;
        right: -8px;
    }
    
    .tech-stack-items {
        gap: 12px;
    }
    
    .tech-item {
        padding: 4px 8px;
    }
    
    .tech-name {
        font-size: 10px;
    }
}
