:root {
    /* -- UI 参数调整区域 -- */
    --font-primary: 'Orbitron', 'Roboto', sans-serif;
    --font-secondary: 'Roboto', sans-serif;

    /* 颜色主题 */
    --primary-color-rgb: 0, 255, 255;
    --primary-color: rgb(var(--primary-color-rgb));
    --secondary-color-rgb: 255, 0, 255;
    --secondary-color: rgb(var(--secondary-color-rgb));
    --accent-color-rgb: 50, 255, 50;
    --accent-color: rgb(var(--accent-color-rgb));

    /* 背景与元素透明度 */
    --bg-dark-rgb: 10, 20, 30;
    --bg-dark: rgb(var(--bg-dark-rgb));
    --bg-overlay-opacity: 0.3;
    --element-bg-opacity: 0.15;
    --element-border-opacity: 0.4;
    --element-hover-bg-opacity: 0.3;
    --element-hover-border-opacity: 0.7;

    /* 文本颜色 */
    --text-color-light: #E0E0E0;
    --text-color-medium: #A0A0A0;
    --text-color-dark: #707070;

    /* 布局与间距 (用户已调整部分值) */
    --header-height: 120px; /* 桌面顶栏高度 - 用户调整值 */
    --avatar-size: 180px;   /* 头像大小 - 用户调整值 */
    --button-padding: 10px 20px;
    --card-padding: 20px;
    --grid-gap: 20px;
    --border-radius-small: 5px;
    --border-radius-medium: 8px;
    --border-radius-large: 12px;

    /* 动画与过渡 */
    --transition-speed-fast: 0.2s;
    --transition-speed-normal: 0.4s;

    /* 新增：文本描边变量 */
    --text-outline-color: rgba(0, 0, 0, 0.7); /* 描边颜色：半透明黑色 */
    --text-outline-base:
        -1px -1px 0 var(--text-outline-color),  
         1px -1px 0 var(--text-outline-color),
        -1px  1px 0 var(--text-outline-color),
         1px  1px 0 var(--text-outline-color),
        -1px  0   0 var(--text-outline-color),
         1px  0   0 var(--text-outline-color),
         0   -1px 0 var(--text-outline-color),
         0    1px 0 var(--text-outline-color); /* 8方向描边，形成近似1px轮廓 */
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-dark);
    color: var(--text-color-light);
    margin: 0;
    padding-top: var(--header-height); /* 为固定头部留出空间 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
    transition: background-image var(--transition-speed-normal) ease-in-out;
    text-shadow: var(--text-outline-base); /* 为body内默认文本添加描边 */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(var(--bg-dark-rgb), var(--bg-overlay-opacity));
    z-index: -1;
}

/* Common styles for username text variants */
.username-text,
.username-side-text {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--text-color-light);
    text-shadow: var(--text-outline-base), 0 0 8px rgba(var(--primary-color-rgb), 0.7); /* 描边 + 原有辉光 */
}

/* Common font and weight for other primary text elements */
.cyber-button,
.main-title,
.card-title {
    font-family: var(--font-primary);
    font-weight: 700;
}

/* --- 头部样式 --- */
.cyber-header {
    background-color: rgba(var(--bg-dark-rgb), var(--element-bg-opacity));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--primary-color-rgb), var(--element-border-opacity));
    box-shadow: 0 2px 10px rgba(var(--primary-color-rgb), 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex; /* Ensure header itself is a flex container to center its content horizontally */
    align-items: center;
    padding: 0 5%; 
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px; /* Max width for header content */
    margin: 0 auto; /* Center header content within .cyber-header */
    position: relative; 
    height: var(--header-height);
}

.profile-area {
    position: relative; 
    min-width: var(--avatar-size); 
}

.avatar-container {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(var(--primary-color-rgb), var(--element-border-opacity));
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.3);
    transition: transform var(--transition-speed-fast) ease, box-shadow var(--transition-speed-fast) ease;
    position: absolute;
    /* 用户直接调整的定位值 */
    top: calc(var(--header-height) - (var(--avatar-size) / 2) - 60px); 
    left: 50px; 
    z-index: 1;
}

