        /* Center the terminal on the screen */
.hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-color: transparent;
    padding: 20px;
}

.homepage-main {
    background-image: radial-gradient(#29292e 1.5px, transparent 1.5px);
    background-size: 26px 26px;
}

        /* The outer window frame */
        .terminal-window {
            width: 100%;
            max-width: 650px;
            background-color: #1e1e1e;
            /* Visual Studio Code dark background */
            border-radius: 10px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
            overflow: hidden;
            /* Keeps sharp corners inside rounded border */
            font-family: 'Consolas', 'Courier New', monospace;
        }


/* Force both pre and code elements to break long lines cleanly */
.terminal-body pre,
.terminal-body code {
    white-space: pre-wrap !important;       /* Wraps text to the next line */
    word-break: break-word !important;     /* Breaks long words/tags if needed */
    overflow-wrap: anywhere !important;     /* Extra fallback for tight screens */
    margin: 0;                             /* Removes default pre tag margins */
}

/* Make sure the body container contains all child elements cleanly */
.terminal-body {
    padding: 20px;
    color: #d4d4d4;
    font-size: 1.1rem;
    line-height: 1.6;
    overflow-x: hidden;                    /* Prevents horizontal window scrolling */
}

/* Mobile-specific adjustments for phone screens */
@media (max-width: 600px) {
    .hero-container {
        min-height: auto;
        padding: 40px 20px;
    }
    .terminal-window {
        width: 100%;                       /* Uses available screen space */
    }

    .terminal-body {
        padding: 12px 15px;                /* Reduces inner padding on small screens */
        font-size: 0.85rem;                /* Scales down code text size so it fits */
        line-height: 1.4;
min-height: 160px;
    }

    .window-title {
        font-size: 0.75rem;                /* Keeps the header title neat */
    }
}

        /* Custom colors for HTML syntax */
        .tag {
            color: #569cd6;
            /* Classic editor blue for tags */
        }

        .highlight {
            color: #ce9178;
            /* Warm orange for strings/names */
            font-weight: bold;
        }

        .comment {
            color: #6a9955;
            /* Dark green for HTML comments */
            font-style: italic;
            display: block;
            margin-top: 10px;
        }

        /* Blinking Cursor Bar */
        .cursor {
            display: inline-block;
            width: 2px;
            height: 1.1em;
            background-color: #aeafad;
            /* VS Code gray cursor */
            margin-left: 2px;
            vertical-align: sub;
            animation: blink 1s step-end infinite;
        }

        /* Cursor Blink Animation */
        @keyframes blink {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0;
            }
        }

        /* Make header clickable for dragging */
        .terminal-header {
            cursor: grab;
            user-select: none;
            /* Prevents text selection while dragging */
        }

        /* Optional: add smooth transition back if needed */
        .terminal-window {
            will-change: transform;
        }

/* --- Widgets --- */
.terminal-window.widget {
    position: absolute;
    pointer-events: all;
}

.widget-blog {
    top: 100px;
    left: 40px;
    width: 300px;
}

.widget-reading {
    bottom: 100px;
    right: 40px;
    width: 300px;
}

.widget-label {
    font-family: monospace;
    color: #00adb5;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    font-style: italic;
}

.widget-book-title {
    font-family: monospace;
    color: #eeeeee;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.widget-book-author {
    font-family: monospace;
    color: #aaaaaa;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.widget-progress-text {
    font-family: monospace;
    color: #eeeeee;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background-color: #393e46;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #00adb5;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.widget-percentage {
    font-family: monospace;
    color: #aaaaaa;
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.widget-excerpt {
    font-family: monospace;
    color: #aaaaaa;
    font-size: 0.85rem;
    margin: 0.5rem 0 1rem;
    line-height: 1.6;
}

.widget-link {
    font-family: monospace;
    color: #00adb5;
    text-decoration: none;
    font-size: 0.85rem;
}

.widget-link:hover {
    text-decoration: underline;
}

.widget-steam {
    bottom: 100px;
    left: 100px;
    width: 300px;
}

.widget-stats {
    top: 100px;
    right: 40px;
    width: 300px;
}

.widget-xbox {
    bottom: 100px;
    left: 420px;
    width: 300px;
}

.xbox-status-dot {
    font-size: 0.7rem;
    margin-right: 4px;
}

.xbox-status-dot.online {
    color: #28c840;
}

.xbox-status-dot.offline {
    color: #aaaaaa;
}

@media (max-width: 768px) {
    .terminal-window.widget {
        position: static;
        width: 90%;
        margin: 0 auto 1.5rem;
    }
}