/* ==================== style.css ==================== */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #1a252f;
    --gray: #95a5a6;
    --transition: all 0.4s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background: rgba(44, 62, 80, 0.95);
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    color: var(--light);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.logo i {
    margin-right: 10px;
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero区域样式 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 650px;
    z-index: 2;
    margin-left: -40px; /* 可根据实际效果调整 */
    align-items: flex-start;
    text-align: left;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    line-height: 1.1;
    animation: fadeInUp 1s ease;
}

.hero h1 span {
    color: var(--secondary);
    position: relative;
    display: inline-block;
}

.hero h1 span:after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 15px;
    background: rgba(52, 152, 219, 0.3);
    z-index: -1;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-btns {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
    justify-content: flex-start;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary);
    color: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.6);
    background: #2980b9;
}

.btn-outline {
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: white;
}

.hero-image {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: float 8s ease-in-out infinite;
}

.hero-image .shape {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
}

.hero-image .shape:nth-child(2) {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    width: 80%;
    height: 80%;
    opacity: 0.7;
    animation: rotate 20s linear infinite reverse;
}

/* 自转地球动画 */
.earth-rotate {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
}
.earth-group {
    transform-origin: 80px 80px;
    animation: earth-spin 6s linear infinite;
}
@keyframes earth-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.earth-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 24px rgba(33,150,243,0.18);
    /* 保证图片自转 */
    animation: earth-spin 6s linear infinite;
    display: block;
}

/* 内容区块通用样式 */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    display: inline-block;
    position: relative;
    z-index: 2;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 15px;
    background: rgba(52, 152, 219, 0.3);
    z-index: -1;
}

/* 关于我样式 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.info-list {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.info-list:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.info-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border: none;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    transition: var(--transition);
}

.info-item:hover .info-icon {
    background: var(--primary);
    transform: rotate(15deg);
}

.info-content h4 {
    margin-bottom: 5px;
    color: var(--primary);
}

/* 技能样式 */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    transform: translateY(50px);
    opacity: 0;
}

.skill-card.active {
    transform: translateY(0);
    opacity: 1;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.skill-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    text-align: center;
}

.skill-body {
    padding: 30px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 25px;
}

.skill-list li:before {
    content: '✓';
    color: var(--secondary);
    font-weight: bold;
    margin-right: 10px;
    position: absolute;
    left: 0;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--secondary);
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%;
    padding-right: 30px;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.8s ease;
}

.timeline-item.active {
    transform: translateY(0);
    opacity: 1;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 30px;
    padding-right: 0;
}

.timeline-content {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
}

.timeline-content:before {
    content: '';
    position: absolute;
    top: 20px;
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent transparent white;
}