.avatar-container:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(var(--primary-color-rgb), 0.5);
}

#avatar-img, #avatar-initials {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--avatar-size) * 0.4);
    color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.1);
    transition: opacity var(--transition-speed-fast) ease-in-out;
}

.username-text {
    font-size: 1.6em;
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0 5px;
    width: auto;
    /* Will be hidden in tablet/mobile */
}

/* 新增：默认隐藏侧边文字块 */
.username-side-text {
    display: none;
    align-self: center; /* 用于在Grid单元格内垂直居中 */
}

.controls {
    display: flex;
    gap: 15px;
}

.cyber-button {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid rgba(var(--primary-color-rgb), var(--element-border-opacity));
    padding: var(--button-padding);
    border-radius: var(--border-radius-medium);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed-normal) ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(var(--primary-color-rgb), 0.3), inset 0 0 5px rgba(var(--primary-color-rgb), 0.2);
    text-shadow: var(--text-outline-base); /* 为按钮文字添加描边 */
}

.cyber-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(var(--primary-color-rgb), 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width var(--transition-speed-normal) ease, height var(--transition-speed-normal) ease;
    z-index: -1;
}

.cyber-button:hover {
    background-color: rgba(var(--primary-color-rgb), var(--element-hover-bg-opacity));
    border-color: rgba(var(--primary-color-rgb), var(--element-hover-border-opacity));
    color: var(--text-color-light);
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.6), inset 0 0 10px rgba(var(--primary-color-rgb), 0.4);
}

.cyber-button:hover::before {
    width: 200%;
    height: 200%;
}

.cyber-button.disabled {
    color: var(--text-color-medium);
    border-color: rgba(var(--text-color-medium), var(--element-border-opacity));
    cursor: not-allowed;
    box-shadow: none;
}

.cyber-button.disabled::before {
    width: 0;
    height: 0;
}

/* --- 主内容区域 --- */
.main-content {
    padding: 40px 5%; 
    max-width: 1400px;
    margin: 0 auto;
    text-align: center; /* 使 inline-block 的 .main-title 居中 */
}

.main-title {
    font-size: 2.8em;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 60px;
    margin-top: calc(var(--avatar-size) / 2.5); 
    letter-spacing: 2px;
    padding: 20px 35px;
    border: 2px solid rgba(var(--primary-color-rgb), 0.5);
    border-radius: var(--border-radius-medium);
    background-color: rgba(var(--bg-dark-rgb), 0.4);
    display: inline-block; 
    position: relative; 
    max-width: 80%; 
    box-sizing: border-box; 
    animation: continuous-glow-border 4s infinite linear;
}

.main-title::before, .main-title::after {
    content: none; 
}

@keyframes continuous-glow-border {
    0% {
        border-color: rgba(var(--primary-color-rgb), 0.9);
        box-shadow: 
            0 0 15px rgba(var(--primary-color-rgb), 0.4),
            0 0 25px rgba(var(--primary-color-rgb), 0.3),
            0 0 35px rgba(var(--secondary-color-rgb), 0.25),
            inset 0 0 12px rgba(var(--primary-color-rgb), 0.2);
    }
    25% {
        border-color: rgba(var(--secondary-color-rgb), 0.7);
        box-shadow: 
            0 0 20px rgba(var(--secondary-color-rgb), 0.4),
            0 0 30px rgba(var(--secondary-color-rgb), 0.3),
            0 0 40px rgba(var(--primary-color-rgb), 0.25),
            inset 0 0 15px rgba(var(--secondary-color-rgb), 0.2);
    }
    50% {
        border-color: rgba(var(--primary-color-rgb), 0.6);
        box-shadow: 
            0 0 12px rgba(var(--primary-color-rgb), 0.3),
            0 0 20px rgba(var(--primary-color-rgb), 0.25),
            0 0 30px rgba(var(--secondary-color-rgb), 0.2),
            inset 0 0 10px rgba(var(--primary-color-rgb), 0.15);
    }
    75% {
        border-color: rgba(var(--secondary-color-rgb), 0.9);
        box-shadow: 
            0 0 25px rgba(var(--secondary-color-rgb), 0.45),
            0 0 35px rgba(var(--secondary-color-rgb), 0.35),
            0 0 45px rgba(var(--primary-color-rgb), 0.3),
            inset 0 0 18px rgba(var(--secondary-color-rgb), 0.25);
    }
    100% {
        border-color: rgba(var(--primary-color-rgb), 0.9);
        box-shadow: 
            0 0 15px rgba(var(--primary-color-rgb), 0.4),
            0 0 25px rgba(var(--primary-color-rgb), 0.3),
            0 0 35px rgba(var(--secondary-color-rgb), 0.25),
            inset 0 0 12px rgba(var(--primary-color-rgb), 0.2);
    }
}

