/* 
 * 个人博客样式文件
 * 包含所有响应式设计和动画效果
 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根元素样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 安全验证层样式 */
#security-verification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 验证头部 */
.verification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #fff;
    border-bottom: 1px solid #e1e4e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.verification-logo {
    display: flex;
    align-items: center;
}

.cloudflare-logo {
    width: 120px;
    height: 30px;
    margin-right: 10px;
}

.cloudflare-logo path {
    fill: #f58220;
}

.verification-badge {
    background-color: #f58220;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.verification-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.status-text {
    font-size: 14px;
    color: #586069;
}

/* 验证内容 */
.verification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.verification-title {
    text-align: center;
    margin-bottom: 20px;
}

.verification-title h2 {
    font-size: 28px;
    font-weight: 600;
    color: #24292e;
    margin-bottom: 5px;
}

.verification-subtitle {
    font-size: 14px;
    color: #586069;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verification-description {
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    color: #444d56;
    margin-bottom: 40px;
    max-width: 450px;
}

.verification-note {
    display: block;
    font-size: 13px;
    color: #6a737d;
    margin-top: 10px;
    font-style: italic;
}

/* 进度圆环 */
.verification-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.progress-circle {
    position: relative;
    margin-bottom: 30px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: #e1e4e8;
}

.progress-ring-fill {
    stroke: #28a745;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
    filter: drop-shadow(0 0 5px rgba(40, 167, 69, 0.5));
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#progress-percentage {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #24292e;
}

.progress-label {
    display: block;
    font-size: 12px;
    color: #586069;
    margin-top: 2px;
}

/* 验证步骤 */
.verification-steps {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 15px;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    right: -25px;
    width: 40px;
    height: 2px;
    background-color: #e1e4e8;
    z-index: -1;
}

.step.active:not(:last-child)::after {
    background-color: #28a745;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e1e4e8;
    color: #586069;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: #28a745;
    color: white;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.step-text {
    font-size: 12px;
    color: #586069;
    text-align: center;
    transition: color 0.3s ease;
}

.step.active .step-text {
    color: #24292e;
    font-weight: 500;
}

/* 验证按钮 */
.verification-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.verify-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

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

.verify-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: all 0.6s ease;
}

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

.btn-text {
    display: block;
    font-size: 16px;
    font-weight: 500;
}

.btn-subtext {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.verification-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    padding: 0 10px;
}

.help-link {
    color: #0366d6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.help-link:hover {
    color: #005cc5;
    text-decoration: underline;
}

.verification-id {
    font-size: 12px;
    color: #6a737d;
}

#challenge-id {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 验证页脚 */
.verification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #f6f8fa;
    border-top: 1px solid #e1e4e8;
    font-size: 12px;
    color: #6a737d;
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
}

.footer-left span,
.footer-right a,
.footer-right span {
    margin: 0 10px;
}

.footer-link {
    color: #0366d6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #005cc5;
    text-decoration: underline;
}

.footer-ip {
    font-family: 'Courier New', monospace;
}

#user-ip {
    font-weight: bold;
}

/* 主内容区域 */
#main-content {
    display: none;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

.navbar.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.navbar-menu {
    display: flex;
    list-style: none;
}

.navbar-item {
    margin-left: 30px;
}

.navbar-link {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar-link:hover::after,
.navbar-link.active::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* 个人信息区样式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards 0.8s;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards 1.1s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 装饰元素 */
.hero-decoration {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 1;
}

/* 网站介绍区样式 */
.about {
    padding: 100px 0;
    background-color: var(--white);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* 事迹与声明区样式 */
.timeline-section {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--primary-color);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 50px;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 50px;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.timeline-description {
    color: var(--text-color);
}

/* 声明区域样式 */
.statement {
    padding: 100px 0;
    background-color: var(--white);
}

.statement-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--light-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.statement-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.statement-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-align: center;
}

.statement-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

/* 友情链接区样式 */
.links {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.link-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.link-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.link-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.link-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.link-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.link-description {
    color: var(--text-color);
    margin-bottom: 20px;
}

.link-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.link-button:hover {
    background-color: #2980b9;
    color: var(--white);
    transform: translateY(-2px);
}

/* 页脚样式 */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-text {
    margin-bottom: 20px;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: var(--transition);
    }

    .navbar-menu.active {
        transform: translateY(0);
    }

    .navbar-item {
        margin: 15px 0;
    }

    .menu-toggle {
        display: block;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
        left: 0 !important;
    }

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

    .about-text,
    .statement-text {
        font-size: 1rem;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

    .verification-content h2 {
        font-size: 1.5rem;
    }

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

    .timeline-content,
    .statement-content,
    .link-card {
        padding: 20px;
    }
}

/* 滚动显示动画 */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 弹性动画 */
.bounce-in {
    animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 英文小字标注样式 */
.section-meta,
.timeline-meta,
.statement-meta,
.link-meta,
.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #6a737d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-id,
.event-id,
.document-id,
.link-id,
.footer-id {
    background-color: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    color: #0366d6;
}

.section-tech,
.event-type,
.document-type,
.link-type,
.build-version {
    color: #586069;
}

.section-footer,
.statement-footer,
.link-footer,
.timeline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #6a737d;
}

.last-updated,
.effective-date,
.status,
.since {
    color: #586069;
}

.version {
    background-color: #e1e4e8;
    padding: 1px 5px;
    border-radius: 3px;
    color: #444d56;
    font-weight: bold;
}

.status {
    color: #28a745;
    font-weight: bold;
}

.footer-tech {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #6a737d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-tech span {
    margin: 0 10px;
}

/* 时间线元数据样式调整 */
.timeline-meta {
    margin-bottom: 10px;
    padding-left: 10px;
}

/* 链接卡片元数据样式调整 */
.link-meta {
    margin-bottom: 10px;
}

.link-footer {
    margin-top: 15px;
    font-size: 10px;
}

/* 响应式调整 - 元数据 */
@media (max-width: 768px) {
    .section-meta,
    .timeline-meta,
    .statement-meta,
    .link-meta,
    .footer-meta,
    .section-footer,
    .statement-footer,
    .link-footer,
    .timeline-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .footer-tech {
        flex-direction: column;
        gap: 5px;
    }
}

/* 安全验证层允许垂直滚动 */
#security-verification {
  position: fixed; /* 保持全屏覆盖 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto; /* 关键：允许垂直滚动 */
  -webkit-overflow-scrolling: touch; /* 优化移动端滚动体验 */
  box-sizing: border-box;
  padding: 20px 0; /* 上下留白，避免内容贴边 */
}

/* 可选：优化移动端触摸滚动 */
#security-verification * {
  touch-action: auto; /* 解除触摸行为限制 */
}

/* 若验证层有背景遮罩，确保不影响滚动 */
#security-verification .verification-content {
  max-width: 100%; /* 适配小屏幕 */
  box-sizing: border-box;
  padding: 0 15px; /* 左右留白 */
}