/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    margin-top: 50px; /* 顶部通知栏高度 + 5px 间距 */
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部域名出售通知栏 */
.top-sale-notice {
    background-color: #FF5722;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    font-weight: bold;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.top-sale-notice p {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.digital-clock {
    display: inline-flex;
    background-color: #1a1a1a;
    padding: 10px 12px;
    border-radius: 4px;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid #333;
}

.digit {
    position: relative;
    width: 28px;
    height: 48px;
    margin: 0 3px;
    background-color: #0a0a0a;
    border: 1px solid #222;
    border-radius: 2px;
}

.digit .segment {
    position: absolute;
    background-color: #333;
    transition: background-color 0.1s ease;
}

.digit .segment.on {
    background-color: #00ff00;
    box-shadow: 0 0 8px #00ff00, 0 0 12px #00ff00;
}

.digit .segment-a {
    top: 2px;
    left: 4px;
    right: 4px;
    height: 4px;
    border-radius: 2px 2px 0 0;
}

.digit .segment-b {
    top: 6px;
    right: 2px;
    width: 4px;
    height: 16px;
    border-radius: 0 2px 2px 0;
}

.digit .segment-c {
    bottom: 6px;
    right: 2px;
    width: 4px;
    height: 16px;
    border-radius: 0 2px 2px 0;
}

.digit .segment-d {
    bottom: 2px;
    left: 4px;
    right: 4px;
    height: 4px;
    border-radius: 0 0 2px 2px;
}

.digit .segment-e {
    bottom: 6px;
    left: 2px;
    width: 4px;
    height: 16px;
    border-radius: 2px 0 0 2px;
}

.digit .segment-f {
    top: 6px;
    left: 2px;
    width: 4px;
    height: 16px;
    border-radius: 2px 0 0 2px;
}

.digit .segment-g {
    top: 22px;
    left: 4px;
    right: 4px;
    height: 4px;
    border-radius: 2px;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 45px; /* 顶部通知栏高度 */
    z-index: 1000;
    margin-top: 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    color: #333;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.logo-img {
    max-height: 40px;
    width: auto;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #007bff;
}

/* Banner样式 */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 80px 0;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.banner-left {
    flex: 0 0 auto;
}

.logo-frame {
    width: 300px;
    height: 250px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.logo-frame:hover {
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.banner-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.banner-right {
    flex: 1;
    text-align: left;
}

.banner h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.banner p {
    font-size: 20px;
    margin-bottom: 40px;
}

/* 联系按钮样式 */
.contact-btn {
    background-color: #FF5722;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.contact-btn:hover {
    background-color: #e64a19;
}

.contact-btn.small {
    padding: 6px 12px;
    font-size: 14px;
    margin: 0;
}

.contact-btn.prominent {
    background-color: #fff;
    color: #FF5722;
    border: 2px solid #FF5722;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.contact-btn.prominent:hover {
    background-color: #FF5722;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.wechat-icon {
        font-size: 16px;
        margin-right: 6px;
        vertical-align: middle;
        display: inline-block;
    }

/* 内容更新提示 */
.update-notice {
    background-color: #e3f2fd;
    padding: 15px 0;
    text-align: center;
}

.update-notice p {
    color: #1976d2;
    font-weight: 500;
}

/* 内容区域样式 */
.content-section {
    padding: 60px 0;
    background-color: #fff;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: #333;
}

/* 加载提示 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
    display: none;
}

.loading.show {
    display: block;
}

/* 新闻列表样式 */
.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-item {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
    opacity: 1;
    display: flex;
    flex-direction: column;
    height: 280px; /* 固定高度 */
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.news-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    flex-shrink: 0;
}

.news-item .content {
    flex-grow: 1;
    overflow: hidden;
    margin-bottom: 15px;
}

.news-item .content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.news-item .content p:last-child {
    margin-bottom: 0;
}

.news-item .content {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item .news-meta {
    flex-shrink: 0;
    margin-top: auto;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #999;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.news-link-indicator {
    font-size: 12px;
    margin-left: 8px;
    color: #007bff;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.qr-code {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* AI网站资源样式 */
.resource-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #007bff;
    display: inline-block;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.resource-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.resource-name {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    text-align: center;
}

.resource-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-section p {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #FF5722;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #aaa;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-sale-notice p {
        font-size: 14px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .navbar .container {
        flex-direction: column;
        padding: 15px;
    }

    .nav-links {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
    }

    .logo-frame {
        width: 150px;
        height: 150px;
        margin-bottom: 30px;
    }

    .banner-right {
        text-align: center;
    }

    .banner h1 {
        font-size: 32px;
    }

    .banner p {
        font-size: 16px;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .top-sale-notice {
        padding: 8px 0;
    }

    .top-sale-notice p {
        font-size: 12px;
    }

    .banner {
        padding: 60px 0;
    }

    .banner h1 {
        font-size: 24px;
    }

    .content-section {
        padding: 40px 0;
    }

    .news-item {
        padding: 20px;
    }

    .contact-btn.small {
        padding: 4px 8px;
        font-size: 12px;
    }

    .contact-btn.prominent {
        padding: 6px 12px;
        font-size: 12px;
    }

    .wechat-icon {
        font-size: 14px;
        margin-right: 4px;
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }
}