/**
 * 表白网代码网 - 样式文件
 */

:root {
    --primary-color: #ff6b6b;
    --primary-dark: #ee5a5a;
    --secondary-color: #ff85a2;
    --dark-bg: #1a1a2e;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--dark-bg), #16213e) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.navbar-brand {
    font-size: 1.3rem;
}

.navbar .form-control {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 20px 0 0 20px;
}

.navbar .form-control:focus {
    background: rgba(255,255,255,0.15);
    border-color: var(--primary-color);
    box-shadow: none;
    color: #fff;
}

.navbar .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}

.navbar .btn-outline-light {
    border-radius: 0 20px 20px 0;
}

/* Hero区域 */
.hero-section {
    background: linear-gradient(135deg, var(--dark-bg), #16213e);
    color: #fff;
    padding: 80px 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.03'%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 .container {
    position: relative;
    z-index: 1;
}

.hero-hearts {
    margin-bottom: 20px;
}

.hero-hearts .heart {
    color: var(--primary-color);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.hero-hearts .heart-1 {
    font-size: 2rem;
    animation-delay: 0s;
}

.hero-hearts .heart-2 {
    font-size: 3rem;
    margin: 0 15px;
    animation-delay: 0.3s;
}

.hero-hearts .heart-3 {
    font-size: 2rem;
    animation-delay: 0.6s;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.hero-stats {
    color: rgba(255,255,255,0.9);
}

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

.stat-num {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* 作品卡片 */
.work-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
}

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

.work-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.work-icon {
    font-size: 4rem;
    color: rgba(255,255,255,0.9);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.preview-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255,255,255,0.95);
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.work-card:hover .preview-btn {
    opacity: 1;
    transform: translateY(0);
}

.preview-btn:hover {
    background: #fff;
    color: var(--primary-color);
}

.work-info {
    padding: 20px;
}

.work-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.work-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.work-title a:hover {
    color: var(--primary-color);
}

.work-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-tags {
    margin-bottom: 12px;
}

.work-tags .tag {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 5px;
    margin-bottom: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.work-tags .tag:hover {
    background: var(--primary-color);
    color: #fff;
}

.work-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 15px;
}

.work-actions {
    display: flex;
    gap: 10px;
}

.work-actions .btn {
    flex: 1;
    font-size: 0.85rem;
}

/* 特色区域 */
.features-section {
    background: #fff;
}

.feature-card {
    padding: 30px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: #f8f9fa;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: #fff;
}

/* 详情页 */
.detail-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.detail-preview {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    text-align: center;
    color: rgba(255,255,255,0.9);
}

.preview-placeholder i {
    font-size: 5rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.preview-placeholder p {
    margin-top: 15px;
    font-size: 0.9rem;
}

.detail-content {
    padding: 30px;
}

.detail-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.detail-desc {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 0.9rem;
}

.feature-list, .usage-list {
    color: #666;
    line-height: 2;
}

/* 侧边栏 */
.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.recommend-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, var(--dark-bg), #16213e);
    color: rgba(255,255,255,0.8);
    margin-top: auto;
    border-top: 3px solid var(--primary-color);
}

.footer h5 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer h6 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer a {
    color: rgba(255,255,255,0.85);
    transition: all 0.3s;
}

.footer p, .footer li, .footer .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

.footer a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.footer hr {
    border-color: rgba(255,255,255,0.1);
}

.footer .row {
    padding-top: 10px;
}

/* 按钮样式 */
.btn-danger {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--primary-dark), #d94848);
}

.btn-outline-danger {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* 响应式 */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .work-preview {
        height: 150px;
    }

    .detail-preview {
        height: 200px;
    }

    .navbar .d-flex {
        margin-top: 15px;
    }
}

/* 下载页面 */
.download-icon {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* 搜索页面 */
.input-group-lg .form-control {
    border-radius: 25px 0 0 25px;
}

.input-group-lg .btn {
    border-radius: 0 25px 25px 0;
    padding-left: 25px;
    padding-right: 25px;
}

/* Section 头部 */
.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}