.title-text-gradient {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 6px rgba(var(--primary-color-rgb), 0.3), 0 0 3px rgba(var(--secondary-color-rgb), 0.25);
    display: block;
}

/* --- 卡片网格布局 --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 允许多个卡片自适应排列 */
    /* justify-content: center; /* 当卡片不足以填满一行时，网格本身会居中。如果希望单元格内容居中，则用 justify-items */
    gap: var(--grid-gap);
}

.card {
    background-color: rgba(var(--card-bg-rgb, var(--bg-dark-rgb)), var(--element-bg-opacity));
    border: 1px solid rgba(var(--primary-color-rgb), var(--element-border-opacity));
    border-radius: var(--border-radius-large);
    padding: var(--card-padding);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all var(--transition-speed-normal) ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.card:hover {
    transform: translateY(-10px) scale(1.03);
    background-color: rgba(var(--card-bg-rgb, var(--bg-dark-rgb)), var(--element-hover-bg-opacity));
    border-color: rgba(var(--primary-color-rgb), var(--element-hover-border-opacity));
    box-shadow: 0 10px 30px rgba(var(--primary-color-rgb), 0.3);
}

.card-title {
    font-size: 1.5em;
    color: var(--text-color-light);
    margin: 0 0 10px 0;
    text-shadow: var(--text-outline-base); /* 为卡片标题添加描边 */
}

.card-description {
    font-size: 0.95em;
    color: var(--text-color-medium);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    text-shadow: var(--text-outline-base); /* 为卡片描述文字添加描边 */
}

/* --- 页脚样式 --- */
.cyber-footer {
    background-color: rgba(var(--bg-dark-rgb), calc(var(--element-bg-opacity) * 1.5) );
    border-top: 1px solid rgba(var(--primary-color-rgb), calc(var(--element-border-opacity) * 0.5));
    padding: 20px 5%;
    text-align: center;
    font-size: 0.9em;
    color: var(--text-color-medium);
    margin-top: 50px;
    /* 页脚内的 p 和 a 标签将通过下面的独立规则或继承body的描边 */
}

.cyber-footer p {
    /* 继承body的text-shadow或按需单独设置 */
    text-shadow: var(--text-outline-base);
}

.cyber-footer a {
    color: var(--text-color-medium);
    text-decoration: none;
    transition: color var(--transition-speed-fast) ease;
    text-shadow: var(--text-outline-base); /* 为页脚链接文字添加描边 */
}

.cyber-footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* --- Background Loader --- */
.background-loader-hidden {
    display: none !important;
}

#background-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(var(--bg-dark-rgb), 0.9);
    color: var(--text-color-light);
    padding: 20px 30px;
    border-radius: var(--border-radius-medium);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(var(--primary-color-rgb), var(--element-border-opacity));
    box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.2);
}

