body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    background: #35424a;
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
}

h1 {
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    background: #ffffff;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    padding: 10px 0;
    background: #35424a;
    color: #ffffff;
    position: relative;
    bottom: 0;
    width: 100%;
}

code {
    background: #eaeaea;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

/* Navigation */
.navbar {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    color: #00d4ff;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero-author {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 3rem;
}

/* Brain Visualization */
.hero-visual {
    margin-top: 2rem;
}

.brain-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.brain-core {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #00d4ff, #9b59b6);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.pulsing {
    animation: pulse 2s infinite;
}

.memory-wire {
    position: absolute;
    background: linear-gradient(45deg, #2ecc71, #00d4ff);
    border-radius: 2px;
    opacity: 0.8;
}

.wire-1 {
    width: 60px;
    height: 3px;
    top: 40px;
    left: 20px;
    transform: rotate(30deg);
    animation: wireGlow 3s infinite;
}

.wire-2 {
    width: 50px;
    height: 3px;
    top: 80px;
    right: 30px;
    transform: rotate(-45deg);
    animation: wireGlow 3s infinite 1s;
}

.wire-3 {
    width: 40px;
    height: 3px;
    bottom: 40px;
    left: 40px;
    transform: rotate(60deg);
    animation: wireGlow 3s infinite 2s;
}

.consciousness-loop {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid #00d4ff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    animation: rotate 10s linear infinite;
}

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

.section {
    background: white;
    margin: 2rem 0;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #9b59b6, #2ecc71);
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

/* Concept Grid */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.concept-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #00d4ff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.concept-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Quote Styling */
.concept-quote {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2.5rem;
    border-radius: 15px;
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    position: relative;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.concept-quote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.3;
}

/* Metaphor Mapping */
.metaphor-mapping {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.metaphor-mapping ul {
    list-style: none;
    padding: 0;
}

.metaphor-mapping li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    padding-left: 2rem;
}

.metaphor-mapping li::before {
    content: '⚡';
    position: absolute;
    left: 0;
    color: #00d4ff;
}

.metaphor-mapping li:last-child {
    border-bottom: none;
}

/* Code Tabs */
.code-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-button {
    background: #bdc3c7;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: #2c3e50;
    color: white;
}

.tab-content {
    display: none;
}

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

.tab-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Code Styling */
pre {
    background: #2d3748 !important;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

code {
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* Terminal Styling */
.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.terminal {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.terminal-header {
    background: #333;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    color: white;
    font-weight: 600;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.close { background: #ff5f56; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #27ca3f; }

.terminal-body {
    padding: 1rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex-grow: 1;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-y: auto;
}

.system-msg {
    color: #00d4ff;
    margin-bottom: 0.5rem;
}

.prompt {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.cursor {
    animation: blink 1s infinite;
}

.input-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

#user-input {
    flex-grow: 1;
    background: #333;
    border: 1px solid #555;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

#send-btn {
    background: #00d4ff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

#send-btn:hover {
    background: #9b59b6;
}

/* Karma Trail Display */
.karma-trail {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #2ecc71;
}

.karma-trail h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.trail-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes wireGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 212, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(0, 212, 255, 0.8); }
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .demo-container {
        grid-template-columns: 1fr;
    }
    
    .concept-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 2rem 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation for code blocks */
pre[class*="language-"] {
    position: relative;
}

pre[class*="language-"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #9b59b6);
    transform: scaleX(0);
    transform-origin: left;
    animation: loadCode 1s ease-out forwards;
}

@keyframes loadCode {
    to { transform: scaleX(1); }
}