@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

.terminal-window {
    background: #111111;
    border: 2px solid #333;
    border-radius: 8px;
    margin: 20px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.terminal-header {
    background: #333;
    padding: 10px 15px;
    border-bottom: 1px solid #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27ca3f; }

.terminal-title {
    color: #ccc;
    font-size: 14px;
    margin-left: 10px;
}

.terminal-content {
    padding: 20px;
    min-height: 300px;
}

.prompt {
    color: #ffffff;
}

.command {
    color: #cccccc;
}

.output {
    color: #f8f8f2;
}

.error {
    color: #ffffff;
}

.comment {
    color: #666666;
}

.string {
    color: #dddddd;
}

.number {
    color: #bbbbbb;
}

.type {
    color: #cccccc;
}

.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #000000 0%, #111111 100%);
}

.logo {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.tagline {
    font-size: 1.2em;
    color: #aaa;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px;
}

.memory-viz {
    background: #111111;
    border: 1px solid #333;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.memory-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.memory-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.memory-row-label {
    font-size: 12px;
    color: #666;
    width: 80px;
    text-align: right;
    margin-right: 10px;
}

.memory-block {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.memory-block:hover {
    transform: scale(1.1);
}

.memory-block.selected {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.block-allocated {
    background: #ffffff;
    color: #000;
    border: 2px solid #fff;
}

.block-free {
    background: #222;
    color: #666;
    border: 1px dashed #555;
}

.block-checkpoint {
    background: #888888;
    color: #000;
    border: 2px solid #aaa;
}

.block-finalizer {
    background: #ffffff;
    color: #000;
    border: 2px solid #fff;
}

.block-finalizer::after {
    content: "F";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #666;
    color: #fff;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interactive-demo {
    margin: 20px 0;
}

.demo-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.btn {
    background: #333;
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover:not(:disabled) {
    background: #ffffff;
    color: #000;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.code-editor {
    margin: 20px 0;
}

.CodeMirror {
    background: #0f0f0f !important;
    color: #ffffff !important;
    border: 1px solid #333;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 14px !important;
}

.CodeMirror-gutters {
    background: #111 !important;
    border-right: 1px solid #333 !important;
}

.CodeMirror-linenumber {
    color: #666 !important;
}

.performance-meter {
    background: #111111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.meter-bar {
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #cccccc);
    transition: width 1s ease;
}

.links {
    text-align: center;
    padding: 40px 20px;
    background: #111111;
}

.link {
    color: #ffffff;
    text-decoration: none;
    margin: 0 20px;
    padding: 10px 20px;
    border: 1px solid #ffffff;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s ease;
}

.link:hover {
    background: #ffffff;
    color: #000;
}

.typing-animation {
    border-right: 2px solid #ffffff;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: #ffffff; }
    51%, 100% { border-color: transparent; }
}

.use-case-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.tab {
    padding: 10px 20px;
    background: #222;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tab.active {
    background: #111;
    color: #fff;
    border-bottom: 2px solid #fff;
}

.tab-content {
    display: none;
}

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

.allocation-log {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    margin: 15px 0;
    font-size: 12px;
}

.log-entry {
    margin: 2px 0;
    padding: 2px 0;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .demo-controls {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 2em;
    }

    .use-case-tabs {
        flex-direction: column;
    }
}