#background-loader .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(var(--primary-color-rgb), 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#background-loader p {
    margin: 0;
    font-family: var(--font-secondary);
    font-size: 1em;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
} 

/* --- 响应式调整 --- */

/* 平板电脑视图 */
@media (max-width: 1024px) {
    :root {
        --header-height-tablet: 300px; /* 用户已调整 */
        --avatar-size-tablet: 200px;   /* 用户已调整 */
        --username-side-font-size-tablet: 1.2em; 
    }

    body {
        padding-top: var(--header-height-tablet); 
    }

    .cyber-header {
        height: var(--header-height-tablet); /* 确保使用新高度 */
    }

    .header-content {
        display: grid; 
        grid-template-columns: 1fr auto 1fr; 
        grid-template-rows: auto auto;    
        align-items: center; 
        align-content: center; /* 新增：使两行内容在增高的头部内垂直居中 */
        gap: 0 15px; 
        height: 100%; 
    }

    .username-text { /* 原桌面用户名，在平板隐藏 */
        display: none; 
    }
    .username-side-text { /* 新的左右文字块，在平板显示 */
        display: block; 
        font-size: var(--username-side-font-size-tablet);
        white-space: nowrap; 
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #username-left-block {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        text-align: right;
        padding-right: 15px;
    }

    .profile-area {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        position: relative; 
        min-width: var(--avatar-size-tablet); 
        justify-self: center; 
        display: flex; 
        align-items: center;
        justify-content: center;
    }

    .avatar-container {
        position: relative; 
        top: 0; 
        left: 0; 
        transform: none; 
        width: var(--avatar-size-tablet);
        height: var(--avatar-size-tablet);
    }

    #username-right-block {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        text-align: left;
        padding-left: 15px;
    }

    .controls {
        grid-column: 1 / -1; /* 跨越所有列 */
        grid-row: 2 / 3;
        display: flex;
        justify-content: center;
        gap: 15px; /* 平板按钮间距 */
        padding-top: 15px; 
        position: relative; 
        top: -2px;          
        left: 4px;           
    }
    
    .main-title {
        font-size: 2.8em; /* 从2.4em缩小字体 */
        margin-top: 40px; 
        padding: 20px 25px; /* 保持上次调整的内边距 */
        letter-spacing: 1px; /* 保持上次调整的字间距 */
        /* max-width 继承自桌面或全局，可按需调整 */
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

/* 手机视图 */
@media (max-width: 767px) {
    :root {
        --header-height-mobile: 220px; /* 从220px再增加30px */
        --avatar-size-mobile: 120px;   
        --button-padding: 6px 10px; 
        --username-side-font-size-mobile: 1em; 
    }

    body {
        padding-top: var(--header-height-mobile); 
    }

    .cyber-header {
        padding: 0 10px; 
        height: var(--header-height-mobile);
    }

    .header-content {
        display: grid; 
        grid-template-columns: 1fr auto 1fr; 
        grid-template-rows: auto auto;    
        align-items: center; 
        align-content: center; /* 新增：使两行内容在增高的头部内垂直居中 */
        gap: 0 10px; 
        height: 100%; 
    }

    .username-text { /* 原桌面用户名 */
        display: none; 
    }
    .username-side-text { /* 新的左右文字块 */
        display: block; 
        font-size: var(--username-side-font-size-mobile);
        white-space: nowrap; 
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #username-left-block {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        text-align: right;
        padding-right: 10px;
    }

    .profile-area {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        position: relative; /* 头像容器依然是相对于它 */
        min-width: var(--avatar-size-mobile); 
        justify-self: center; 
        display: flex; /* 用于内部头像容器居中 */
        align-items: center;
        justify-content: center;
    }

    .avatar-container {
        position: relative; /* 不再是绝对定位进行布局 */
        top: 0; /* 重置 top */
        left: 0; /* 重置 left */
        transform: none; /* 重置 transform，因为不再是绝对定位居中 */
        width: var(--avatar-size-mobile);
        height: var(--avatar-size-mobile);
        /* 如果需要头像向下突出，可以给 .profile-area 加 padding-bottom 或给 .controls 加 margin-top */
    }

    #username-right-block {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        text-align: left;
        padding-left: 10px;
    }

    .controls {
        grid-column: 1 / -1; /* 跨越所有列 */
        grid-row: 2 / 3;
        display: flex;
        justify-content: center;
        gap: 10px; 
        padding-top: 10px; /* 与上方头像/文字行的间距 */
    }
    
    .cyber-button {
        font-size: 0.8em; 
        letter-spacing: 0.5px;
        /* padding var(--button-padding) 已在 :root 中定义 */
    }

    .main-title {
        font-size: 1.5em; 
        padding: 10px 15px; 
        margin-top: 10px; 
        margin-bottom: 30px; /* 从20px再减少20px，使下方卡片进一步上移 */
        max-width: 90%; 
    }

    .cards-grid {
        grid-template-columns: 1fr; 
        gap: 12px; /* 可以略微减小卡片间距 */
    }

    .card {
        padding: 10px; 
        display: flex; /* 保持flex布局 */
        flex-direction: column; /* 保持列方向 */
        align-items: center; /* 保持水平居中其内容 */
        text-align: center; /* 保持文本水平居中 */
        justify-content: center; /* 新增：使卡片内容（标题和描述块）在卡片内垂直居中 */
        /* flex-grow: 1; /* 移除或注释掉继承自桌面的 flex-grow，以允许垂直居中 */
    }

    .card-title {
        font-size: 1.1em; 
        margin-bottom: 8px; 
        flex-grow: 0; /* 确保标题不参与flex-grow的计算，如果之前有的话 */
    }

    .card-description {
        font-size: 0.8em; 
        margin-bottom: 0; /* 移除底部边距，因为整体垂直居中 */
        line-height: 1.5; 
        flex-grow: 0; /* 确保描述不参与flex-grow的计算 */
    }
}

