/* 前端样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
    background-color: #222;
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.logo i {
    margin-right: 8px;
    color: #3498db;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.user-link {
    background-color: #27ae60;
    padding: 8px 16px !important;
    border-radius: 4px;
    border: none !important;
}

.user-link:hover {
    background-color: #229954 !important;
    border-color: transparent !important;
    color: #fff !important;
}

.logout-link {
    background-color: #e74c3c;
    padding: 8px 16px !important;
    border-radius: 4px;
    border: none !important;
}

.logout-link:hover {
    background-color: #c0392b !important;
    border-color: transparent !important;
    color: #fff !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* 顶部横幅 */
.top-banner {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px 20px;
    font-size: 14px;
    border-bottom: 1px solid #ffeeba;
    text-align: center;
}

/* 主要内容 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 0;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #3498db;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* 服务器卡片 */
.servers-section {
    padding: 60px 20px;
    background: #fff;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.server-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.server-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.server-card-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 25px;
    text-align: center;
}

.server-card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.server-card-header .price {
    font-size: 2rem;
    font-weight: bold;
    margin: 15px 0;
}

.server-card-header .price .currency {
    font-size: 1rem;
    opacity: 0.8;
}

.server-card-header .period {
    opacity: 0.9;
}

.server-card-body {
    padding: 30px;
}

.specs-list {
    list-style: none;
    margin-bottom: 30px;
}

.specs-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.specs-list li:last-child {
    border-bottom: none;
}

.specs-list li i {
    color: #3498db;
    margin-right: 10px;
    width: 20px;
}

.pricing-options {
    margin-bottom: 25px;
}

.pricing-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.pricing-option:hover,
.pricing-option.selected {
    border-color: #3498db;
    background: #e8f4fd;
}

.pricing-option .period {
    font-weight: 600;
    color: #2c3e50;
}

.pricing-option .price {
    font-weight: bold;
    color: #3498db;
}

.pricing-option .discount {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s;
    min-width: 150px;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-primary {
    background: #3498db;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

/* 联系页面 */
.contact-section {
    padding: 60px 20px;
    background: #fff;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 1.5rem;
    color: #3498db;
    margin-right: 20px;
    width: 30px;
}

.contact-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 50px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: #3498db;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-section p {
    margin-bottom: 10px;
    color: #bdc3c7;
}

.footer-section i {
    margin-right: 8px;
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* 订单页面 */
.order-section {
    padding: 60px 20px;
    background: #fff;
}

.order-container {
    max-width: 800px;
    margin: 0 auto;
}

.order-summary {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
}

.order-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.2rem;
    color: #e74c3c;
}

/* 支付页面 */
.payment-section {
    padding: 60px 20px;
    background: #f8f9fa;
}

.payment-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.payment-amount {
    font-size: 2rem;
    color: #e74c3c;
    margin: 30px 0;
    font-weight: bold;
}

.qr-code {
    width: 250px;
    height: 250px;
    margin: 30px auto;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.payment-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #3498db;
}

.payment-validity {
    color: #e74c3c;
    font-weight: 600;
    margin: 20px 0;
}

.payment-instructions {
    text-align: left;
    color: #666;
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #222;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .payment-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .qr-code {
        width: 200px;
        height: 200px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 警告提示 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}
