/* ==========================================
   Moodify Wiki - Professional Styles
   ========================================== */

/* CSS Variables for Theming */
:root {
    /* Light Theme */
    --primary-color: #1DB954;
    --secondary-color: #191414;
    --accent-color: #61DAFB;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-dark: #191414;
    
    --text-primary: #191414;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-dark: #010409;
    
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    
    --border-color: #30363d;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Ensure progress bar is visible in dark mode */
[data-theme="dark"] .progress-container {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .progress-bar {
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.8);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

/* Progress Bar */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(128, 128, 128, 0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-name {
    color: var(--text-primary);
}

.logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--primary-color);
}

[data-theme="dark"] .nav-links a {
    color: white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.25rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--bg-tertiary);
}

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1203px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 73px);
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        width: 100%;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    bottom: -200px;
    right: -200px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: #9B59B6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(29, 185, 84, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
    backdrop-filter: blur(10px);
}

.badge-icon {
    font-size: 1.25rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.1s both;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), #9B59B6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

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

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white !important;
    box-shadow: var(--shadow-md);
    text-decoration: none !important;
}

.btn-primary:hover {
    background: #1ed760;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white !important;
    text-decoration: none !important;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: white !important;
    border: 2px solid var(--border-color);
    text-decoration: none !important;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    color: white !important;
    text-decoration: none !important;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.github-icon {
    width: 20px;
    height: 20px;
}

.hero-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.feature-pill:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pill-icon {
    font-size: 1rem;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.visual-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
}

.emotion-circle {
    position: relative;
    width: 100%;
    height: 100%;
    animation: gentleRotate 4s ease-in-out infinite;
}

@keyframes gentleRotate {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.emotion-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: rotate(var(--rotation)) translate(180px) rotate(calc(-1 * var(--rotation)));
}

.emotion-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: floatCard 3s ease-in-out infinite;
    backdrop-filter: blur(10px);
    min-width: 100px;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.happy-card { border-color: #FFD700; animation-delay: 0s; }
.sad-card { border-color: #4A90E2; animation-delay: 0.75s; }
.angry-card { border-color: #E74C3C; animation-delay: 1.5s; }
.surprise-card { border-color: #9B59B6; animation-delay: 2.25s; }

.emotion-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.emotion-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(29, 185, 84, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.logo-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    animation: pulseBorder 2s ease-out infinite;
}

@keyframes pulseBorder {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    z-index: 1;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .visual-container {
        max-width: 400px;
    }
    
    .emotion-item {
        transform: rotate(var(--rotation)) translate(140px) rotate(calc(-1 * var(--rotation)));
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .visual-container {
        max-width: 300px;
    }
    
    .emotion-item {
        transform: rotate(var(--rotation)) translate(100px) rotate(calc(-1 * var(--rotation)));
    }
    
    .emotion-card {
        padding: 1rem;
        min-width: 80px;
    }
    
    .emotion-icon {
        font-size: 2rem;
    }
    
    .center-logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.overview-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-banner {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border: 2px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Architecture Tabs */
.architecture-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.diagram-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

#overview-tab .mermaid svg text,
#overview-tab .mermaid svg tspan,
#overview-tab .mermaid .label,
#overview-tab .mermaid .nodeLabel,
#overview-tab .mermaid .edgeLabel,
#overview-tab .mermaid .cluster-label,
#overview-tab .mermaid .titleText {
    color: #000000 !important;
    fill: #000000 !important;
}

/* Deployment Diagram Styles */
.deployment-diagram {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
}

.diagram-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
}

.layer-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.diagram-node {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 200px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.diagram-node:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.node-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.node-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.node-detail {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
}

.diagram-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.diagram-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
}

.connector-line {
    width: 2px;
    height: 40px;
    background: var(--border-color);
}

.connector-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: -10px;
}

/* Node Type Specific Colors */
.nginx-node {
    border-color: #009639;
    background: linear-gradient(135deg, rgba(0, 150, 57, 0.1), rgba(0, 150, 57, 0.05));
}

.frontend-node {
    border-color: #61DAFB;
    background: linear-gradient(135deg, rgba(97, 218, 251, 0.1), rgba(97, 218, 251, 0.05));
}

.backend-node {
    border-color: #092E20;
    background: linear-gradient(135deg, rgba(9, 46, 32, 0.1), rgba(9, 46, 32, 0.05));
}

.aiml-node {
    border-color: #FF6F00;
    background: linear-gradient(135deg, rgba(255, 111, 0, 0.1), rgba(255, 111, 0, 0.05));
}

.mongodb-node {
    border-color: #47A248;
    background: linear-gradient(135deg, rgba(71, 162, 72, 0.1), rgba(71, 162, 72, 0.05));
}

.redis-node {
    border-color: #DC382D;
    background: linear-gradient(135deg, rgba(220, 56, 45, 0.1), rgba(220, 56, 45, 0.05));
}

/* Security Diagram Styles */
.security-diagram {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
}

.security-layer {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-md);
}

.security-layer-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.layer-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.125rem;
}

.security-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.security-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition);
}

.security-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.security-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.security-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.security-arrow {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Layer Specific Colors */
.perimeter-layer {
    border-color: #E74C3C;
}

.perimeter-layer .security-layer-title {
    color: #E74C3C;
}

.perimeter-layer .layer-number {
    background: #E74C3C;
}

.application-layer {
    border-color: #3498DB;
}

.application-layer .security-layer-title {
    color: #3498DB;
}

.application-layer .layer-number {
    background: #3498DB;
}

.data-layer {
    border-color: #2ECC71;
}

.data-layer .security-layer-title {
    color: #2ECC71;
}

.data-layer .layer-number {
    background: #2ECC71;
}

/* Responsive Design */
@media (max-width: 768px) {
    .deployment-diagram,
    .security-diagram {
        padding: 1.5rem;
    }
    
    .diagram-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .diagram-node {
        width: 100%;
    }
    
    .security-items {
        grid-template-columns: 1fr;
    }
}

.architecture-description {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.architecture-description ul,
.architecture-description ol {
    margin-left: 1.5rem;
}

.architecture-description li {
    margin-bottom: 0.75rem;
}

/* Technology Stack */
.tech-categories {
    display: grid;
    gap: 3rem;
}

.tech-category {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.tech-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.tech-icon {
    font-size: 2rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.tech-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-item img {
    width: 100%;
    max-width: 140px;
    height: auto;
    transition: var(--transition);
}

.tech-item:hover img {
    transform: scale(1.08);
}

/* Deployment Grid */
.deployment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.deployment-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.deployment-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.deployment-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.deployment-features {
    list-style: none;
    margin-top: 1.5rem;
}

.deployment-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Monitoring Section */
.monitoring-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-top: 3rem;
    text-align: center;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.monitoring-item {
    text-align: center;
}

.monitoring-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Demo Section */
.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.demo-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.demo-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.demo-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white !important;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none !important;
}

.demo-link:hover {
    background: #1ed760;
    transform: translateX(4px);
    color: white !important;
    text-decoration: none !important;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.success .status-dot {
    background: var(--success-color);
}

.disclaimer-box {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--danger-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
}

.disclaimer-box h4 {
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.disclaimer-box ul {
    margin-left: 1.5rem;
}

.disclaimer-box li {
    margin-bottom: 0.5rem;
}

.stats-showcase {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    gap: 2rem;
    justify-content: center; /* Center the items */
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    flex: 1 1 200px; /* Allow cards to grow and shrink, with a base size */
    max-width: 300px; /* Prevent cards from getting too wide */
    word-wrap: break-word; /* Ensure long words break and wrap */
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: white;
    transition: var(--transition);
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    transition: var(--transition);
    color: #4CAF50 !important; /* Greenish color */
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    color: white !important; /* White on hover */
}

.social-links a {
    text-decoration: none !important;
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-bottom a {
    color: white;
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .section {
        padding: 4rem 0;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Monitoring Section Mobile */
    .monitoring-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 1rem;
        padding-bottom: 1rem; /* Add some padding for scrollbar */
    }

    .monitoring-item {
        flex: 0 0 auto;
        width: 250px; /* Fixed width for scrollable items */
        text-align: left; /* Left align content within item */
        margin-right: 1rem; /* Space between scrollable items */
    }

    .monitoring-section {
        text-align: center; /* Ensure the main title is centered */
    }

    /* Stats Showcase Mobile */
    .stats-showcase {
        display: flex;
        overflow-x: auto;
        padding-bottom: 1rem; /* Add some padding for scrollbar */
    }

    .stat-card {
        flex: 0 0 auto; /* Prevent shrinking/growing, use a fixed size */
        width: 180px; /* Adjust width to better fit content */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .stat-card .stat-content {
        flex: 1; /* Ensure it takes available space */
        min-width: 0; /* Allow content to shrink below its intrinsic size */
        max-width: 100%; /* Constrain to parent width */
    }

    .stat-card .stat-label {
        white-space: normal; /* Allow text to wrap */
        word-wrap: break-word; /* Break long words */
        overflow-wrap: break-word; /* Modern equivalent for word-wrap */
        word-break: break-word; /* More aggressive word breaking */
        hyphens: auto; /* Allow hyphenation for better breaks */
    }
}

@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    .tech-item img {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .overview-grid,
    .features-grid,
    .deployment-grid,
    .demo-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .tech-item img {
        max-width: 100px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .theme-toggle,
    .hero-buttons,
    .footer {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .overview-card,
    .feature-card,
    .deployment-card,
    .demo-card {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
