/* ==================== 全局样式 ==================== */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --tech-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f0f1e;
    color: #333;
    line-height: 1.6;
}

/* ==================== 导航栏 ==================== */
.tech-nav {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(16, 15, 30, 0.95) 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.tech-brand {
    font-weight: bold;
    font-size: 1.3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s;
    position: relative;
}

.tech-nav .nav-link:hover,
.tech-nav .nav-link.active {
    color: #667eea !important;
}

.tech-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--tech-gradient);
    transition: width 0.3s;
}

.tech-nav .nav-link:hover::after,
.tech-nav .nav-link.active::after {
    width: 100%;
}

/* ==================== Hero Section ==================== */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 120px 0 80px;
    margin-top: 56px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tech-title {
    animation: fadeInUp 1s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.stat-item i {
    font-size: 2rem;
    background: var(--tech-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item h3 {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0 5px;
}

.stat-item p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ==================== 分类筛选 ==================== */
.category-section {
    background: #0f0f1e;
    padding: 80px 0 20px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.category-filter {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    text-decoration: none;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--tech-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ==================== 软件卡片 ==================== */
.software-section {
    background: #0f0f1e;
    min-height: 60vh;
}

.software-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(22, 33, 62, 0.8) 100%);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(102, 126, 234, 0.2);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.software-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.software-icon {
    padding: 30px;
    text-align: center;
    background: rgba(102, 126, 234, 0.1);
}

.software-icon img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.software-icon i {
    font-size: 4rem;
    background: var(--tech-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.software-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.software-content h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.software-meta {
    margin-bottom: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.software-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    flex-grow: 1;
}

.software-stats {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.software-stats i {
    color: var(--primary-color);
}

/* ==================== 详情页 ==================== */
.software-detail-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.software-detail-icon {
    width: 100px;
    height: 100px;
    background: var(--tech-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.software-detail-icon img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
}

.software-detail-icon i {
    font-size: 3rem;
    color: white;
}

.screenshot-img {
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #e5e7eb;
}

.screenshot-img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: var(--primary-color);
}

.download-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* 只在大屏幕上使用 sticky */
@media (min-width: 992px) {
    .download-card {
        position: sticky;
        top: 100px;
    }
}

.download-btn {
    font-size: 1.1rem;
    padding: 12px;
    transition: all 0.3s;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.software-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    opacity: 0.8;
}

.info-item .value {
    font-weight: bold;
}

/* ==================== 评论区 ==================== */
.comment-form-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.comment-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.comment-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.comment-avatar {
    width: 50px;
    height: 50px;
    background: var(--tech-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
}

/* ==================== 后台管理 ==================== */
.admin-body {
    background: #f5f5f5;
}

.sidebar {
    min-height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.stat-content p {
    margin: 0;
    color: #666;
}

/* ==================== Footer ==================== */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 40px;
    }

    .tech-title {
        font-size: 1.8rem !important;
    }

    .lead {
        font-size: 1rem !important;
    }

    .hero-stats {
        gap: 15px;
    }

    .stat-item {
        padding: 15px 20px;
        min-width: 120px;
    }

    .stat-item h3 {
        font-size: 1.5rem;
    }

    .category-filter {
        gap: 10px;
    }

    .category-btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }

    .software-card {
        margin-bottom: 20px;
    }

    .software-icon {
        padding: 20px;
    }

    .software-icon img {
        width: 60px;
        height: 60px;
    }

    .software-icon i {
        font-size: 3rem;
    }

    .software-content h3 {
        font-size: 1.1rem;
    }

    .software-detail-icon {
        width: 80px;
        height: 80px;
    }

    .software-detail-icon img {
        width: 60px;
        height: 60px;
    }

    .download-card {
        position: static !important;
        margin-top: 30px;
    }

    .back-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 70px 0 30px;
    }

    .tech-title {
        font-size: 1.5rem !important;
    }

    .navbar-brand {
        font-size: 1.1rem !important;
    }

    .stat-item {
        padding: 12px 15px;
        min-width: 100px;
    }

    .stat-item h3 {
        font-size: 1.3rem;
    }

    .stat-item i {
        font-size: 1.5rem;
    }

    .stat-item p {
        font-size: 0.85rem;
    }

    .software-content {
        padding: 15px;
    }
}

/* ==================== 按钮动画 ==================== */
.btn-primary {
    background: var(--tech-gradient);
    border: none;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ==================== 加载动画 ==================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 1000px 100%;
}
