/* Terminal Theme - White/Grey on VS Code Grey */
:root {
    --primary-color: #ffffff;
    --bg-color: #1e1e1e;
    --accent-color: #e0e0e0;
    --dim-color: #888888;
    --orange-color: #ff8800;
    --success-color: #00ff00;
    --terminal-border: #3a3a3a;
    --shadow-color: rgba(255, 255, 255, 0.2);
}

/* Light Theme */
body.light-theme {
    --primary-color: #1e1e1e;
    --bg-color: #f5f5f5;
    --accent-color: #2d2d2d;
    --dim-color: #666666;
    --orange-color: #d86600;
    --success-color: #00aa00;
    --terminal-border: #cccccc;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .scanline {
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.02),
        rgba(0, 0, 0, 0.02) 1px,
        transparent 1px,
        transparent 2px
    );
}

body.light-theme .terminal-header {
    background: #e0e0e0;
}

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

body {
    font-family: 'Courier New', 'Monaco', 'Consolas', 'Source Code Pro', monospace;
    background: var(--bg-color);
    color: var(--primary-color);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global Pre Element Safety */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* CRT Effect - Minimal */
.crt {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-color);
    position: relative;
}

/* Scanline Effect - Subtle */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 8;
}

/* Terminal Container */
.terminal-container {
    max-width: 1200px;
    margin: 20px auto;
    background: var(--bg-color);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    overflow-x: hidden;
}

/* Terminal Header */
.terminal-header {
    background: #252526;
    padding: 10px 15px;
    border-bottom: 1px solid var(--terminal-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 6px 6px 0 0;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn-close {
    background: #ff5f56;
}

.btn-minimize {
    background: #ffbd2e;
}

.btn-maximize {
    background: #27c93f;
}

.terminal-title {
    color: var(--dim-color);
    font-size: 14px;
    flex-grow: 1;
    text-align: center;
    margin-right: 60px;
    transition: color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    user-select: none;
}

.theme-toggle:hover {
    opacity: 0.7;
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-icon {
    color: var(--dim-color);
    font-size: 18px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

/* Terminal Body */
.terminal-body {
    padding: 30px;
    min-height: 600px;
    background: var(--bg-color);
    border-radius: 0 0 6px 6px;
}

/* Main Content */
.main-content {
    opacity: 1;
}

.section {
    margin: 20px 0;
    padding: 10px 0;
}

/* ASCII Logo */
.ascii-logo {
    color: var(--primary-color);
    font-size: 10px;
    line-height: 1.2;
    margin-bottom: 30px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Command Blocks */
.command-block,
.section-title {
    margin: 20px 0 10px 0;
}

.prompt {
    color: var(--dim-color);
    font-weight: bold;
}

.command {
    color: var(--accent-color);
    margin-left: 5px;
}

.output {
    margin: 10px 0 10px 20px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.output h2 {
    color: var(--orange-color);
    font-size: 1.4em;
    margin: 15px 0 10px 0;
    font-weight: normal;
    transition: color 0.3s ease;
}

.output p {
    margin: 5px 0;
    line-height: 1.6;
    color: var(--accent-color);
}

/* Cursor */
.cursor {
    animation: blink 1.2s step-end infinite;
    color: var(--primary-color);
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tagline */
.tagline {
    margin: 30px 0;
    font-size: 18px;
}

.tagline .output {
    color: var(--orange-color);
    font-weight: bold;
    font-size: 1.2em;
}

/* File List */
.file-list {
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.file-item {
    display: flex;
    margin: 8px 0;
    padding: 5px;
    transition: opacity 0.2s;
}

.file-item:hover {
    opacity: 0.8;
}

.permissions {
    color: var(--dim-color);
    margin-right: 15px;
    min-width: 100px;
}

.file-name {
    color: var(--accent-color);
    font-weight: bold;
    min-width: 200px;
}

.file-desc {
    color: var(--primary-color);
    font-style: italic;
}

/* Highlight Text */
.highlight {
    color: var(--primary-color);
    font-weight: bold;
}

/* Success Color */
.success {
    color: var(--success-color);
    font-weight: bold;
}

/* Email Link */
.email-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.email-link:hover {
    opacity: 0.7;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding-top: 20px;
}

.separator {
    margin: 20px 0;
    opacity: 0.5;
    border-bottom: 3px double var(--dim-color);
    height: 0;
    max-width: 100%;
}

.status {
    font-size: 12px;
    color: var(--dim-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal-container {
        margin: 10px;
        border-radius: 4px;
    }

    .terminal-body {
        padding: 20px 15px;
    }

    .ascii-logo {
        font-size: 6px;
    }

    .file-item {
        flex-direction: column;
    }

    .permissions,
    .file-name {
        min-width: auto;
    }

    .file-desc {
        margin-left: 20px;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .ascii-logo {
        font-size: 4px;
    }

    .terminal-title {
        font-size: 10px;
        margin-right: 30px;
    }

    .command-block,
    .output {
        font-size: 12px;
    }
}
