/* RF天线科技 - 主样式文件 */

:root {
    --primary-color: #0066cc;
    --secondary-color: #003366;
    --accent-color: #ff6600;
    --light-bg: #f8f9fa;
    --dark-bg: #1a1a2e;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.navbar-brand i {
    color: var(--accent-color);
    margin-right: 8px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color) !important;
    background: rgba(255,255,255,0.1);
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* 区块样式 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* 产品卡片 */
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.product-card .card-img-top {
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.product-card .card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.product-card .badge {
    background: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* 特性图标区 */
.feature-box {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.feature-box i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-box h5 {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

.feature-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* 统计数字区 */
.stats-section {
    background: var(--secondary-color);
    color: white;
    padding: 60px 0;
}

.stat-item {
    text-align: center;
}

.stat-item h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.stat-item p {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 0;
}

/* 新闻/文章卡片 */
.article-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.article-card .card-body {
    padding: 1.25rem;
}

.article-card .article-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 表单样式 */
.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.15);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-accent {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 500;
}

.btn-accent:hover {
    background: #e65c00;
    border-color: #e65c00;
    color: white;
}

/* 页脚 */
.footer {
    background: var(--dark-bg) !important;
}

.footer a:hover {
    color: var(--accent-color) !important;
}

/* 产品详情页 */
.product-detail {
    padding: 40px 0;
}

.product-gallery {
    border-radius: 12px;
    overflow: hidden;
}

.product-info h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.product-specs {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
}

.product-specs table th {
    font-weight: 500;
    color: var(--text-muted);
    width: 40%;
}

/* 分类筛选 */
.category-filter {
    margin-bottom: 2rem;
}

.category-filter .btn {
    margin: 0.25rem;
    border-radius: 20px;
}

.category-filter .btn.active {
    background: var(--primary-color);
    color: white;
}

/* 后台管理样式 */
.admin-sidebar {
    background: var(--dark-bg);
    min-height: calc(100vh - 56px);
    padding-top: 1rem;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1.25rem;
    border-radius: 0;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar .nav-link i {
    width: 24px;
    margin-right: 0.5rem;
}

.admin-content {
    padding: 2rem;
    background: var(--light-bg);
    min-height: calc(100vh - 56px);
}

.admin-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 表格样式 */
.table-admin {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.table-admin th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
}

.table-admin td {
    vertical-align: middle;
}

/* 上传区域 */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: var(--light-bg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: rgba(0,102,204,0.05);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* 分页 */
.pagination {
    justify-content: center;
}

.pagination .page-link {
    border-radius: 8px;
    margin: 0 0.2rem;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .stat-item h2 {
        font-size: 2rem;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* 面包屑 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.25rem;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,102,204,0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示 */
.alert-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============ 天线信号动画 ============ */
.antenna-animation {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 500px;
    height: 500px;
}

.antenna-icon {
    font-size: 15rem !important;
    opacity: 0.25;
    color: #fff;
    z-index: 2;
    animation: antennaPulse 3s ease-in-out infinite;
}

@keyframes antennaPulse {
    0%, 100% {
        opacity: 0.25;
        filter: drop-shadow(0 0 0px rgba(255,255,255,0));
    }
    50% {
        opacity: 0.45;
        filter: drop-shadow(0 0 30px rgba(0,150,255,0.5));
    }
}

.signal-wave {
    position: absolute;
    top: 37%;
    left: 47%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0,180,255,0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: signalEmit 3s ease-out infinite;
    pointer-events: none;
}

.signal-wave.wave-1 {
    animation-delay: 0s;
}
.signal-wave.wave-2 {
    animation-delay: 0.75s;
}
.signal-wave.wave-3 {
    animation-delay: 1.5s;
}
.signal-wave.wave-4 {
    animation-delay: 2.25s;
}

@keyframes signalEmit {
    0% {
        width: 30px;
        height: 30px;
        opacity: 0.9;
        border-width: 3px;
        border-color: rgba(0,180,255,0.9);
        box-shadow: 0 0 10px rgba(0,180,255,0.4);
    }
    50% {
        opacity: 0.5;
        border-color: rgba(0,150,255,0.5);
    }
    100% {
        width: 480px;
        height: 480px;
        opacity: 0;
        border-width: 1px;
        border-color: rgba(0,100,255,0);
        box-shadow: none;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .antenna-icon,
    .signal-wave {
        animation: none;
    }
    .antenna-icon {
        opacity: 0.2;
    }
}

/* ============ 页脚样式 ============ */
.footer {
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 100%);
    color: rgba(255,255,255,0.85);
    margin-top: auto;
}

.footer-brand {
    color: #fff;
    font-weight: 600;
}

.footer-brand i {
    color: #00a8ff;
}

.footer-desc {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
}

.footer-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #00a8ff, #0066cc);
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #00a8ff;
    transform: translateX(5px);
}

.footer-contact li {
    color: rgba(255,255,255,0.75);
    margin-bottom: 0.75rem;
}

.footer-contact i {
    color: #00a8ff;
    width: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #00a8ff;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,168,255,0.3);
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 2rem 0;
}

.footer-copyright {
    color: rgba(255,255,255,0.45);
    font-size: 0.85rem;
}

.footer-admin {
    color: rgba(255,255,255,0.15);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.footer-admin:hover {
    color: rgba(255,255,255,0.5);
}

/* 手机端动画适配 */
@media (max-width: 991px) {
    .antenna-animation {
        width: 280px;
        height: 280px;
    }
    .antenna-icon {
        font-size: 8rem !important;
    }
    .signal-wave {
        top: 35%;
        left: 47%;
    }
    @keyframes signalEmit {
        0% {
            width: 20px;
            height: 20px;
            opacity: 0.9;
            border-width: 2px;
            border-color: rgba(0,180,255,0.9);
            box-shadow: 0 0 8px rgba(0,180,255,0.4);
        }
        50% {
            opacity: 0.5;
            border-color: rgba(0,150,255,0.5);
        }
        100% {
            width: 260px;
            height: 260px;
            opacity: 0;
            border-width: 1px;
            border-color: rgba(0,100,255,0);
            box-shadow: none;
        }
    }
}