/* --- Profile Page Specific Styles --- */
.profile-details-container {
    background-color: rgba(var(--bg-dark-rgb), 0.5);
    border: 1px solid rgba(var(--primary-color-rgb), var(--element-border-opacity));
    border-radius: var(--border-radius-large);
    padding: var(--card-padding);
    margin-top: 20px; /* 与 main-title 的间距 */
    text-align: left; /* 内容左对齐 */
    /* profile-details-container 内的 p, strong, a 将通过下面的独立规则应用描边 */
}

.profile-section {
    margin-bottom: 30px;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.content-subtitle {
    font-family: var(--font-primary);
    font-size: 1.8em; /* 略大于卡片标题 */
    color: var(--primary-color);
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.3);
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-shadow: var(--text-outline-base), 0 0 5px rgba(var(--primary-color-rgb), 0.5); /* 描边 + 原有辉光 */
}

.profile-details-container p {
    font-size: 1em;
    color: var(--text-color-light);
    line-height: 1.7;
    margin-bottom: 15px;
    text-shadow: var(--text-outline-base); /* 为profile页段落文字添加描边 */
}

.profile-details-container strong {
    color: var(--text-color-light);
    font-weight: bold;
    text-shadow: var(--text-outline-base); /* 为profile页strong文字添加描边 */
}

.profile-details-container a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed-fast) ease, text-shadow var(--transition-speed-fast) ease;
    /* profile页链接文字描边通过继承 profile-details-container p text-shadow (如果 a 在 p 内) 或单独设置 */
    /* 为了确保一致性，也给它单独加上 */
    text-shadow: var(--text-outline-base);
}

.profile-details-container a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(var(--secondary-color-rgb), 0.7);
}

.eyra-section p {
    font-style: italic;
    color: var(--text-color-medium); /* Eyra的文字颜色可以略微不同 */
}

/* Styling for blog post metadata (date, author) */
.post-meta {
    font-size: 0.85em;
    color: var(--text-color-medium);
    margin-bottom: 15px; 
    display: block;
    text-shadow: var(--text-outline-base);
}

