/* ========================================
   KeyGoto 首页专属样式 - 现代简约版
   ======================================== */

/* ---------- 轮播 Banner（紧凑高度） ---------- */
.home-banner {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #EEF2FF 0%, #F8FAFC 50%, #E0E7FF 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    background-size: cover;
    background-position: center;
}

/* 紧凑高度 - 恢复原来的大小 */
.carousel-slide .banner-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 50px;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.banner-tag {
    background: linear-gradient(135deg, #4F6EF7, #6366F1);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.banner-content h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.banner-content p {
    font-size: 12px;
    color: #64748B;
    margin: 0;
}

.banner-btn {
    background: #1E293B;
    color: #fff;
    padding: 5px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.banner-btn:hover {
    background: #0F172A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.banner-decoration {
    font-size: 2rem;
    opacity: 0.7;
}

/* 箭头样式 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);  /* 从 1 改为 0.5，图标也淡一点 */
    transition: all 0.2s;
    z-index: 10;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.carousel-arrow-left {
    left: 16px;
}

.carousel-arrow-right {
    right: 16px;
}

/* 指示点样式 */
.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.carousel-dot.active {
    background: #4F6EF7;
    width: 20px;
    border-radius: 10px;
}

.carousel-dot:hover {
    background: #4F6EF7;
    transform: scale(1.2);
}

/* ---------- Hero 搜索区 ---------- */
.home-hero {
    text-align: center;
    padding: 40px 24px 32px;
    background: linear-gradient(180deg, #fff 0%, #F8FAFC 100%);
}

.home-hero h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.home-hero h1 .text-primary {
    color: #4F6EF7;
    background: linear-gradient(135deg, #4F6EF7, #818CF8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 16px;
    color: #64748B;
    margin-bottom: 28px;
    line-height: 1.5;
}

.hero-search {
    max-width: 560px;
    margin: 0 auto;
}

.hero-search-box {
    display: flex;
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 48px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.hero-search-box:focus-within {
    border-color: #4F6EF7;
    box-shadow: 0 4px 16px rgba(79, 110, 247, 0.12);
}

.hero-search-box span {
    padding: 0 0 0 20px;
    display: flex;
    align-items: center;
    color: #94A3B8;
}

.hero-search-box input {
    flex: 1;
    border: none;
    padding: 12px 12px;
    font-size: 15px;
    outline: none;
    color: #1E293B;
    background: transparent;
}

.hero-search-box input::placeholder {
    color: #94A3B8;
}

.hero-search-box button {
    background: #4F6EF7;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search-box button:hover {
    background: #3B5DE7;
}

.hero-hot-tags {
    margin-top: 20px;
    font-size: 13px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-hot-tags span {
    color: #94A3B8;
}

.hero-hot-tags a {
    color: #4F6EF7;
    text-decoration: none;
    padding: 5px 14px;
    background: #EEF2FF;
    border-radius: 24px;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
}

.hero-hot-tags a:hover {
    background: #4F6EF7;
    color: #fff;
}

/* ---------- 统计卡片 ---------- */
.home-stats {
    background: #EEF2FF;
    border-bottom: 1px solid #E2E8F0;
    padding: 12px 24px;
}

.stats-grid {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #4F6EF7;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #94A3B8;
}

/* ---------- 工具卡片区 ---------- */
.home-tools-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title-bar h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all {
    font-size: 13px;
    color: #4F6EF7;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.view-all:hover {
    color: #3B5DE7;
}

.tools-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1399px) and (min-width: 1024px) {
    .tools-card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .tools-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .tools-card-grid { grid-template-columns: 1fr; gap: 12px; }
}

.tool-card-enhanced {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #1E293B;
    transition: all 0.25s ease;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.tool-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #CBD5E1;
}

.tool-card-enhanced.coming-soon {
    opacity: 0.5;
    cursor: default;
}

.tool-card-enhanced.coming-soon:hover {
    transform: none;
    box-shadow: none;
}

.card-icon-wrap {
    width: 50px;
    height: 50px;
    background: #F1F5F9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #4F6EF7;
}

.card-icon-wrap svg {
    width: 35px;
    height: 35px;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1E293B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    font-size: 12px;
    color: #64748B;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-badge-hot,
.card-badge-new,
.card-badge-soon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 16px;
}

.card-badge-hot {
    background: #FEF2F2;
    color: #EF4444;
}

.card-badge-new {
    background: #ECFDF5;
    color: #10B981;
}

.card-badge-soon {
    background: #F1F5F9;
    color: #64748B;
}

/* ---------- 特性介绍 ---------- */
.home-features {
    background: #fff;
    border-top: 1px solid #E2E8F0;
    padding: 40px 24px;
}

.features-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    text-align: center;
}

.feature-item {
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-item i,
.feature-item svg {
    display: inline-block;
    margin-bottom: 12px;
    vertical-align: middle;
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1E293B;
}

.feature-item p {
    font-size: 12px;
    color: #64748B;
    line-height: 1.5;
}

/* ---------- 底部信息一行显示 ---------- */
.home-footer-info {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 24px 40px;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 24px;
}

.footer-copyright,
.footer-links,
.footer-friends {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.home-footer-info a {
    text-decoration: none;
}

/* ---------- 响应式（移动端） ---------- */
@media (max-width: 900px) {
    .footer-row {
        flex-direction: column;
        gap: 12px;
    }
    .footer-copyright,
    .footer-links,
    .footer-friends {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 28px 16px 20px;
    }
    .home-hero h1 {
        font-size: 26px;
    }
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    .hero-search-box button {
        padding: 10px 18px;
        font-size: 13px;
    }
    .hero-search-box input {
        padding: 10px;
        font-size: 14px;
    }
    .hero-hot-tags a {
        padding: 4px 12px;
        font-size: 11px;
    }
    .home-stats {
        padding: 12px 16px;
    }
    .stats-grid {
        gap: 28px;
    }
    .stat-number {
        font-size: 26px;
    }
    .stat-label {
        font-size: 11px;
    }
    .home-tools-section {
        padding: 28px 16px;
    }
    .section-title-bar h2 {
        font-size: 18px;
    }
    .view-all {
        font-size: 12px;
    }
    .tool-card-enhanced {
        padding: 12px 14px;
        gap: 10px;
    }
    .card-icon-wrap {
        width: 38px;
        height: 38px;
    }
    .card-icon-wrap svg {
        width: 18px;
        height: 18px;
    }
    .card-info h3 {
        font-size: 14px;
        margin-bottom: 2px;
    }
    .card-info p {
        font-size: 11px;
        line-height: 1.3;
    }
    .card-badge-hot,
    .card-badge-new,
    .card-badge-soon {
        top: 8px;
        right: 8px;
        font-size: 9px;
        padding: 2px 6px;
    }
    .home-features {
        padding: 28px 16px;
    }
    .features-grid {
        gap: 20px;
    }
    .feature-item i {
        font-size: 24px;
    }
    .feature-item h3 {
        font-size: 14px;
    }
    .feature-item p {
        font-size: 11px;
    }
    
    /* Banner 移动端优化 - 紧凑高度 */
    .carousel-slide .banner-inner {
        padding: 10px 16px;
        min-height: 80px;
    }
    .banner-content {
        gap: 8px;
    }
    .banner-tag {
        font-size: 10px;
        padding: 2px 8px;
    }
    .banner-content h2 {
        font-size: 14px;
    }
    .banner-content p {
        font-size: 11px;
    }
    .banner-btn {
        padding: 4px 12px;
        font-size: 11px;
    }
    .banner-decoration {
        display: none;
    }
    
    /* 轮播移动端优化 */
    .carousel-arrow {
        width: 28px;
        height: 28px;
    }
    .carousel-arrow-left {
        left: 6px;
    }
    .carousel-arrow-right {
        right: 6px;
    }
    .carousel-dots {
        bottom: 6px;
        gap: 6px;
    }
    .carousel-dot {
        width: 6px;
        height: 6px;
    }
    .carousel-dot.active {
        width: 16px;
    }
}

@media (max-width: 640px) {
    .home-footer-info {
        padding: 20px 16px 32px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        gap: 20px;
    }
    .stat-number {
        font-size: 22px;
    }
    .stat-label {
        font-size: 10px;
    }
    .tool-card-enhanced {
        padding: 10px 12px;
    }
    .card-icon-wrap {
        width: 34px;
        height: 34px;
    }
    .card-icon-wrap svg {
        width: 16px;
        height: 16px;
    }
    .card-info h3 {
        font-size: 13px;
    }
    .card-info p {
        font-size: 10px;
    }
    
    /* 超小屏隐藏箭头，保留指示点 */
    .carousel-arrow {
        display: none;
    }
}