/* 首页样式：先引入共用 layout，再写首页专用（侧栏、卡片、弹窗、响应式等） */
@import url("./layout.css");

/* ========== 以下为首页 index.html 专用，文章页不加载 ========== */

/* 顶部登录/注册栏（右上角悬浮，大一点） */
.topbar {
    position: fixed;
    top: 14px;
    right: 24px;
    z-index: 10001;
}

.topbar-right {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid rgba(0, 212, 255, 0.6);
    font-size: 0.98rem;
    color: var(--text-secondary);
}

.topbar-user i {
    color: var(--primary-color);
}

.topbar-btn {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.topbar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.35);
}

.topbar-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

/* 左侧边栏 */
.sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: fadeInLeft 1s ease-out;
    background: var(--surface-soft);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.avatar-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--border-color);
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
    margin-bottom: 25px;
}

.avatar-wrapper:hover {
    transform: scale(1.02);
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    object-fit: cover;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 40px var(--glow-color), 0 0 80px var(--glow-accent);
    transition: all 0.3s ease;
}

.avatar-wrapper:hover .avatar {
    box-shadow: 0 0 60px var(--glow-color), 0 0 120px var(--glow-accent);
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.name {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
}

.title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0;
    text-align: center;
    line-height: 1.5;
}

.update-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
    text-align: center;
    opacity: 0.9;
}

.site-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
    text-align: center;
    opacity: 0.9;
}

/* 简介按钮 */
.intro-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 14px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4), 0 0 30px rgba(0, 212, 255, 0.2);
    display: block;
    position: relative;
    overflow: hidden;
}

.intro-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.intro-btn:hover::before {
    left: 100%;
}

.intro-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.3);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* 社交链接 */
.social-links {
    width: 100%;
    margin-bottom: 25px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.social-link:hover::before {
    transform: scaleY(1);
}

.social-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
    transform: translateX(5px);
}

.social-link i {
    font-size: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.social-link:hover i {
    transform: scale(1.15) rotate(5deg);
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    padding: 15px 20px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: left;
    font-weight: 500;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 153, 204, 0.15));
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

/* 内容区域 */
.content {
    flex: 1;
    min-height: 500px;
    animation: fadeIn 0.8s ease-in;
    padding-top: 20px;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: left;
    color: var(--text-primary);
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

/* 旧的 .section-title 图标样式（针对 <i>）已不再使用，保留空规则避免影响当前基于 Unicode 的标题 */
.section-title i {
}

/* 首页栏目 */
.home-welcome {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.6;
}

.home-block {
    margin-bottom: 50px;
}

.home-block:last-child {
    margin-bottom: 0;
}

.home-block-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.home-block-title i {
    margin-right: 10px;
}

/* 洛谷题解（与文章栏目共用 .article-list .article-card 样式） */
.luogu-empty-card {
    cursor: default;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.card-icon i {
    font-size: 3rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 5px 12px;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* 可选：文章卡片使用封面图片作为背景
   用法示例（在 index.php）：
   <article class="article-card article-card--image" style="--card-cover-image: url('./image/article-3-cover.jpg');">
*/
.article-card--image {
    background-color: var(--card-bg);
    background-image: var(--card-cover-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 若需要蒙版可在此添加 .article-card--image::after 样式，当前默认不加蒙版，直接显示原图 */

.article-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.article-card:hover::before {
    transform: scaleY(1);
}

.article-card:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 30px rgba(0, 212, 255, 0.2);
}

.article-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.article-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.article-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 留言评论区（更亮、更明显） */
.comments-section {
    max-width: 820px;
    margin-top: 40px;
}

.comment-success {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1rem;
}

.comment-success i {
    margin-right: 8px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 28px;
    margin-bottom: 32px;
}

.comment-item {
    position: relative;
    background: radial-gradient(circle at top left, rgba(0, 212, 255, 0.18), var(--surface-solid));
    border: 1px solid rgba(0, 212, 255, 0.7);
    border-radius: 18px;
    padding: 22px 22px 20px 22px;
    backdrop-filter: blur(14px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.comment-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 4px;
    height: calc(100% - 28px);
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    opacity: 0.85;
}

.comment-item:hover {
    transform: translateY(-3px);
    border-color: #00e5ff;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.35);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-nickname {
    font-weight: 650;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.comment-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 40px 20px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: radial-gradient(circle at top right, rgba(0, 212, 255, 0.16), var(--surface-solid));
    border: 1px solid rgba(0, 212, 255, 0.7);
    border-radius: 18px;
    padding: 26px 24px 24px 24px;
    backdrop-filter: blur(16px);
    box-shadow: 0 0 32px rgba(0, 212, 255, 0.25);
}

.comment-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.comment-input,
.comment-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.comment-input::placeholder,
.comment-textarea::placeholder {
    color: rgba(176, 184, 196, 0.8);
}

.comment-input:focus,
.comment-textarea:focus {
    outline: none;
    border-color: #00e5ff;
    box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.7);
    background: var(--input-bg);
}

.comment-textarea {
    resize: vertical;
    min-height: 110px;
}

.comment-submit {
    align-self: flex-start;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 999px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.comment-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 212, 255, 0.45);
    filter: brightness(1.05);
}

.comment-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(0, 212, 255, 0.3);
}

.comment-submit i {
    margin-right: 0;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    text-align: center;
}

.modal-avatar {
    margin-bottom: 20px;
}

.modal-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px var(--glow-color);
}

.modal-body h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.modal-title {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.modal-info {
    text-align: left;
    margin-top: 30px;
}

.modal-info h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 10px;
}

.modal-info p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* 公告弹窗样式 */
.announcement-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    justify-content: center;
    align-items: center;
}

