/* ========================================
   4cc浏览器大全 - 样式文件
   ======================================== */

/* CSS 变量定义 */
:root {
    --bg-gradient-start: #fdf6e3;
    --bg-gradient-end: #f5e6c8;
    --card-bg: #ffffff;
    --card-border: #e8dcc8;
    --text-primary: #2c3e50;
    --text-secondary: #5a6a7a;
    --text-muted: #95a5a6;
    --accent-red: #e74c3c;
    --accent-orange: #f39c12;
    --accent-blue: #3498db;
    --accent-green: #27ae60;
    --link-color: #5a6a7a;
    --link-hover: #2c3e50;
    --shadow-light: rgba(0, 0, 0, 0.06);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-glow: rgba(231, 76, 60, 0.3);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(165deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 50%, #e8d9b5 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    background-attachment: fixed;
}

/* 容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
}

/* 卡片通用样式 */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    margin-bottom: 14px;
    padding: 18px;
    box-shadow: 0 4px 20px var(--shadow-light);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.card:hover {
    box-shadow: 0 8px 30px var(--shadow-medium);
    transform: translateY(-2px);
}

/* ========================================
   头部区域 - 优化后的Logo
   ======================================== */
.header {
    text-align: center;
    padding: 24px 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo-box {
    position: relative;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #d63031 100%);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow:
        0 6px 20px rgba(238, 90, 36, 0.4),
        0 0 40px rgba(255, 107, 107, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    overflow: hidden;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4), 0 0 40px rgba(255, 107, 107, 0.2);
    }

    50% {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 10px 30px rgba(238, 90, 36, 0.5), 0 0 60px rgba(255, 107, 107, 0.3);
    }
}

.logo-text-4cc {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.logo-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 150%;
    }
}

.logo-text {
    font-size: 26px;
    font-weight: 600;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #1abc9c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 2px 4px rgba(39, 174, 96, 0.3));
}

/* ========================================
   热搜栏
   ======================================== */
.hot-search {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow-light);
}

.hot-tag {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    margin-right: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(238, 90, 36, 0.3);
    animation: tagPulse 2s ease-in-out infinite;
}

@keyframes tagPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.hot-content {
    flex: 1;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

/* ========================================
   日期显示
   ======================================== */
.date-display {
    text-align: left;
    padding: 8px 18px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

/* ========================================
   快捷导航
   ======================================== */
.quick-nav {
    padding: 16px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    color: var(--link-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s ease;
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: var(--link-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.nav-item.featured {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
    color: #e74c3c;
    font-weight: 600;
    border-color: #ffcccc;
    animation: featuredPulse 2s ease-in-out infinite;
}

@keyframes featuredPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }

    50% {
        box-shadow: 0 0 20px 5px rgba(231, 76, 60, 0.2);
    }
}

.nav-item.featured:hover {
    background: linear-gradient(135deg, #ffe3e3 0%, #ffcccc 100%);
    transform: translateY(-3px) scale(1.02);
}

.fire-icon {
    margin-right: 4px;
    animation: fireFlicker 0.5s ease-in-out infinite alternate;
}

@keyframes fireFlicker {
    0% {
        transform: scale(1) rotate(-5deg);
    }

    100% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* ========================================
   分区标题
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.section-action {
    font-size: 13px;
    color: var(--accent-blue);
    cursor: pointer;
    transition: var(--transition);
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(52, 152, 219, 0.1);
}

.section-action:hover {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.2);
}

/* ========================================
   我的收藏
   ======================================== */
.favorites-content {
    min-height: 50px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.empty-tip {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

.favorite-link {
    padding: 8px 14px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border-radius: 8px;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.favorite-link:hover {
    background: linear-gradient(135deg, #e6f0ff 0%, #d6e6ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* ========================================
   实用酷站
   ======================================== */
.sites-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-row {
    display: grid;
    grid-template-columns: 55px 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    transition: var(--transition);
}

.site-row:hover {
    background: rgba(52, 152, 219, 0.03);
    margin: 0 -18px;
    padding: 12px 18px;
}

.site-row:last-child {
    border-bottom: none;
}

.category-label {
    font-size: 13px;
    font-weight: 600;
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
}

.site-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    padding: 6px 4px;
    border-radius: 4px;
}

.site-link:hover {
    color: var(--accent-blue);
    background: rgba(52, 152, 219, 0.08);
}

/* ========================================
   实用工具
   ======================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.tool-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border: 1px solid #e9ecef;
    border-radius: 10px;
    color: var(--link-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.tool-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: var(--link-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--shadow-light);
}

.tool-item.highlight {
    color: var(--accent-orange);
    border-color: rgba(243, 156, 18, 0.3);
    background: linear-gradient(135deg, #fffaf0 0%, #fff5e6 100%);
}

.tool-item.highlight:hover {
    background: linear-gradient(135deg, #fff5e6 0%, #ffebcc 100%);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.2);
}

/* ========================================
   底部
   ======================================== */
.footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-secondary);
}

.divider {
    margin: 0 10px;
    opacity: 0.5;
}

.footer-icp a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-icp a:hover {
    text-decoration: underline;
}

/* ========================================
   响应式适配
   ======================================== */
@media (max-width: 380px) {
    .container {
        padding: 12px;
    }

    .logo-box {
        padding: 8px 16px;
    }

    .logo-text-4cc {
        font-size: 26px;
    }

    .logo-text {
        font-size: 20px;
    }

    .nav-item {
        padding: 12px 6px;
        font-size: 13px;
    }

    .site-row {
        grid-template-columns: 45px 1fr 1fr 1fr;
    }

    .category-label {
        font-size: 11px;
        padding: 3px 6px;
    }

    .site-link {
        font-size: 12px;
    }
}

@media (min-width: 481px) {
    .container {
        padding: 28px;
    }

    .card {
        padding: 22px;
        border-radius: 16px;
    }

    .nav-grid {
        gap: 14px;
    }

    .nav-item {
        padding: 16px 14px;
        font-size: 15px;
    }

    .tools-grid {
        gap: 14px;
    }

    .tool-item {
        padding: 16px 14px;
        font-size: 14px;
    }
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.quick-nav {
    animation-delay: 0.1s;
}

.my-favorites {
    animation-delay: 0.2s;
}

.cool-sites {
    animation-delay: 0.3s;
}

.useful-tools {
    animation-delay: 0.4s;
}

.header {
    animation: fadeInUp 0.5s ease forwards;
}

.hot-search {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: 0.05s;
    opacity: 0;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c1c1c1 0%, #a8a8a8 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a8a8a8 0%, #909090 100%);
}

/* 选择文本样式（虽然被禁用但保留） */
::selection {
    background: rgba(52, 152, 219, 0.3);
    color: var(--text-primary);
}