/* main.css - 主要样式文件 (修改版) */
@charset "utf-8";

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

:root {
    --primary-color: rgba(197, 81, 58, 0.8);
    --primary-hover: rgba(248, 108, 76, 0.8);
    --glass-bg: rgba(50, 50, 50, 0.2);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-light: rgba(255, 255, 255, 0.9);
    --text-dark: rgba(30, 30, 30, 0.9);
    --transition-speed: 0.3s;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body {
    min-height: 100vh;
    background: url('../images/bg/IM.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-light);
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.5s ease;
}

body.light {
    background-color: rgba(245, 245, 245, 0.95);
}

/* 背景渐变覆盖层 */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 20%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.8) 80%,
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: -1;
    transition: opacity 0.5s ease;
}

body.light .background-overlay {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.4) 20%,
        rgba(255, 255, 255, 0.6) 40%,
        rgba(255, 255, 255, 0.8) 80%,
        rgba(255, 255, 255, 0.9) 100%
    );
}

/* 液态玻璃效果容器 */
.glass-container {
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    border-left: 1px solid var(--glass-border);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all var(--transition-speed);
}

body.light .glass-container {
    background: rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    border-left: 1px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
}

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

body.light header.scrolled {
    background: rgba(255, 255, 255, 0.7);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
    transition: all var(--transition-speed);
}

body.light .logo {
    color: var(--text-dark);
}

.logo span {
    color: var(--primary-color);
}

.logo i {
    font-size: 28px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 导航菜单 */
nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

body.light nav a {
    color: var(--text-dark);
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover::before {
    width: 100%;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light nav a:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* 主内容区域 */
main {
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 50px;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section {
    margin-bottom: 60px;
    animation: slideUp 0.8s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-color);
    animation: expandWidth 1s ease;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100px; }
}

body.light .section-title {
    color: var(--text-dark);
}

/* 英雄区域 */
.hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
    animation: fadeIn 1.2s ease;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeIn 1.5s ease;
}

body.light .hero h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
    animation: fadeIn 1.8s ease;
}

body.light .hero p {
    color: var(--text-dark);
}

/* 功能卡片 - 统一大小 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    padding: 30px;
    text-align: center;
    transition: all var(--transition-speed);
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

body.light .feature-card h3 {
    color: var(--text-dark);
}

.feature-card p {
    opacity: 0.9;
    line-height: 1.6;
}

body.light .feature-card p {
    color: var(--text-dark);
    opacity: 0.8;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    background: rgba(192, 119, 91, 0.5);
    border: 1px solid rgba(192, 119, 91, 0.7);
    color: var(--text-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-speed);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.btn:hover {
    background: rgba(251, 128, 71, 0.5);
    border: 1px solid rgba(251, 128, 71, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251, 128, 71, 0.4);
}

.btn-primary {
    background: rgba(197, 81, 58, 0.5);
    border: 1px solid rgba(197, 81, 58, 0.8);
}

.btn-primary:hover {
    background: rgba(248, 108, 76, 0.5);
    border: 1px solid rgba(248, 108, 76, 0.8);
}

/* 关于我们部分 */
.about-section {
    padding: 40px;
    margin-top: 40px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.profile-container {
    text-align: center;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    object-fit: cover;
    transition: all 0.5s ease;
}

.profile-img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 10px 30px rgba(197, 81, 58, 0.3);
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-light);
}

body.light .about-text h3 {
    color: var(--text-dark);
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.7;
    opacity: 0.9;
}

body.light .about-text p {
    color: var(--text-dark);
    opacity: 0.8;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

body.light .contact-item {
    background: rgba(0, 0, 0, 0.05);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

body.light .contact-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 20px;
}

.contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

body.light .contact-item a {
    color: var(--text-dark);
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* 页脚 */
footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
    animation: fadeIn 1s ease;
}

body.light footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.8;
    transition: all var(--transition-speed);
    position: relative;
}

body.light .footer-links a {
    color: var(--text-dark);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-links a::after {
    content: '•';
    position: absolute;
    right: -15px;
    color: var(--text-light);
    opacity: 0.5;
}

body.light .footer-links a::after {
    color: var(--text-dark);
}

.footer-links a:last-child::after {
    display: none;
}

.copyright {
    opacity: 0.7;
    font-size: 14px;
    margin-top: 20px;
}

body.light .copyright {
    color: var(--text-dark);
}

/* 返回按钮 */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .feature-card {
        height: auto;
        min-height: 220px;
    }
    
    .contact-links {
        justify-content: center;
    }
}