/* ========== 首页样式 ========== */

/* === 欢迎横幅 === */
.welcome-banner {
    background: linear-gradient(135deg, #4A90D9 0%, #6C5CE7 40%, #a855f7 80%, #ec4899 100%);
    border-radius: var(--radius-lg);
    padding: 48px 48px 48px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(74, 144, 217, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

/* 背景浮动效果 */
.banner-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: -60px;
    right: -40px;
    animation: floatCircle 8s ease-in-out infinite;
}

.circle-2 {
    width: 120px;
    height: 120px;
    bottom: -30px;
    left: 10%;
    animation: floatCircle 6s ease-in-out infinite reverse;
}

.circle-3 {
    width: 80px;
    height: 80px;
    top: 30%;
    right: 25%;
    animation: floatCircle 10s ease-in-out infinite 2s;
}

.floating-star {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    font-size: 16px;
}

.star-1 {
    top: 15%;
    left: 15%;
    animation: twinkle 3s ease-in-out infinite;
}

.star-2 {
    top: 60%;
    right: 35%;
    animation: twinkle 4s ease-in-out infinite 1s;
    font-size: 12px;
}

.star-3 {
    bottom: 20%;
    left: 40%;
    animation: twinkle 5s ease-in-out infinite 2s;
    font-size: 20px;
}

@keyframes floatCircle {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* 欢迎内容 */
.welcome-content {
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 600px;
}

.greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
    animation: fadeInDown 0.6s ease;
}

.greeting-badge i {
    font-size: 15px;
    color: #FDCB6E;
}

.welcome-heading {
    margin: 0 0 16px 0;
    animation: fadeInDown 0.6s ease 0.1s both;
}

.greeting-line {
    display: block;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user-line {
    display: block;
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.welcome-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 600px;
    animation: fadeInDown 0.6s ease 0.2s both;
}

/* 横幅按钮 */
.welcome-actions {
    display: flex;
    gap: 12px;
    animation: fadeInDown 0.6s ease 0.3s both;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-hero-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-hero-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    color: var(--primary);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-2px);
}

/* 右侧装饰图 */
.welcome-illustration {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    margin-left: 40px;
    z-index: 1;
}

.illustration-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.ring-outer {
    width: 160px;
    height: 160px;
    top: 0;
    left: 0;
    animation: ringRotate 12s linear infinite;
}

.ring-inner {
    width: 120px;
    height: 120px;
    top: 20px;
    left: 20px;
    border-style: dashed;
    animation: ringRotate 8s linear infinite reverse;
}

.illustration-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: iconFloat 3s ease-in-out infinite;
}

.illustration-icon i {
    font-size: 36px;
    color: #fff;
}

.illustration-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes iconFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-10px); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === 数据统计条 === */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.stat-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
}

.stat-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 20px;
    color: #fff;
}

.stat-icon-blue { background: linear-gradient(135deg, #4A90D9, #6BA3E0); }
.stat-icon-purple { background: linear-gradient(135deg, #6C5CE7, #a855f7); }
.stat-icon-green { background: linear-gradient(135deg, #00B894, #55efc4); }
.stat-icon-orange { background: linear-gradient(135deg, #E17055, #fab1a0); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* === 工具区域 === */
.tools-section {
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.section-header {
    margin-bottom: 20px;
}

.section-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-title i {
    color: var(--primary);
    font-size: 22px;
}

.section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0 0;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 工具卡片 */
.tool-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 28px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: block;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(74, 144, 217, 0.2);
    color: var(--text-primary);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover .tool-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* 热门卡片 */
.tool-card-featured {
    border-color: rgba(74, 144, 217, 0.2);
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.03), rgba(108, 92, 231, 0.03));
}

.tool-card-featured::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.tool-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #E17055, #fab1a0);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.tool-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tool-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon i {
    font-size: 24px;
    color: #fff;
}

.tool-icon-blue { background: linear-gradient(135deg, #4A90D9, #6BA3E0); }
.tool-icon-purple { background: linear-gradient(135deg, #6C5CE7, #a855f7); }
.tool-icon-green { background: linear-gradient(135deg, #00B894, #55efc4); }
.tool-icon-red { background: linear-gradient(135deg, #E17055, #fab1a0); }
.tool-icon-orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.tool-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.tool-arrow i {
    font-size: 16px;
    color: var(--primary);
}

.tool-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}

.tool-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tool-tag {
    font-size: 11px;
    color: var(--primary);
    background: rgba(74, 144, 217, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* === 底部鼓励语 === */
.encourage-section {
    margin-bottom: 8px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.encourage-card {
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.06), rgba(108, 92, 231, 0.06));
    border: 1px solid rgba(74, 144, 217, 0.12);
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.encourage-icon i {
    font-size: 22px;
    color: #E17055;
    animation: heartBeat 2s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
}

.encourage-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    font-style: italic;
    min-height: 24px;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--primary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.8s ease-in-out infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* === 入场动画 === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === 响应式 === */
@media (max-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .welcome-banner {
        padding: 28px 20px;
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }

    .welcome-content {
        max-width: 100%;
    }

    .greeting-line {
        font-size: 24px;
    }

    .user-line {
        font-size: 16px;
    }

    .welcome-subtitle {
        font-size: 14px;
        max-width: 100%;
        line-height: 1.8;
    }

    .welcome-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }

    .welcome-illustration {
        display: none;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 14px 12px;
    }

    .stat-value {
        font-size: 18px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tool-card {
        padding: 20px;
    }

    .tool-card h3 {
        font-size: 16px;
    }

    .tool-card p {
        font-size: 13px;
    }

    .section-title {
        font-size: 18px;
    }

    .encourage-card {
        flex-direction: column;
        padding: 20px;
    }

    .encourage-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .welcome-banner {
        padding: 24px 16px;
    }

    .greeting-line {
        font-size: 22px;
    }

    .user-line {
        font-size: 15px;
    }

    .welcome-subtitle {
        font-size: 13px;
    }

    .stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-item {
        padding: 12px 10px;
        gap: 10px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .stat-icon i {
        font-size: 16px;
    }

    .stat-value {
        font-size: 16px;
    }

    .stat-label {
        font-size: 11px;
    }
}
