/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 响应式断点 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    font-weight: bold;
    color: #212529;
}

h2 {
    font-size: 28px;
    text-align: center;
}

@media (max-width: 768px) {
    h2 {
        font-size: 24px;
    }
}

/* 段落样式 */
p {
    margin-bottom: 15px;
}

/* 列表样式 */
ul, ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
}

/* 导航栏样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    margin: 0;
    font-size: 24px;
    color: #007bff;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 25px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #007bff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
}

.admin-link .nav-link {
    color: #dc3545;
}

.admin-link .nav-link:hover {
    color: #c82333;
}

.admin-link .nav-link.active::after {
    background-color: #dc3545;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-content {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 20px;
}

.mobile-menu-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.mobile-menu-close:hover {
    color: #333;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #eee;
}

.mobile-nav-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: #f8f9fa;
    color: #007bff;
}

/* 响应式导航 */
@media (max-width: 992px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* 轮播图样式 */
.banner {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 50%, #6f42c1 100%);
    color: #fff;
    text-align: center;
    padding: 100px 0 70px;
    margin-top: 70px;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
}

/* 背景动画 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 装饰元素 */
.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    letter-spacing: -1px;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.banner-content .btn {
    position: relative;
    z-index: 3;
    font-size: 18px;
    padding: 12px 30px;
    border-radius: 30px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
}

.banner-content .btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
    background: linear-gradient(135deg, #218838 0%, #198754 100%);
}

@media (max-width: 768px) {
    .banner {
        padding: 80px 0 50px;
    }
    
    .banner-content h2 {
        font-size: 32px;
        letter-spacing: 0;
    }
    
    .banner-content p {
        font-size: 16px;
        padding: 0 20px;
    }
    
    .banner-content .btn {
        font-size: 16px;
        padding: 10px 25px;
    }
}

/* 区块标题样式 */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0 0;
}

.section-header h2 {
    margin-bottom: 10px;
}

.section-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* 运营商分类样式 */
.carriers {
    background-color: #f8f9fa;
    padding: 40px 0;
    border-bottom: 1px solid #e9ecef;
}

.carriers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    margin-top: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.carrier-card {
    text-align: center;
    padding: 25px 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.carrier-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 123, 255, 0.2);
    border-color: #007bff;
}

.carrier-card.active {
    border-color: #007bff;
    background: linear-gradient(135deg, #e7f3ff 0%, #d4edda 100%);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.25);
}

.carrier-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    border: 3px solid #fff;
    transition: all 0.3s ease;
}

.carrier-card:hover .carrier-logo {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.carrier-card.active .carrier-logo {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.carrier-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.carrier-name {
    font-size: 16px;
    font-weight: bold;
    color: #212529;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 套餐列表样式 */
.plans {
    background-color: #f8f9fa;
    padding: 40px 0;
}

.plans-filter {
    text-align: center;
    margin-bottom: 30px;
}

.filter-select {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.filter-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25), 0 2px 5px rgba(0, 0, 0, 0.1);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.plan-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.plan-header {
    padding: 20px 20px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #007bff;
}

.plan-carrier {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.plan-carrier-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
}

.plan-carrier-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.plan-carrier-name {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
    background-color: #e7f3ff;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #b3d7ff;
}

.plan-name {
    font-size: 18px;
    font-weight: bold;
    color: #212529;
    margin: 0;
    line-height: 1.3;
}

.plan-body {
    padding: 20px;
}

.plan-info {
    margin-bottom: 15px;
}

.plan-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e9ecef;
    font-size: 14px;
}

.plan-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.plan-info-label {
    font-weight: 500;
    color: #6c757d;
}

.plan-info-value {
    color: #212529;
    font-weight: 600;
}

.plan-features {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e9ecef;
}

.plan-features h4 {
    margin-bottom: 12px;
    font-size: 15px;
    color: #495057;
}

.plan-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
}

.plan-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.plan-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.order-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.order-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}



/* 页脚样式 */
.footer {
    background-color: #343a40;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-info h3 {
    margin-bottom: 15px;
    color: #007bff;
}

.footer-info p {
    color: #adb5bd;
    margin-bottom: 20px;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 18px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007bff;
}

.footer-contact p {
    margin-bottom: 15px;
    color: #adb5bd;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
    color: #007bff;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 30px;
    text-align: center;
    color: #adb5bd;
    font-size: 14px;
}

.footer-bottom p {
    margin: 5px 0;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.required {
    color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* 管理后台样式 */
.admin-container {
    margin-top: 100px;
    padding: 20px;
}

.admin-header {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.admin-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.admin-tabs {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.admin-tab {
    padding: 15px 30px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    color: #666;
}

.admin-tab:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.admin-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: #e7f3ff;
}

.admin-content {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
}

/* 按钮组样式 */
.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-edit {
    background-color: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background-color: #e0a800;
}

.btn-delete {
    background-color: #dc3545;
    color: #fff;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    list-style: none;
    padding: 0;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #007bff;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.pagination .active a {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* 表单样式 */
.admin-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-check input[type="checkbox"] {
    margin-right: 10px;
}

.form-check label {
    margin: 0;
    font-weight: normal;
}

/* 文件上传样式 */
.file-upload {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.file-upload-input {
    display: none;
}

.file-upload-label {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.file-upload-label:hover {
    background-color: #0056b3;
}

.file-upload-preview {
    margin-top: 15px;
    max-width: 200px;
    max-height: 200px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.file-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 成功/错误提示样式 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
