/* VARIABLES
   Palette pulled from the purple/mint/teal swirl artwork.
*/

:root {
    --bg: #1c0f36;
    --panel: #2a1a4d;
    --panel-dark: #180b2e;
    --text: #eafff5;
    --white: #ffffff;
    --black: #000000;
    --gray: #4a3d70;
    --muted: #b3a3d9;

    --mint: #7dffb8;
    --mint-link: #9dffca;
    --teal: #4fd8e0;
    --teal-light: #a8f5f0;
    --violet: #b48cff;
    --deep-violet: #3d1f7a;

    --accent: var(--mint);
    --accent-2: var(--teal);

    --gap: 16px;

    --nav-width: 180px;
    --side-width: 200px;
    --main-width: 700px;

    /* ---- BACKGROUND IMAGE SLOT ----
       To use the swirl artwork (or any image) as the site background:
       1. Upload the image file next to this CSS file (e.g. "background.jpg").
       2. Set --bg-image below to url("background.jpg").
       It defaults to "none" so the site still looks right with no image. */
    --bg-image: url("https://i.pinimg.com/1200x/af/5b/19/af5b19e27f3608e47898783b298ee259.jpg");
    --bg-overlay: rgba(24, 11, 46, 0.56);
}


/* GENERAL */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: "VT323", monospace;
    font-size: 18px;
    line-height: 1.3;
    overflow-x: hidden;

    /* Applies --bg-image (see variable above) full-bleed behind everything,
       with a dark violet tint over it so text stays readable. */
    background-image:
        linear-gradient(var(--bg-overlay), var(--bg-overlay)),
        var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.center {
    text-align: center;
}

.tiny {
    font-size: 15px;
    color: var(--muted);
}


/* PAGE LAYOUT */

.desktop {
    display: grid;
    grid-template-columns:
        var(--nav-width)
        minmax(0, var(--main-width))
        var(--side-width);
    justify-content: center;
    align-items: start;
    gap: var(--gap);
    min-height: 100vh;
    padding: var(--gap);
    
    background-image: radial-gradient(rgba(180, 140, 255, 0.15) 1px, transparent 1px);
    background-size: 8px 8px;
}

.site-header {
    grid-column: 1 / -1;
    grid-row: 1;
}

.navigation {
    grid-column: 1;
    grid-row: 2;
}

.friends-area {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.right-sidebar {
    grid-column: 3;
    grid-row: 2;
}

.navigation,
.right-sidebar {
    position: sticky;
    top: var(--gap);
}


/* HEADER */

.site-header {
    position: relative;
    padding: 6px 12px;
    color: var(--white);
    background: linear-gradient(180deg,
        rgba(255,255,255,0.08) 0%,
        rgba(255,255,255,0) 45%
    ), var(--panel-dark);
    border: 2px solid var(--white);
    border-radius: 4px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.45),
        0 8px 18px rgba(0, 0, 0, 0.35);
    font-size: 30px;
    letter-spacing: 2px;
    overflow: hidden;
}

.site-header small {
    color: var(--mint);
}


/* WINDOWS */

.window {
    position: relative;
    background: var(--panel);
    border: 2px solid var(--text);
    border-radius: 4px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.45),
        0 8px 18px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.window-content,
.friend-content {
    padding: 12px 14px;
}

.window-content p,
.friend-content p {
    margin: 4px 0;
}

.window-content > :first-child,
.friend-content > :first-child {
    margin-top: 0;
}

.window-content > :last-child,
.friend-content > :last-child {
    margin-bottom: 0;
}

.window-content a {
    color: var(--mint-link);
}

.window-content a:hover {
    color: var(--black);
    background: var(--mint-link);
}


/* TITLE BAR + BUTTONS */

.titlebar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 26px;
    padding: 2px 6px;
    color: var(--black);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 45%),
        linear-gradient(90deg, var(--accent), var(--accent-2));
    border-bottom: 2px solid var(--text);
    font-size: 18px;
    white-space: nowrap;
    user-select: none;
}