/* Styling for blockquotes */
.cyber-blockquote {
    border-left: 3px solid var(--primary-color);
    margin: 20px 0;
    padding: 10px 20px;
    background-color: rgba(var(--primary-color-rgb), 0.05);
    border-radius: var(--border-radius-small);
    font-style: italic;
}

.cyber-blockquote p {
    margin-bottom: 0; /* Remove default paragraph margin inside blockquote if not desired */
    color: var(--text-color-light); /* Ensure text color contrasts with quote background */
    /* text-shadow will be inherited from .profile-details-container p or body */
}

.profile-actions {
    text-align: center; /* 按钮居中 */
    margin-top: 40px;
}

/* --- Message Board Specific Styles --- */
.messageboard-area {
    /* profile-details-container is already used, so shared styles apply.
       Add specific overrides if needed, e.g., max-width or padding */
}

.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cyber-form div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cyber-form label {
    font-family: var(--font-primary);
    color: var(--primary-color);
    font-size: 1em;
    text-shadow: var(--text-outline-base);
}

.cyber-form input[type="text"],
.cyber-form textarea {
    background-color: rgba(var(--bg-dark-rgb), calc(var(--element-bg-opacity) * 2));
    border: 1px solid rgba(var(--primary-color-rgb), var(--element-border-opacity));
    border-radius: var(--border-radius-small);
    padding: 12px;
    color: var(--text-color-light);
    font-family: var(--font-secondary);
    font-size: 0.95em;
    transition: border-color var(--transition-speed-fast) ease, box-shadow var(--transition-speed-fast) ease;
    text-shadow: var(--text-outline-base);
}

.cyber-form input[type="text"]::placeholder,
.cyber-form textarea::placeholder {
    color: var(--text-color-dark);
    opacity: 0.8;
}

.cyber-form input[type="text"]:focus,
.cyber-form textarea:focus {
    outline: none;
    border-color: rgba(var(--primary-color-rgb), var(--element-hover-border-opacity));
    box-shadow: 0 0 8px rgba(var(--primary-color-rgb), 0.3);
}

#message-list-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px; /* Limit height and allow scrolling */
    overflow-y: auto; /* Add scrollbar if content overflows */
    padding-right: 10px; /* Space for scrollbar */
}

.cyber-message-item {
    background-color: rgba(var(--bg-dark-rgb), var(--element-bg-opacity));
    border: 1px solid rgba(var(--primary-color-rgb), var(--element-border-opacity));
    border-radius: var(--border-radius-medium);
    padding: 15px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), calc(var(--element-border-opacity) * 0.5));
    padding-bottom: 8px;
}

.message-item-author {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1em;
    text-shadow: var(--text-outline-base), 0 0 3px rgba(var(--primary-color-rgb),0.4);
}

.message-item-time {
    font-size: 0.8em;
    color: var(--text-color-medium);
    text-shadow: var(--text-outline-base);
}

.message-item-content {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--text-color-light);
    word-wrap: break-word; /* Ensure long words don't overflow */
    white-space: pre-wrap; /* Respect newlines from textarea */
    text-shadow: var(--text-outline-base);
}

.message-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
}

.cyber-button.small-button {
    padding: 6px 12px;
    font-size: 0.8em;
    letter-spacing: 0.5px;
}

.cyber-button.like-button {
    /* Specific styles for like button if needed, e.g., color, icon */
}

.cyber-button.delete-button {
    border-color: rgba(var(--secondary-color-rgb), var(--element-border-opacity));
    color: var(--secondary-color);
}

.cyber-button.delete-button:hover {
    background-color: rgba(var(--secondary-color-rgb), var(--element-hover-bg-opacity));
    border-color: rgba(var(--secondary-color-rgb), var(--element-hover-border-opacity));
    color: var(--text-color-light);
    box-shadow: 0 0 15px rgba(var(--secondary-color-rgb), 0.6), inset 0 0 10px rgba(var(--secondary-color-rgb), 0.4);
}