.timeline-item:nth-child(even) .timeline-content:before {
    left: -10px;
    right: auto;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.timeline-date {
    display: block;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
}

/* 联系样式 */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.contact-info {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-info:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
    flex-shrink: 0;
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    background: var(--primary);
    transform: scale(1.1);
}

.contact-text h4 {
    margin-bottom: 5px;
    color: var(--primary);
}

/* 页脚样式 */
footer {
    background: var(--dark);
    color: var(--light);
    padding: 40px 0 20px;
    text-align: center;
}

.footer-content {
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

/* 玻璃效果卡片 */
.glass {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Safari 兼容 */
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0% { transform: translateY(-50%); }
    50% { transform: translateY(-55%); }
    100% { transform: translateY(-50%); }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero-image {
        width: 400px;
        height: 400px;
        right: -100px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-content {
        margin-left: 0;
        padding-left: 10px;
    }
    .earth-rotate {
        width: 120px;
        height: 120px;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .timeline:before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
        padding-left: 70px;
    }
    
    .timeline-content:before {
        left: -10px;
        right: auto;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* 邮箱弹窗样式 */
.email-modal {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 9999;
    justify-content: center;
    align-items: flex-end;
}
.email-modal.show {
    display: flex;
}
.email-modal-mask {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 1;
}
.email-modal-content {
    position: relative;
    width: 380px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 24px rgba(33,150,243,0.12);
    padding: 0 24px 20px 24px;
    z-index: 2;
    animation: email-modal-in 0.3s cubic-bezier(.4,0,.2,1);
}
@keyframes email-modal-in {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.email-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
    font-weight: 500;
}
.email-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}
.email-modal-close:hover {
    color: #2196F3;
}
.email-form-group {
    margin: 18px 0 0 0;
    display: flex;
    align-items: center;
}
.email-form-group label {
    width: 60px;
    color: #555;
    font-size: 15px;
}
.email-form-group input[type="text"] {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 15px;
    background: #fafbfc;
}
.email-form-group textarea {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 15px;
    background: #fafbfc;
    resize: vertical;
}
.email-form-actions {
    text-align: right;
    margin-top: 18px;
}
.email-send-btn {
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 28px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.email-send-btn:hover {
    background: #1769aa;
}
@media (max-width: 480px) {
    .email-modal-content {
        width: 98vw;
        padding: 0 6vw 20px 6vw;
    }
    .email-form-group label {
        width: 48px;
    }
}

/* 拨号盘弹窗样式 */
.phone-modal {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 10000;
    justify-content: center;
    align-items: flex-end;
}
.phone-modal.show {
    display: flex;
}
.phone-modal-mask {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.28);
    z-index: 1;
}
.phone-modal-content {
    position: relative;
    width: 370px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -2px 32px rgba(33,150,243,0.18);
    padding: 0 24px 32px 24px;
    z-index: 2;
    animation: phone-modal-in 0.4s cubic-bezier(.4,0,.2,1);
    color: #fff;
}
@keyframes phone-modal-in {
    from { transform: translateY(100%) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.phone-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
}
.phone-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #fff;
    transition: color 0.2s;
}
.phone-modal-close:hover {
    color: #ffeb3b;
}
.phone-dialer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 18px;
}
.phone-number {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 18px;
    text-shadow: 0 2px 12px #0008;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px 24px;
    box-shadow: 0 2px 16px #0002;
}
.dialer-pad {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    grid-gap: 16px;
    margin-bottom: 22px;
}
.dial-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: #fff;
    font-size: 1.7rem;
    font-weight: 600;
    box-shadow: 0 2px 12px #0003;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.12s, box-shadow 0.12s;
}
.dial-btn:active {
    transform: scale(0.92);
    box-shadow: 0 1px 4px #0005;
}
.dial-btn::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    pointer-events: none;
}
.dial-btn:active::after {
    width: 120px;
    height: 120px;
}
.call-btn {
    margin-top: 8px;
    background: linear-gradient(90deg, #00c6ff 0%, #0072ff 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 48px;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 4px 24px #0072ff44;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 2px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.12s;
    position: relative;
    overflow: hidden;
}
.call-btn:active {
    background: linear-gradient(90deg, #0072ff 0%, #00c6ff 100%);
    box-shadow: 0 2px 8px #0072ff88;
    transform: scale(0.97);
}
.call-btn i {
    font-size: 1.4rem;
}
@media (max-width: 480px) {
    .phone-modal-content {
        width: 98vw;
        padding: 0 4vw 32px 4vw;
    }
    .phone-number {
        font-size: 1.3rem;
        padding: 8px 8px;
    }
    .dialer-pad {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 10px;
    }
    .dial-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    .call-btn {
        padding: 10px 18vw;
        font-size: 1rem;
    }
}

/* 轮播图样式 */
.carousel-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.carousel-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.slide-caption {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.carousel-controls {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
    background: rgba(0,0,0,0.1);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.carousel-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.carousel-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.carousel-btn i {
    color: #333;
    font-size: 16px;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255,255,255,0.8);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-wrapper {
        height: 300px;
    }
    
    .slide-caption {
        bottom: 80px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .carousel-controls {
        bottom: 20px;
        gap: 15px;
        padding: 8px 15px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}
/* ==================== END OF style.css ==================== */