/* 页面基本样式 */
.page-body {
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
}

.page-body.friends-page {
    background-image: url(../images/alliance-bg.jpg);
}

.page-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* 导航栏样式 */
.ninja-nav {
    background: var(--card-bg);
    padding: 1rem 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 20px;
    z-index: 10;
}

.back-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

.ninja-nav h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* 内容区域样式 */
.content-area {
    display: grid;
    gap: 2rem;
}

/* 忍者卡片样式 */
.ninja-card {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 2rem;
    color: var(--text-color);
}

.ninja-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* 个人资料卡片样式 */
.profile-card {
    display: flex;
    gap: 2rem;
    align-items: start;
}

.profile-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.3);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item .label {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.info-item .value {
    font-size: 1.1rem;
}

/* 技能列表样式 */
.skills-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}

.skills-list li {
    display: grid;
    gap: 0.5rem;
}

.skill-name {
    color: var(--accent-color);
}

.skill-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.skill-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--primary-color);
    width: var(--value);
    transition: width 1s ease;
}

/* 兴趣爱好列表样式 */
.hobbies-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.hobby-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.hobby-item:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.4);
}

.hobby-icon {
    font-size: 2rem;
    background: rgba(255, 69, 0, 0.2);
    padding: 1rem;
    border-radius: 50%;
}

.hobby-content {
    flex: 1;
}

.hobby-content h3 {
    color: var(--accent-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.hobby-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 文章列表样式 */
.scrolls-grid {
    display: grid;
    gap: 2rem;
    padding: 1rem;
}

.article-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-clickable-area {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.article-clickable-area:hover {
    opacity: 0.8;
}

.article-header {
    margin-bottom: 1rem;
}

.article-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.article-header h2 a {
    color: inherit;
    text-decoration: none;
}

.article-header h2 a:hover {
    text-decoration: underline;
}

.article-date {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.article-excerpt {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-tag {
    background: var(--primary-color);
    color: var(--text-color);
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: default;
    transition: background-color 0.3s ease;
}

.article-tag:hover {
    background: var(--accent-color);
}

/* 搜索框样式 */
.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box input {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.search-box select {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    cursor: pointer;
}

.search-box button {
    padding: 0.5rem 2rem;
    background: var(--primary-color);
    border: none;
    border-radius: 5px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background: var(--secondary-color);
}

/* 明亮模式样式 */
:root[data-theme="light"] .search-box input::placeholder {
    color: #888888;
}

:root[data-theme="light"] .ninja-card,
:root[data-theme="light"] .section-card,
:root[data-theme="light"] .article-card,
:root[data-theme="light"] .article-detail {
    background: linear-gradient(135deg, #f6f0ff 80%, #e9dafe 100%);
    box-shadow: 0 4px 16px 0 rgba(180, 120, 220, 0.10);
    border: 1.5px solid #d1b6f7;
    backdrop-filter: blur(2px);
}

:root[data-theme="light"] .search-box input,
:root[data-theme="light"] .search-box select {
    background: linear-gradient(135deg, #f6f0ff 80%, #e9dafe 100%);
    border: 1.5px solid #d1b6f7;
    color: #222;
    box-shadow: 0 2px 8px 0 rgba(180, 120, 220, 0.08);
}

/* 文章详情页样式 */
.article-detail {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    margin: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
}

.article-content {
    color: var(--text-color);
    line-height: 1.8;
}

.article-content h2 {
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1rem 0;
}

.share-btn {
    margin-top: 0.7rem;
    padding: 0.4rem 1.2rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: inline-block;
}

.share-btn:hover {
    background: var(--secondary-color);
}

.share-tip {
    display: inline-block;
    margin-left: 0.7rem;
    color: #fff;
    background: #4caf50;
    border-radius: 4px;
    padding: 0.2rem 0.7rem;
    font-size: 0.95rem;
    vertical-align: middle;
    animation: fadeInOut 1.2s;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-body {
        padding: 10px;
    }

    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar {
        width: 150px;
        height: 150px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(30, 30, 40, 0.85);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.3s;
}
.image-modal[style*="display: flex"] {
    display: flex !important;
}
.image-modal .modal-content {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    background: #fff;
    object-fit: contain;
}
.image-modal .modal-caption {
    color: #fff;
    margin-top: 1.2rem;
    font-size: 1.1rem;
    text-align: center;
    text-shadow: 0 2px 8px #222;
}
.image-modal .close-modal {
    position: absolute;
    top: 32px;
    right: 48px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.image-modal .close-modal:hover {
    color: #ff6b81;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.2rem;
    justify-items: center;
    align-items: start;
    margin: 2.5rem 0;
}

.media-item img,
.media-item video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    background: #f5f5f5;
    transition: transform 0.3s;
    display: block;
}

.media-item.video-item {
    max-width: 480px;
}

.media-item.video-item video {
    background: #000;
    min-height: 270px;
}

.media-item img:hover,
.media-item video:hover {
    transform: scale(1.05);
}

.media-item {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.2rem 1rem 1.1rem 1rem;
    transition: box-shadow 0.3s;
}
.media-item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.media-info {
    width: 100%;
    text-align: center;
    margin-top: 0.8rem;
}

.img-small {
    max-height: unset !important;
}

.message-card {
    background: rgba(255,255,255,0.85);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1.5px solid rgba(120,120,180,0.10);
    margin-bottom: 1.5rem;
    padding: 1.2rem 1.2rem 0.8rem 1.2rem;
    color: var(--text-color);
    transition: background 0.3s, box-shadow 0.3s;
}

:root[data-theme="light"] .message-card {
    background: linear-gradient(135deg, #fff 80%, #f6f0ff 100%);
    border: 1.5px solid #d1b6f7;
    color: #222;
    box-shadow: 0 4px 16px 0 rgba(180, 120, 220, 0.10);
}

:root:not([data-theme="light"]) .message-card {
    background: var(--card-bg);
    border-radius: 10px;
    color: var(--text-color);
    box-shadow: var(--card-shadow);
    border: none;
    padding: 1.5rem;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--primary-color);
}

.message-content {
    font-size: 1.08rem;
    line-height: 1.7;
    color: inherit;
    word-break: break-all;
}

.friend-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}
.friend-form input {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: 1.5px solid #d1b6f7;
    font-size: 1rem;
}
.friend-form button {
    padding: 0.5rem 2rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}
.friend-form button:hover {
    background: var(--secondary-color);
}
.friend-link {
    background: rgba(255,255,255,0.85);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1.5px solid #d1b6f7;
    margin-bottom: 1.2rem;
    padding: 1.2rem 1.2rem 0.8rem 1.2rem;
    transition: box-shadow 0.3s;
}
.friend-link a {
    text-decoration: none;
    color: var(--primary-color);
}
.friend-link h3 {
    margin: 0 0 0.5rem 0;
}
.friend-link p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

:root:not([data-theme="light"]) .friend-link {
    background: var(--card-bg);
    border-radius: 10px;
    color: var(--text-color);
    box-shadow: var(--card-shadow);
    border: none;
    padding: 1.5rem;
} 