/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: #0a0a0a;
    color: #00ff00;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 40, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 60, 0, 0.1) 0%, transparent 20%);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #00ff00, #00cc00, #009900);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #88ff88;
    opacity: 0.8;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex: 1;
    gap: 30px;
    margin-bottom: 30px;
}

/* 控制面板 */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 350px;
    flex-shrink: 0;
}

.control-group, .info-panel {
    background-color: rgba(10, 20, 10, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
    backdrop-filter: blur(5px);
}

.control-group h2, .info-panel h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #00ff00;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-item {
    margin-bottom: 20px;
}

.control-item label {
    display: block;
    margin-bottom: 8px;
    color: #88ff88;
    font-size: 1rem;
}

.control-item input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: rgba(0, 40, 0, 0.8);
    border-radius: 4px;
    outline: none;
}

.control-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00ff00;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.control-item select {
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 30, 0, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.5);
    border-radius: 4px;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

.control-item select option {
    background-color: #0a0a0a;
    color: #00ff00;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    background-color: rgba(0, 40, 0, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.5);
    border-radius: 4px;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background-color: rgba(0, 80, 0, 0.8);
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* 信息面板 */
.info-panel .stats p {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #88ff88;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-panel .stats span {
    color: #00ff00;
    font-weight: bold;
}

.instructions {
    margin-top: 25px;
}

.instructions h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #00ff00;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ul {
    list-style-type: none;
}

.instructions li {
    margin-bottom: 10px;
    color: #88ff88;
    display: flex;
    align-items: center;
    gap: 10px;
}

kbd {
    background-color: rgba(0, 40, 0, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.5);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: #00ff00;
    min-width: 30px;
    text-align: center;
}

/* 画布容器 */
.canvas-container {
    flex: 1;
    position: relative;
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.1);
    background-color: #000;
}

#matrix-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.canvas-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.overlay-text {
    text-align: center;
    color: #00ff00;
    font-size: 1.5rem;
    padding: 30px;
    background-color: rgba(0, 20, 0, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.5);
    border-radius: 8px;
}

.overlay-text .hint {
    font-size: 1rem;
    color: #88ff88;
    margin-top: 15px;
    opacity: 0.8;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    color: #88ff88;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #00ff00;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #88ff88;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1100px) {
    .main-content {
        flex-direction: column;
    }

    .control-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .control-group, .info-panel {
        flex: 1;
        min-width: 300px;
    }

    .header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .control-group, .info-panel {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* 全屏样式 */
body.fullscreen {
    padding: 0;
}

body.fullscreen .container {
    max-width: 100%;
    padding: 0;
}

body.fullscreen .header,
body.fullscreen .footer {
    display: none;
}

body.fullscreen .main-content {
    margin: 0;
    height: 100vh;
}

body.fullscreen .control-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 300px;
    z-index: 100;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

body.fullscreen .control-panel:hover {
    opacity: 1;
}

body.fullscreen .canvas-container {
    border: none;
    border-radius: 0;
}

/* 动画效果 */
@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 20, 0, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.7);
}