/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: #333;
    line-height: 1.6;
    padding-top: 70px;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    font-size: 1rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #fff !important;
}

/* 首页横幅样式 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-section .lead {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 自动售货机动画 */
.vending-machine-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

.machine {
    width: 200px;
    height: 350px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.machine-screen {
    background: #1a1a2e;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 2px solid #4a4a6a;
}

.screen-text {
    color: #00ff88;
    font-size: 1.2rem;
    font-weight: bold;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.machine-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.product-item {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    height: 60px;
    border-radius: 5px;
    animation: productGlow 2s infinite;
}

.product-item:nth-child(2) {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    animation-delay: 0.5s;
}

.product-item:nth-child(3) {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    animation-delay: 1s;
}

.product-item:nth-child(4) {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    animation-delay: 1.5s;
}

@keyframes productGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    }
}

.machine-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: #e74c3c;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.control-btn:last-child {
    background: #27ae60;
    animation-delay: 1s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 章节标题样式 */
.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 15px auto 0;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

/* 产品卡片样式 */
.products-section {
    background: white;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-icon {
    margin-bottom: 20px;
}

.product-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.product-card p {
    color: #666;
    margin-bottom: 20px;
}

.product-features {
    list-style: none;
    padding: 0;
    text-align: left;
}

.product-features li {
    padding: 8px 0;
    color: #555;
    position: relative;
    padding-left: 25px;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* 服务优势样式 */
.features-section {
    background: #f8f9fa;
}

.feature-item {
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    height: 100%;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    margin-bottom: 20px;
}

.feature-item h4 {
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.feature-item p {
    color: #666;
    margin: 0;
}

/* 关于我们样式 */
.about-section {
    background: white;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

.about-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 60px 30px;
    text-align: center;
    color: white;
}

.about-placeholder p {
    margin: 0;
    font-size: 1.2rem;
}

/* 联系我们样式 */
.contact-section {
    background: #f8f9fa;
}

.contact-info {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-info h3 {
    color: #333;
    margin-bottom: 25px;
    font-weight: bold;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    min-width: 30px;
}

.contact-text strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.contact-text p {
    color: #666;
    margin: 0;
}

.contact-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-form .form-label {
    font-weight: 500;
    color: #333;
}

.contact-form .form-control {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #ddd;
}

.contact-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.contact-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 页脚样式 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 0;
}

.footer .copyright {
    margin: 0;
    font-size: 0.9rem;
}

.footer .icp {
    margin: 0;
    font-size: 0.9rem;
}

.footer .icp a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer .icp a:hover {
    color: #667eea;
}

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        min-height: auto;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.2rem;
    }
    
    .vending-machine-animation {
        height: 300px;
        margin-top: 30px;
    }
    
    .machine {
        width: 150px;
        height: 280px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 60px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .contact-item {
        flex-direction: column;
    }
    
    .contact-icon {
        margin-bottom: 10px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
