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

:root {
    --page-bg: #11111b;
    --terminal-bg: #1e1e2e;
    --terminal-header-bg: #181825;
    --terminal-panel-bg: #313244;
    --terminal-hover-bg: #45475a;
    --border-subtle: #313244;
    --border-strong: #45475a;
    --border-hover: #585b70;
    --text-primary: #cdd6f4;
    --text-secondary: #bac2de;
    --text-muted: #6c7086;
    --accent-mint: #a6e3a1;
    --accent-mint-strong: #94e2d5;
    --accent-amber: #f9e2af;
    --accent-coral: #f38ba8;
    --accent-link: #89b4fa;
    --focus-ring: rgba(166, 227, 161, 0.72);
    --shadow-terminal: rgba(0, 0, 0, 0.62);
}

html {
    background: var(--page-bg);
    min-height: 100%;
}

body {
    font-family: 'Fira Code', monospace;
    background: var(--page-bg);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-primary);
}

.terminal-window {
    background: var(--terminal-bg);
    border-radius: 8px;
    box-shadow: 0 20px 60px var(--shadow-terminal);
    width: 100%;
    max-width: 1120px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.terminal-header {
    background: var(--terminal-header-bg);
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    gap: 12px;
}

.terminal-title {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.terminal-controls {
    position: absolute;
    left: 16px;
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.control:hover {
    transform: scale(1.1);
}

.control:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.control:active {
    transform: scale(0.95);
}

.control.minimize {
    background: var(--accent-amber);
}

.control.maximize {
    background: var(--accent-mint-strong);
}

.control.close {
    background: var(--accent-coral);
}

.new-tab-btn {
    position: absolute;
    right: 16px;
    background: var(--terminal-panel-bg);
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.new-tab-btn:hover {
    background: var(--terminal-hover-bg);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.new-tab-btn:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.new-tab-btn:active {
    transform: scale(0.95);
}

.terminal-content {
    padding: 40px;
    background: var(--terminal-bg);
    min-height: 600px;
}

.cursor {
    animation: blink 1s infinite;
}

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

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--terminal-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

.markdown-content {
    color: var(--text-primary);
}

.profile-section {
    margin-bottom: 28px;
}

.avatar-container {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-subtle);
    background: var(--terminal-header-bg);
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.markdown-section {
    margin-bottom: 24px;
}

.cat-command {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    font-family: 'Fira Code', monospace;
    letter-spacing: 0;
}

.cat-command::first-letter {
    color: var(--accent-mint);
}

.terminal-output {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.45;
}

.ls-output {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 14px;
    color: var(--text-primary);
}

.ls-output div {
    color: var(--text-primary);
    position: relative;
    padding-left: 22px;
    white-space: nowrap;
    font-size: 15px;
}

.ls-output div::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.16em;
    width: 14px;
    height: 16px;
    border: 1.5px solid var(--accent-mint);
    border-radius: 2px;
    background:
        linear-gradient(135deg, var(--terminal-bg) 0 48%, var(--accent-mint) 50% 58%, transparent 60%) top right / 6px 6px no-repeat,
        var(--terminal-panel-bg);
    box-shadow: inset 0 -2px 0 rgba(166, 227, 161, 0.12);
}

.ls-output div::after {
    content: "";
    position: absolute;
    left: 4px;
    top: calc(0.16em + 7px);
    width: 6px;
    height: 1px;
    background: var(--accent-mint);
    box-shadow: 0 4px 0 rgba(166, 227, 161, 0.72);
    opacity: 0.9;
}

.ip-output {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ip-interface {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ip-interface-header {
    color: var(--text-primary);
    font-weight: 500;
}

.ip-interface-detail {
    color: var(--text-muted);
    padding-left: 0;
    font-family: 'Fira Code', monospace;
    word-break: break-all;
    overflow-wrap: break-word;
}

.terminal-link {
    color: var(--accent-link);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.terminal-link:hover {
    color: var(--accent-mint);
}

.profile-section .terminal-output {
    display: flex;
    gap: 24px;
    align-items: center;
}

.profile-text {
    flex: 1;
    min-width: 0;
}

.profile-line {
    margin-bottom: 6px;
    color: var(--text-primary);
}

.profile-label {
    color: var(--accent-amber);
    font-weight: 500;
}

.markdown-text {
    line-height: 1.45;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 15px;
}

.highlight {
    color: var(--accent-amber);
    font-weight: 500;
}

.code-inline {
    background: var(--terminal-panel-bg);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-mint);
    font-size: 14px;
    border: 1px solid var(--border-subtle);
}

.terminal-prompt {
    margin-top: 32px;
    color: var(--text-muted);
    font-size: 16px;
}

.prompt {
    color: var(--accent-mint);
    margin-right: 8px;
}

@media (max-width: 1024px) {
    .ls-output {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cat-command {
        font-size: 14px;
    }

    .markdown-text {
        font-size: 14px;
    }

    .terminal-output {
        font-size: 14px;
    }

    .avatar-container {
        width: 100px;
        height: 100px;
    }

    .ls-output {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px 8px;
        font-size: 14px;
    }

    .ls-output div {
        font-size: 14px;
    }
}

@media (max-width: 420px) {
    .profile-section .terminal-output {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

em {
    color: var(--text-secondary);
    font-style: italic;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}
