/* public/assets/css/index-page.css - 首页专用样式 */

/* 首页容器 */
.app-container {
    background: var(--bg-primary);
}

.header {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.main-content {
    padding-top: 66px;
    padding-bottom: 60px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.bottom-nav {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.nav-item {
    color: var(--text-muted);
}

.nav-item.active {
    color: var(--primary-color);
}

/* 工具列表深色样式 */
.tool-list {
    padding: 20px 10px 10px;
}

.tool-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: visible;
}

.tool-item.selected {
    border-color: rgba(0, 212, 170, 0.3) !important;
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.1) !important;
}

.tool-item.selected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -1px;
    right: -1px;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(0, 212, 170, 0) 0%, 
        rgba(0, 212, 170, 1) 50%, 
        rgba(0, 212, 170, 0) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 10;
    pointer-events: none;
}

.tool-item:active {
    background: var(--bg-hover);
}

.tool-name {
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.tool-desc {
    color: var(--text-secondary);
}

/* 工具状态标签 */
.tool-status {
    display: inline-block;
    padding: 0px 4px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: auto;
    line-height: 1.5;
    font-weight: normal;
}

.tool-status.purchased {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.tool-status.trial {
    background: rgba(245, 158, 11, 0.2);
    color: #feca57;
}

.tool-status.free {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

/* 页脚样式 */
.site-footer {
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.footer-version {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.footer-beian {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
    opacity: 0.7;
}

/* 价格显示 */
.tool-price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 4px;
}

.tool-price-left {
    display: flex;
    align-items: baseline;
    gap: 0;
    position: relative;
}

/* 价格徽章容器 */
.price-badges {
    position: absolute;
    top: -18px;
    right: 0;
    display: flex;
    gap: 3px;
    z-index: 1;
}

.tool-price > .tool-price-left > span:not(.sale-badge):first-of-type {
    color: #00d4aa !important;
}

.tool-price .original {
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: normal;
    font-size: 12px;
    margin-left: 4px;
    position: relative;
    display: inline-block;
}

/* 促销标识 */
.sale-badge {
    display: inline-block;
    padding: 2px 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 10px;
    font-weight: 500;
    border-radius: 8px;
    margin-right: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
    vertical-align: middle;
    line-height: 1.4;
}

/* 限时优惠标识 */
.limited-badge {
    position: absolute;
    top: -15px;
    right: -12px;
    padding: 1px 5px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    /* font-weight: 500; */
    border-radius: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.4);
    white-space: nowrap;
    z-index: 2;
}

/* 折扣标识 */
.discount-badge {
    position: absolute;
    top: -8px;
    right: -5px;
    padding: 1px 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 9px;
    font-weight: 400;
    border-radius: 4px;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    white-space: nowrap;
    z-index: 10;
    line-height: 1.2;
}

/* 免费标识 */
.free-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 170, 0.15);
    color: #00d4aa;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    vertical-align: middle;
    line-height: 1.4;
}

/* 按钮组 */
.tool-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-md);
}

.btn-outline {
    background: transparent;
    border: 1px solid #00d4aa;
    color: #00d4aa;
    font-weight: 500;
}

.btn-outline:hover {
    background: #00d4aa;
    color: white;
}

.btn-primary {
    background: #00d4aa;
    color: #0a0a0f;
    font-weight: 500;
}

.btn-primary:hover {
    background: #00b894;
}

/* 卡片样式 */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.card-title {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* 加载骨架屏 */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-hover) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* PC拦截提示 */
.pc-block {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 40px;
    text-align: center;
}

.pc-block-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.pc-block-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.pc-block-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 横屏提示 */
.landscape-tip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.landscape-tip-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.landscape-tip p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    display: none;
    font-size: 14px;
}

.toast.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 新闻公告栏样式 */
.news-ticker {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 15px;
    overflow: hidden;
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.news-ticker-label {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    margin-right: 12px;
    flex-shrink: 0;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.news-ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.news-ticker-text {
    white-space: nowrap;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    position: absolute;
    animation: scroll-left 30s linear infinite;
    animation-delay: 3s; /* 延迟3秒后开始滚动 */
    will-change: transform;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0); /* 初始位置：直接显示 */
    }
    10% {
        transform: translateX(0); /* 保持静止到10%（约3秒） */
    }
    100% {
        transform: translateX(-100%); /* 向左滚动直到完全消失 */
    }
}

/* 暂停状态 */
.news-ticker-text.paused {
    animation-play-state: paused;
}

/* === 强制覆盖规则 - 确保最新样式生效 === */
span.discount-badge {
    position: absolute !important;
    top: -10px !important;
    right: 0 !important;
    transform: translateX(100%) !important;
    padding: 1px 4px !important;
    background: rgba(253, 0, 0, 0.7) !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 400 !important;
    border-radius: 4px !important;
    letter-spacing: 0.2px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(4px) !important;
    white-space: nowrap !important;
    z-index: 10 !important;
    line-height: 1.2 !important;
    display: inline-block !important;
}
