/* Catppuccin Macchiato Palette */
:root {
    --base: #24273a;
    --mantle: #1e2030;
    --crust: #181926;
    --text: #cad3f5;
    --subtext1: #b8c0e0;
    --subtext0: #a5adcb;
    --green: #a6da95;
    --blue: #8aadf4;
    --mauve: #c6a0f6;
    --red: #ed8796;
    --peach: #f5a97f;
    --yellow: #eed49f;
    --overlay0: #6e738d;
    --scanline-opacity: 0.03; /* Adjust this value to change scanline opacity (0.0 to 1.0) */
}

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

body {
    background-color: var(--crust);
    color: var(--text);
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, var(--scanline-opacity)) 2px,
        rgba(255, 255, 255, var(--scanline-opacity)) 4px
    );
    background-size: 100% 4px;
    animation: scanlines 0.15s linear infinite;
    pointer-events: none;
    z-index: 9999;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 4px; }
}

.terminal-window {
    background-color: var(--base);
    width: fit-content;
    max-width: 75%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    border: 1px solid var(--overlay0);
    display: flex;
    flex-direction: column;    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }}

.terminal-header {
    background-color: var(--mantle);
    padding: 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--overlay0);
}

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

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.control::after {
    color: transparent;
    font-size: 10px;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close { background-color: var(--red); }
.close:hover::after { color: var(--crust); content: '✕'; }
.minimize { background-color: var(--yellow); }
.minimize:hover::after { color: var(--crust); content: '–'; }
.maximize { background-color: var(--green); }
.maximize:hover::after { color: var(--crust); content: '▢'; }

.terminal-title {
    flex-grow: 1;
    text-align: center;
    color: var(--subtext0);
    font-size: 0.8em;
    white-space: nowrap;
}

.terminal-body {
    padding: 15px;
    height: 85vh;
    overflow-y: auto;
    overflow-x: auto;
    font-size: 14px;
}

.prompt { color: var(--green); font-weight: bold; }
.directory { color: var(--blue); font-weight: bold; }
.command { color: var(--text); }

.output {
    color: var(--subtext1);
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 2px solid var(--overlay0);
    margin-top: 5px;
    word-wrap: break-word;
}

.profile-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.profile-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 2px solid var(--mauve);
    border-radius: 8px;
    background-color: var(--mantle);
    flex-shrink: 0;
}

.steam-widget {
    margin-top: 15px;
    width: 100%;
    max-width: 646px;
    overflow-x: auto;
}

.highlight-mauve { color: var(--mauve); font-weight: bold; }
.highlight-peach { color: var(--peach); }
.highlight-blue {
    color: var(--blue);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.highlight-blue:hover,
a.highlight-blue:focus {
    color: var(--green);
    text-decoration: none;
    text-shadow: 0 0 8px var(--green);
}

.ascii-art {
    color: var(--mauve);
    white-space: pre;
    font-size: 0.7vw;
    line-height: 1.2;
    margin-bottom: 25px;
    font-weight: bold;
    text-align: center
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background-color: var(--text);
    animation: blink 1s step-end infinite, glow 2s ease-in-out infinite alternate;
    margin-left: 4px;
    vertical-align: middle;
}

@keyframes glow {
    from { box-shadow: 0 0 5px var(--text); }
    to { box-shadow: 0 0 15px var(--text); }
}

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

/* Mobile Adjustments */
@media (max-width: 600px) {
    .ascii-art { font-size: 1.5vw; }
    .profile-container { flex-direction: column; align-items: flex-start; }
    .terminal-body { font-size: 12px; }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--mantle); }
::-webkit-scrollbar-thumb { background: var(--overlay0); border-radius: 10px; }
