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

body {
    font-family: 'Ubuntu Mono', 'Courier New', monospace;
    background: #2c001e;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    padding: 20px;
}

#terminal-container {
    width: 100%;
    height: 100%;
    background: #300a24;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Terminal Header */
#terminal-header {
    background: linear-gradient(to bottom, #3c3c3c, #2a2a2a);
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border-bottom: 1px solid #1a1a1a;
    user-select: none;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.close {
    background: #ff5f56;
}

.control.minimize {
    background: #ffbd2e;
}

.control.maximize {
    background: #27ca3f;
}

.terminal-title {
    color: #cccccc;
    font-size: 13px;
    font-weight: normal;
}

.terminal-menu {
    color: #cccccc;
    font-size: 14px;
    cursor: pointer;
}

/* Terminal Content */
#terminal-content {
    flex: 1;
    background: #300a24;
    padding: 10px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.4;
    font-family: 'Ubuntu Mono', 'Courier New', monospace;
}

#welcome-message {
    color: #ffffff;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

#terminal-output {
    white-space: pre-wrap;
    word-wrap: break-word;
}

#current-line {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

#prompt {
    color: #8ae234;
    font-weight: bold;
    white-space: nowrap;
}

#input-text {
    color: #ffffff;
    white-space: pre;
}

#cursor {
    color: #ffffff;
    animation: blink 1s infinite;
    font-weight: bold;
}

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

#hidden-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* Scrollbar Styling */
#terminal-content::-webkit-scrollbar {
    width: 8px;
}

#terminal-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#terminal-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

#terminal-content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Text Selection */
::selection {
    background: rgba(255, 255, 255, 0.2);
}

/* Enable text selection and copying */
#terminal-output, #welcome-message {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Context menu styling */
.context-menu {
    position: fixed;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px 0;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.context-menu-item {
    padding: 8px 16px;
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
}

.context-menu-item:hover {
    background: #555;
}

.context-menu-item.disabled {
    color: #888;
    cursor: not-allowed;
}

.context-menu-item.disabled:hover {
    background: transparent;
}

/* Command Output Styling */
.command-line {
    margin: 2px 0;
}

.command-input {
    color: #8ae234;
    font-weight: bold;
}

.command-output {
    color: #ffffff;
    margin-left: 0;
}

.error-output {
    color: #ff6b6b;
}

.warning-output {
    color: #ffd93d;
}

.success-output {
    color: #6bcf7f;
}

.info-output {
    color: #74c0fc;
}

/* File Listing Styles */
.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 5px;
    margin: 5px 0;
}

.file-item {
    color: #ffffff;
}

.file-item.directory {
    color: #729fcf;
    font-weight: bold;
}

.file-item.executable {
    color: #8ae234;
    font-weight: bold;
}

.file-item.symlink {
    color: #ad7fa8;
}

.file-item.hidden {
    color: #888888;
}

/* Process List Styling */
.process-header {
    color: #ffffff;
    font-weight: bold;
    border-bottom: 1px solid #555;
    padding-bottom: 2px;
    margin-bottom: 5px;
}

.process-row {
    color: #ffffff;
    font-family: monospace;
}

/* Man Page Styling */
.man-page {
    color: #ffffff;
    white-space: pre-wrap;
}

.man-header {
    color: #8ae234;
    font-weight: bold;
}

.man-section {
    color: #729fcf;
    font-weight: bold;
    margin-top: 10px;
}

/* Network Output Styling */
.network-output {
    font-family: monospace;
    color: #ffffff;
}

.ping-success {
    color: #6bcf7f;
}

.ping-timeout {
    color: #ff6b6b;
}

/* System Info Styling */
.system-info {
    color: #74c0fc;
}

.cpu-info {
    color: #ffd93d;
}

.memory-info {
    color: #ff9f43;
}

/* Auto-completion Styling */
.autocomplete-suggestions {
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px;
    margin-top: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-item {
    color: #ffffff;
    padding: 2px 5px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #555;
}

.autocomplete-item.selected {
    background: #729fcf;
    color: #000000;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    #terminal-content {
        font-size: 12px;
        padding: 8px;
    }
    
    .file-list {
        grid-template-columns: 1fr;
    }
}

/* Focus Indicator */
#terminal-container:focus-within {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 2px #729fcf;
}