.message-empty-state {
    text-align: center;
    color: var(--text-color-medium);
    font-style: italic;
    padding: 30px 0;
    font-size: 1.1em;
    text-shadow: var(--text-outline-base);
}

/* --- 主题定义 --- */

/* Theme 1: Cyberpunk (Default - :root variables apply) */
/* 确保 :root 中的颜色变量是您期望的赛博朋克默认主题 */

/* Theme 2: Solar Flare */
body.theme-solar-flare {
    /* 颜色 (活力橙、黄、深红，暗暖背景) */
    --primary-color-rgb: 255, 120, 0;      /* 主色: 鲜艳的橙色 */
    --secondary-color-rgb: 255, 50, 50;     /* 次色: 强调的红色 */
    --accent-color-rgb: 255, 200, 0;       /* 点缀色: 明亮的黄色 */

    --bg-dark-rgb: 30, 10, 5;           /* 背景: 非常深的暖棕色/暗红色 */
    /* --bg-overlay-opacity: 0.1; */     /* 可以调整背景遮罩透明度 */
    
    --element-bg-opacity: 0.2;          /* 元素背景透明度 (可略高于赛博朋克) */
    --element-border-opacity: 0.5;
    --element-hover-bg-opacity: 0.35;
    --element-hover-border-opacity: 0.8;

    --text-color-light: #FFEFD5;        /* 亮文本: 类似木瓜色或非常浅的橙色 */
    --text-color-medium: #FFA07A;       /* 中等文本: 亮珊瑚色 */
    --text-color-dark: #CD5C5C;         /* 暗文本: 印度红 */

    /* 可以考虑调整辉光效果的颜色，例如按钮或标题动画 */
    /* 例如，在 .main-title 的动画中，辉光可以偏向黄色和橙色 */
}

/* Theme 3: Abyssal Depths */
body.theme-abyssal-depths {
    /* 颜色 (深蓝、青、暗紫，暗冷背景) */
    --primary-color-rgb: 0, 120, 255;     /* 主色: 饱和的蓝色 */
    --secondary-color-rgb: 70, 0, 200;    /* 次色: 深紫色 */
    --accent-color-rgb: 0, 200, 200;      /* 点缀色: 青色/蓝绿色 */

    --bg-dark-rgb: 5, 10, 25;           /* 背景: 非常深的冷蓝色 */
    /* --bg-overlay-opacity: 0.2; */

    --element-bg-opacity: 0.18;
    --element-border-opacity: 0.45;
    --element-hover-bg-opacity: 0.3;
    --element-hover-border-opacity: 0.75;

    --text-color-light: #D0E0FF;        /* 亮文本: 非常浅的淡蓝色 */
    --text-color-medium: #809FFF;       /* 中等文本: 淡蓝色 */
    --text-color-dark: #5070B0;         /* 暗文本: 深蓝灰色 */
}

/* Immersive Mode Styles - START */
body.immersive-active .main-content, /* For index, messageboard, eyra_blog, profile */
body.immersive-active .ryo-main-content, /* For ryo_consciousness.html */
body.immersive-active .cyber-footer, /* For all pages */
body.immersive-active .profile-details-container, /* Specific containers if not covered by main-content */
body.immersive-active .content-section, 
body.immersive-active .messageboard-area,
body.immersive-active .ryo-graphical-data /* Ensure charts section also fades */
{
    opacity: 0.05; /* Very faint, adjust as desired */
    transition: opacity 0.4s ease-in-out;
    pointer-events: none; /* Prevent interaction with faded content */
}

body.immersive-active .cyber-header {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    transition: background-color 0.4s ease-in-out, backdrop-filter 0.4s ease-in-out, border-bottom 0.4s ease-in-out, box-shadow 0.4s ease-in-out; /* Added transition for header transparency */
}
/* Immersive Mode Styles - END */ 