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

body {
    background: #000000;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.sequence {
    position: absolute;
    left: 0;
    top: 20px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    letter-spacing: 4px;
    font-weight: 700;
    animation: subtle-glitch 5s infinite;
}

@keyframes subtle-glitch {
    0%, 98% { text-shadow: 0 0 10px rgba(255,255,255,0.3); }
    99% { text-shadow: 2px 0 5px rgba(0,255,136,0.5), -2px 0 5px rgba(255,0,136,0.5); }
    100% { text-shadow: 0 0 10px rgba(255,255,255,0.3); }
}

.canvas-wrapper {
    position: relative;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#lorenz-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 4px;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.canvas-overlay.active {
    opacity: 1;
}

.info-text {
    font-size: 18px;
    color: #00ff88;
}

.controls-section {
    margin-bottom: 20px;
}

.parameter-group {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.param-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.greek {
    font-size: 24px;
    font-weight: 600;
    color: #00ff88;
}

.param-name {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
}

.param-desc {
    color: #888;
    font-size: 12px;
    margin-left: auto;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.param-btn {
    flex: 1;
    min-width: 55px;
    padding: 8px 4px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #aaa;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', monospace;
}

.param-btn:hover {
    background: #333;
    border-color: #444;
}

.param-btn.active {
    background: #00ff88;
    color: #000;
    border-color: #00ff88;
    font-weight: 600;
}

.preset-section {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.preset-title {
    font-size: 12px;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 12px;
}

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #333;
    border-color: #00ff88;
    transform: translateY(-2px);
}

.preset-btn:active {
    transform: translateY(0);
}

.action-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #333;
    border-color: #00ff88;
}

.settings-panel,
.info-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.settings-panel.active,
.info-panel.active {
    display: flex;
}

.settings-content,
.info-content {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.settings-content h3,
.info-content h3 {
    margin-bottom: 20px;
    color: #00ff88;
}

.info-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #00ff88;
    font-size: 16px;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 14px;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    outline: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
}

.setting-item select {
    width: 100%;
    padding: 8px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.equations {
    background: #0a0a0a;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid #00ff88;
    font-family: monospace;
    font-size: 14px;
    margin: 10px 0;
}

.equations p {
    margin: 5px 0;
}

.info-content ul {
    margin-left: 20px;
    line-height: 1.8;
}

.info-content p {
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 10px;
}

.easter-egg-hint {
    color: #00ff88 !important;
    font-size: 12px;
    margin-top: 20px !important;
}

.footer {
    text-align: center;
    color: #666;
    font-size: 12px;
    padding: 20px 0;
}

.footer a {
    color: #00ff88;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 999;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ff88;
    border-radius: 50%;
    animation: sparkle-fade 0.6s ease-out forwards;
    box-shadow: 0 0 10px #00ff88;
}

@keyframes sparkle-fade {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(-50px);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .param-btn {
        min-width: 45px;
        font-size: 10px;
    }
    
    .preset-btn {
        min-width: 100%;
        font-size: 12px;
    }
    
    .action-section {
        flex-wrap: wrap;
    }
    
    .action-btn {
        min-width: calc(50% - 5px);
    }
}

@media (max-width: 480px) {
    .button-row {
        gap: 4px;
    }
    
    .param-btn {
        min-width: 40px;
        padding: 6px 2px;
        font-size: 9px;
    }
}