* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

:root {
    --bg-color: #0a0a0a;
    --text-color: #0f0;
    --accent-color: #0f0;
    --panel-bg: #000;
    --border-color: #0f0;
    --success-color: #0f0;
    --warning-color: #ff0;
    --danger-color: #f00;
    --ad-bg: #0a1a0a;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
}

.matrix-column {
    display: inline-block;
    width: 1em;
    font-size: 14px;
    text-align: center;
    writing-mode: vertical-rl;
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
    animation: matrix-fall linear infinite;
}

@keyframes matrix-fall {
    to { transform: translateY(100vh); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    position: relative;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.05) 1px,
        transparent 1px,
        transparent 10px
    );
    z-index: -1;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.subtitle {
    font-size: 1.1rem;
    color: #8f8;
    max-width: 800px;
    margin: 0 auto;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.editor-area {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.editor-container {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    overflow: hidden;
}

.editor-header {
    background-color: #0a0a0a;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-title {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.editor-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background-color: var(--accent-color);
    color: #000;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-btn:hover {
    background-color: #8f8;
}

#code-editor {
    width: 100%;
    height: 400px;
    background-color: #000;
    color: var(--text-color);
    border: none;
    padding: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    resize: none;
    white-space: pre;
    overflow: auto;
    outline: none;
}

#code-editor::selection {
    background-color: rgba(0, 255, 0, 0.3);
}

.sidebar {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stats-title {
    font-size: 1.3rem;
    color: var(--accent-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    background-color: #0a0a0a;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.9rem;
    color: #8f8;
    margin-top: 5px;
}

.activity-panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.activity-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.activity-content {
    flex-grow: 1;
    overflow: hidden;
}

.radar-container {
    width: 100%;
    height: 200px;
    position: relative;
    margin: 20px 0;
}

.radar {
    width: 180px;
    height: 180px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.radar-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background-color: var(--accent-color);
    transform-origin: left center;
    animation: radar-sweep 4s infinite linear;
}

@keyframes radar-sweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.radar-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--danger-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--danger-color);
    transform: translate(-50%, -50%);
}

.system-log {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 10px;
    height: 150px;
    overflow-y: auto;
    font-size: 0.9rem;
    margin-top: 15px;
}

.log-entry {
    margin-bottom: 5px;
    padding-left: 10px;
    border-left: 2px solid var(--accent-color);
}

.log-timestamp {
    color: #8f8;
    margin-right: 10px;
}

.progress-container {
    margin: 15px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.progress-bar {
    height: 10px;
    background-color: rgba(0, 50, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-color);
    width: 45%;
    border-radius: 5px;
}

.instructions {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.instructions h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.instructions-list {
    padding-left: 20px;
}

.instructions-list li {
    margin-bottom: 10px;
    color: #8f8;
}

.highlight {
    background-color: rgba(0, 255, 0, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
    color: #8f8;
    font-size: 0.9rem;
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-btn, .mode-toggle {
    background-color: transparent;
    color: #8f8;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active, .mode-toggle.active {
    background-color: var(--accent-color);
    color: #000;
    font-weight: bold;
}

.settings-panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    display: none;
}

.settings-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-label {
    display: block;
    margin-bottom: 5px;
    color: #8f8;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #444;
}

.toggle-settings {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    z-index: 10;
}

.data-transfer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.data-packet {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    animation: data-transfer linear forwards;
}

@keyframes data-transfer {
    0% { transform: translateY(0) scale(1); opacity: 0.8; }
    100% { transform: translateY(-100px) scale(0.2); opacity: 0; }
}

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to bottom, rgba(0,255,0,0), rgba(0,255,0,1) 50%, rgba(0,255,0,0));
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    animation: scan 3s infinite;
    z-index: 4;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.ad-container {
    background-color: var(--ad-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    margin: 20px auto;
    text-align: center;
    max-width: 728px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
}

.ad-label {
    font-size: 0.8rem;
    color: #8f8;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ad-placeholder {
    background: linear-gradient(45deg, #0a1a0a, #0a2a0a);
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8f8;
    font-size: 0.9rem;
    border-radius: 4px;
}

body.fullscreen-mode {
    overflow: hidden;
}

body.fullscreen-mode .ad-container,
body.fullscreen-mode header,
body.fullscreen-mode .mode-selector,
body.fullscreen-mode .sidebar,
body.fullscreen-mode .instructions,
body.fullscreen-mode footer,
body.fullscreen-mode .settings-panel,
body.fullscreen-mode .toggle-settings {
    display: none;
}

body.fullscreen-mode .container {
    max-width: 100%;
    padding: 0;
    height: 100vh;
}

body.fullscreen-mode .editor-area {
    flex: 1;
    height: 100vh;
    margin: 0;
}

body.fullscreen-mode .editor-container {
    border-radius: 0;
    border: none;
    height: 100%;
    box-shadow: none;
}

body.fullscreen-mode #code-editor {
    height: calc(100vh - 50px);
}

.tools-panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.tools-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tool-item {
    background-color: #0a0a0a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    color: #8f8;
    text-decoration: none;
    transition: all 0.3s;
}

.tool-item:hover {
    background-color: var(--accent-color);
    color: #000;
    box-shadow: 0 0 10px var(--accent-color);
}

.tool-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.tool-item span {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.tool-item p {
    font-size: 0.9rem;
    color: #8f8;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    h1 { font-size: 2rem; }
    .subtitle { font-size: 0.95rem; }
    .stats-grid { grid-template-columns: 1fr; }
    #code-editor { height: 300px; font-size: 1rem; }
    .radar-container { height: 150px; }
    .radar { width: 130px; height: 130px; }
    .ad-container { padding: 10px; }
    .ad-placeholder { height: 70px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .container { padding: 10px; }
    header { padding: 15px 0; }
    h1 { font-size: 1.8rem; }
    #code-editor { height: 250px; padding: 15px; }
    .instructions { padding: 15px; }
    .mode-selector { gap: 8px; }
    .mode-btn, .mode-toggle { padding: 6px 10px; font-size: 0.9rem; }
    .ad-container { margin: 10px auto; }
}