:root {
    --primary: #00ff00;
    --secondary: #0f0;
    --dark: #0a0a0a;
    --darker: #050505;
    --card-bg: rgba(15, 15, 15, 0.95);
    --border: #1a1a1a;
    --text: #e0e0e0;
    --text-dim: #888;
}

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

body {
    font-family: 'Courier New', monospace;
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Matrix Background Effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header & Navigation */
header {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.bracket {
    color: var(--text-dim);
    font-size: 20px;
}

.visitor-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 0, 0.1);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.counter-label {
    color: var(--text-dim);
    font-size: 14px;
}

.counter-value {
    color: var(--primary);
    font-size: 18px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.15);
}

.glitch {
    font-size: 48px;
    color: var(--primary);
    position: relative;
    margin-bottom: 20px;
    font-weight: bold;
}

.terminal-text {
    font-size: 18px;
    color: var(--text);
    margin: 20px 0;
    min-height: 30px;
}

.prompt {
    color: var(--primary);
    margin-right: 5px;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary);
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stat-box {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.stat-value {
    font-size: 24px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Interactive Section */
.interactive-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 24px;
}

/* Drawing Canvas */
.canvas-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
}

#color-picker {
    width: 50px;
    height: 35px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
}

#brush-size {
    flex: 1;
    min-width: 100px;
}

#drawing-canvas {
    width: 100%;
    max-width: 600px;
    background: #1a1a1a;
    border: 2px solid var(--primary);
    border-radius: 4px;
    cursor: crosshair;
    display: block;
}

/* Snake Game */
.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    font-size: 18px;
}

.game-info span {
    color: var(--primary);
    font-weight: bold;
}

#snake-canvas {
    width: 100%;
    max-width: 400px;
    background: #1a1a1a;
    border: 2px solid var(--primary);
    border-radius: 4px;
    display: block;
    margin: 0 auto 15px;
}

.game-controls {
    text-align: center;
}

.hint {
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 10px;
}

/* Buttons */
.btn-small {
    background: rgba(0, 255, 0, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.btn-primary {
    background: var(--primary);
    color: var(--dark);
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #00cc00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-dim);
    margin-bottom: 10px;
}

.feature-card code {
    background: rgba(0, 255, 0, 0.1);
    padding: 4px 8px;
    border-radius: 3px;
    color: var(--primary);
    font-size: 12px;
}

/* Terminal */
.terminal-section {
    margin-bottom: 30px;
}

.terminal {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.15);
}

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

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

.terminal-button.red { background: #ff5f56; }
.terminal-button.yellow { background: #ffbd2e; }
.terminal-button.green { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    color: var(--text-dim);
    font-size: 12px;
}

.terminal-body {
    padding: 20px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 14px;
}

.terminal-line {
    color: var(--text);
    margin-bottom: 5px;
    word-wrap: break-word;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #0f0f0f;
    border-top: 1px solid var(--border);
}

.terminal-prompt {
    color: var(--primary);
    margin-right: 10px;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    outline: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
}

.code-block {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .interactive-section {
        grid-template-columns: 1fr;
    }
    
    .glitch {
        font-size: 32px;
    }
    
    nav {
        flex-direction: column;
        gap: 15px;
    }
    
    #drawing-canvas {
        width: 100%;
        height: auto;
    }
    
    #snake-canvas {
        width: 100%;
        height: auto;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}