.drag-handle {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.buttons {
    display: flex;
    gap: 4px;
}

.btn {
    width: 14px;
    height: 14px;
    background: linear-gradient(180deg, #ffffff, #cfd8ea);
    border: 1px solid #3a3a3a;
    border-radius: 2px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.btn.close {
    background: linear-gradient(180deg, #ffb3c8, #ff5555);
}


/* LEFT NAVIGATION */

.navigation .window-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.navigation a {
    display: block;
    padding: 4px 8px;
    color: var(--white);
    text-decoration: none;
    background: linear-gradient(180deg, #3a2d5e, #241640);
    border: 1px solid #7a68a8;
    border-radius: 3px;
    transition: background 0.15s ease, color 0.15s ease;
}

.navigation a:hover {
    color: var(--black);
    background: linear-gradient(180deg, #a8ffce, var(--mint));
}

.navigation hr {
    width: 100%;
    margin: 6px 0;
    border: none;
    border-top: 2px dashed #7a68a8;
}


/* INTRO */

.intro-window h1 {
    margin: 0 0 6px;
    font-size: 28px;
    color: var(--mint);
    text-shadow: 2px 2px var(--black);
}

.blink {
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}


/* FRIEND WINDOWS */

.friend-blue {
    --accent: var(--teal);
    --accent-2: var(--teal-light);
}

.friend-green {
    --accent: var(--mint);
    --accent-2: #c8ffe0;
}

.friend-yellow {
    --accent: #d9ff8f;
    --accent-2: #f0ffc8;
}

.friend-purple {
    --accent: var(--violet);
    --accent-2: #e0cfff;
}

.friend-content {
    background: linear-gradient(
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.01)
    );
}

.friend-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.friend-header img {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    object-fit: cover;
    border: 2px solid var(--white);
    border-radius: 4px;
    box-shadow:
        2px 2px 0 var(--accent),
        0 4px 10px rgba(0, 0, 0, 0.4);
    image-rendering: pixelated;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.friend-header img:hover {
    transform: rotate(-3deg) scale(1.05);
    box-shadow:
        3px 3px 0 var(--accent),
        0 6px 14px rgba(0, 0, 0, 0.5);
}

.friend-header h2 {
    margin: 0 0 2px;
    color: var(--accent);
    font-size: 24px;
}

.friend-header p {
    margin: 0;
}

.friend-content h3 {
    margin: 12px 0 2px;
    font-size: 22px;
    color: var(--violet);
}

.friend-content hr {
    margin: 12px 0;
    border: none;
    border-top: 2px dashed #6a5a94;
}

.signature {
    text-align: right;
    color: var(--mint);
    font-size: 20px;
}

/* FRIENDS GRID */

.friends-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
    align-items: start;
}

.friends-grid .friend-window,
.friends-grid .friend-slot-window {
    margin: 0;
}

/* STATUS LINE */

.friend-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 15px;
    color: var(--muted);
}

.friend-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6dff8f;
    box-shadow: 0 0 4px #6dff8f;
    flex-shrink: 0;
}

.friend-status.away .dot {
    background: #ffd166;
    box-shadow: 0 0 4px #ffd166;
}

.friend-status.offline .dot {
    background: #888888;
    box-shadow: none;
}


/* HOW WE MET TIMELINE */

.friend-timeline {
    margin: 6px 0 0;
    padding-left: 0;
    list-style: none;
    border-left: 2px dashed var(--accent);
}

.friend-timeline li {
    position: relative;
    margin: 0 0 8px 0;
    padding: 0 0 0 16px;
}

.friend-timeline li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--panel);
    box-shadow: 0 0 4px var(--accent);
}

.friend-timeline .date {
    color: var(--accent);
    font-size: 15px;
    display: block;
}


/* MUTUALS / WEBRING LINKS */

.friend-mutuals {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.friend-mutuals a {
    display: inline-block;
    padding: 3px 8px;
    font-size: 15px;
    color: var(--black);
    text-decoration: none;
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    border: 1px solid var(--text);
    border-radius: 3px;
    transition: transform 0.15s ease;
}

.friend-mutuals a:hover {
    transform: scale(1.06);
    color: var(--white);
}


/* FRIENDSHIP BADGES */

.badges-window .window-content {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badges-window img {
    width: 88px;
    height: 31px;
    object-fit: cover;
    border: 1px solid var(--text);
    image-rendering: pixelated;
    transition: transform 0.15s ease;
}

.badges-window img:hover {
    transform: scale(1.08);
}


/* EMPTY FRIEND SLOT */

.friend-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: var(--muted);
    text-align: center;
    border: 2px dashed #6a5a94;
    border-radius: 4px;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.02),
        rgba(255,255,255,0.02) 10px,
        transparent 10px,
        transparent 20px
    );
}


/* IMAGE STRIP */

.marquee {
    width: 100%;
    margin: 12px 0;
    overflow: hidden;
    border: 2px solid var(--text);
    border-radius: 4px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scroll-left 20s linear infinite;
}

.marquee-track img {
    flex-shrink: 0;
    display: block;
    width: 110px;
    height: 110px;
    margin-right: 6px;
    object-fit: cover;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}


/* RESPONSIVE / MOBILE */

@media (max-width: 960px) {

    .desktop {
        grid-template-columns: minmax(0, 1fr);
        padding: 10px;
        gap: 12px;
    }

    .site-header,
    .navigation,
    .friends-area,
    .right-sidebar {
        grid-column: 1;
        grid-row: auto;
    }

    .site-header {
        font-size: 24px;
    }

    .navigation,
    .right-sidebar {
        position: static;
    }

    .friends-area {
        gap: 12px;
    }

    .friend-header {
        flex-direction: column;
        text-align: center;
    }

    .marquee-track img {
        width: 90px;
        height: 90px;
    }
}


/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    .blink {
        animation: none;
    }

    .marquee {
        overflow-x: auto;
    }

    .marquee-track {
        animation: none;
    }
}