.announcement-modal.active {
    display: flex;
}

.announcement-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    backdrop-filter: blur(10px);
}

.announcement-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 212, 255, 0.05);
}

.announcement-header h2 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.announcement-header h2 i {
    font-size: 1.6rem;
}

.announcement-body {
    padding: 30px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
    min-height: 80px;
}

.announcement-body p {
    margin: 0;
    color: var(--text-primary);
}

.announcement-footer {
    padding: 20px 30px 30px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 212, 255, 0.02);
}

.announcement-optout {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    user-select: none;
    cursor: pointer;
}

.announcement-optout input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.announcement-btn {
    padding: 12px 32px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    margin-left: auto;
}

.announcement-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.announcement-btn:active {
    transform: translateY(0);
}

/* 响应式设计（首页） */
@media (max-width: 968px) {
    .container {
        flex-direction: column;
        gap: 30px;
        padding: 40px 20px;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 30px 20px;
    }

    .avatar-container {
        width: auto;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        padding-right: 20px;
        margin-right: 20px;
    }

    .intro-btn {
        width: auto;
        min-width: 120px;
        margin-bottom: 0;
    }

    .social-links {
        width: auto;
        margin-bottom: 0;
    }

    .social-link {
        width: auto;
        min-width: 140px;
    }

    .nav-menu {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        margin-top: 0;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
        border-left: none;
    }

    .nav-btn {
        width: auto;
        text-align: center;
        flex: 1;
        min-width: 100px;
    }

    .section-title {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 30px 15px;
    }

    .name {
        font-size: 1.6rem;
    }

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

    .nav-menu {
        gap: 8px;
        flex-direction: column;
    }

    .nav-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
        text-align: center;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .announcement-modal-content {
        max-width: 95%;
        width: 95%;
    }

    .announcement-header {
        padding: 25px 20px 15px;
    }

    .announcement-header h2 {
        font-size: 1.5rem;
    }

    .announcement-body {
        padding: 20px;
        font-size: 1rem;
    }

    .announcement-footer {
        padding: 15px 20px 20px;
    }

    .announcement-btn {
        width: 100%;
        padding: 14px 32px;
    }

    .sidebar {
        flex-direction: column;
        padding: 25px 20px;
    }

    .avatar-container {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 25px;
        margin-right: 0;
        margin-bottom: 25px;
    }

    .intro-btn {
        width: 100%;
    }

    .social-link {
        width: 100%;
    }

    .nav-btn {
        width: 100%;
    }

    .section-title {
        font-size: 1.8rem;
    }
}
