/* =========================================================
   RETROSPACE OS // INDUSTRIAL NEON PHOSPHOR THEME
   Aesthetic inspired by Serif Web OS (SerifOS)
   ========================================================= */

:root {
    /* Color Palette */
    --c-steel-dark: #0f1115;
    --c-steel-mid: #1b1e24;
    --c-steel-light: #343a46;
    --c-steel-border: #4a5263;
    
    /* Neon Phosphor Accent */
    --c-neon-green: #00ff66;
    --c-neon-dim: #00b347;
    --c-neon-glow: rgba(0, 255, 102, 0.4);
    
    /* Text & UI */
    --c-text-main: #00ff66;
    --c-text-muted: #7ca982;
    --c-box-bg: #121419;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Courier New", Courier, monospace;
    background: linear-gradient(135deg, #050608 0%, #15181f 50%, #0a0b0e 100%);
    background-attachment: fixed;
    color: var(--c-text-main);
    text-shadow: 0 0 4px var(--c-neon-glow);
}

/* --- Steel Header / Navbar --- */
.navbar {
    background: linear-gradient(180deg, #444c5a 0%, #22262e 100%);
    border-bottom: 2px solid var(--c-steel-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 1.3rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 16px;
}

.nav-links a {
    color: var(--c-text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px #ffffff;
}

/* --- App Container --- */
.app-container {
    display: flex;
    min-height: calc(100vh - 46px);
}

/* --- Left Sidebar Editor --- */
.editor-panel {
    width: 310px;
    background: linear-gradient(180deg, #181b22 0%, #0e1014 100%);
    padding: 16px;
    border-right: 2px solid var(--c-steel-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.editor-panel h2 {
    font-size: 1.05rem;
    color: #ffffff;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--c-steel-border);
    padding-bottom: 6px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--c-neon-dim);
    text-transform: uppercase;
}

.input-group input, 
.input-group textarea, 
.input-group select {
    width: 100%;
    padding: 8px;
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    background-color: #08090c;
    color: var(--c-neon-green);
    border: 1px solid var(--c-steel-border);
    outline: none;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
}

.input-group input:focus, 
.input-group textarea:focus, 
.input-group select:focus {
    border-color: var(--c-neon-green);
    box-shadow: 0 0 6px var(--c-neon-glow);
}

#updateBtn {
    background: linear-gradient(180deg, #2b313d 0%, #15181e 100%);
    color: var(--c-neon-green);
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid var(--c-neon-green);
    padding: 10px;
    cursor: pointer;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 6px var(--c-neon-glow);
    transition: all 0.2s ease;
}

#updateBtn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 14px #ffffff, 0 0 24px rgba(255, 255, 255, 0.8);
}

/* --- Profile Preview Area --- */
.profile-preview {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.profile-grid {
    display: flex;
    gap: 20px;
    max-width: 950px;
}

.left-col {
    width: 230px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- Profile Details & Typography --- */
.user-name {
    font-size: 1.5rem;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.user-status, .user-details {
    font-size: 0.85rem;
    color: var(--c-neon-green);
}

/* --- Avatar Module --- */
.avatar-box {
    width: 170px;
    height: 170px;
    background: #08090c;
    border: 2px solid var(--c-steel-border);
    box-shadow: inset 0 0 10px #000000, 0 0 6px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-neon-dim);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- Neon Cyber Music Widget --- */
.music-widget {
    background: #08090c;
    border: 1px solid var(--c-neon-green);
    box-shadow: 0 0 8px var(--c-neon-glow);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.song-title {
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 0.75rem;
    color: var(--c-neon-green);
}

.play-btn {
    background: var(--c-neon-green);
    color: #000000;
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 0.7rem;
    border: none;
    padding: 3px 8px;
    cursor: pointer;
    box-shadow: 0 0 5px var(--c-neon-green);
    transition: all 0.2s ease;
}

.play-btn:hover {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 12px #ffffff, 0 0 18px rgba(255, 255, 255, 0.8);
}

/* --- Steel Section Boxes --- */
.section-box {
    background: var(--c-box-bg);
    border: 1px solid var(--c-steel-border);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    padding: 10px 12px;
}

.section-header {
    background: linear-gradient(180deg, #3a414e 0%, #1d2128 100%);
    color: #ffffff;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 4px 8px;
    margin: -10px -12px 10px -12px;
    border-bottom: 1px solid var(--c-steel-border);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-body {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--c-text-main);
}

.contact-links {
    list-style: none;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--c-neon-green);
}

/* --- Top 8 Grid --- */
.top8-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.friend-card {
    background: #090a0d;
    border: 1px solid var(--c-steel-border);
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease;
}

.friend-card:hover {
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.friend-name {
    font-weight: bold;
    font-size: 0.75rem;
    color: var(--c-neon-green);
}

.friend-pic {
    width: 60px;
    height: 60px;
    background-color: #171a21;
    border: 1px solid var(--c-steel-border);
    color: var(--c-neon-dim);
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Comments & Guestbook System --- */
.comments-section {
    margin-top: 4px;
}

.comment-form {
    background: #08090c;
    border: 1px solid var(--c-steel-border);
    padding: 10px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#postCommentBtn {
    background: linear-gradient(180deg, #2b313d 0%, #15181e 100%);
    color: var(--c-neon-green);
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 0.8rem;
    border: 1px solid var(--c-steel-border);
    padding: 6px 12px;
    cursor: pointer;
    align-self: flex-end;
    text-transform: uppercase;
    box-shadow: 0 0 4px var(--c-neon-glow);
    transition: all 0.2s ease;
}

#postCommentBtn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 12px #ffffff, 0 0 20px rgba(255, 255, 255, 0.8);
}

.comments-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-card {
    background: #090a0d;
    border: 1px solid var(--c-steel-border);
    padding: 8px;
    display: flex;
    gap: 12px;
}

.comment-meta {
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.comment-avatar {
    width: 45px;
    height: 45px;
    background-color: #171a21;
    border: 1px solid var(--c-steel-border);
    color: var(--c-neon-dim);
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-author {
    font-weight: bold;
    font-size: 0.7rem;
    color: var(--c-neon-green);
    text-align: center;
    word-break: break-word;
}

.comment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-time {
    font-size: 0.7rem;
    color: var(--c-neon-dim);
    border-bottom: 1px dashed var(--c-steel-border);
    padding-bottom: 2px;
}

.comment-content p {
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--c-text-main);
}

/* --- Dynamic Image Sizing --- */
.avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Interactive Contact Modals --- */
.contact-links li {
    cursor: pointer;
    transition: color 0.15s ease, text-shadow 0.15s ease;
    user-select: none;
}

.contact-links li:hover {
    color: #ffffff;
    text-shadow: 0 0 6px #ffffff;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    width: 380px;
    background: var(--c-steel-dark);
    border: 2px solid var(--c-neon-green);
    box-shadow: 0 0 15px var(--c-neon-glow);
    padding: 2px;
}

.modal-header {
    background: linear-gradient(180deg, #3a414e 0%, #1d2128 100%);
    color: #ffffff;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--c-steel-border);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--c-neon-green);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #ffffff;
    text-shadow: 0 0 6px #ffffff;
}

.modal-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-body label {
    font-size: 0.75rem;
    color: var(--c-neon-dim);
    text-transform: uppercase;
    font-weight: bold;
}

.modal-body input,
.modal-body textarea {
    width: 100%;
    padding: 6px 8px;
    background: #08090c;
    border: 1px solid var(--c-steel-border);
    color: var(--c-neon-green);
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
}

.modal-action-btn {
    background: linear-gradient(180deg, #2b313d 0%, #15181e 100%);
    color: var(--c-neon-green);
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 0.8rem;
    border: 1px solid var(--c-steel-border);
    padding: 8px;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 4px;
    box-shadow: 0 0 4px var(--c-neon-glow);
    transition: all 0.2s ease;
}

.modal-action-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 0 12px #ffffff, 0 0 20px rgba(255, 255, 255, 0.8);
}

/* UNIVERSAL RETROSPACE TOP BAR */
.retro-top-bar {
    width: 100%;
    background: #000000;
    border-bottom: 2px solid #00f0ff;
    box-shadow: 0 2px 10px rgba(0, 240, 255, 0.3);
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.retro-top-bar .brand {
    color: #ffffff;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-shadow: 0 0 5px #00f0ff;
}

.retro-top-bar ul.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 14px;
}

.retro-top-bar ul.nav-menu a {
    color: #39ff6a;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

.retro-top-bar ul.nav-menu a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px #39ff6a;
}