/* 全局样式 */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #818cf8;
    --background-color: #f9fafb;
    --card-background: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
}

body {
    background-color: var(--background-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 头部样式 */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 3rem 0;
    margin-bottom: 2rem;
    color: white;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.site-icon {
    width: 100px;
    height: 100px;
    border-radius: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.site-icon:hover {
    transform: scale(1.05);
}

/* 分类导航 */
.category-nav {
    background: var(--card-background);
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    margin-right: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-btn:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
}

/* 应用卡片 */
.app-card {
    background: var(--card-background);
    border: none;
    border-radius: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 应用信息布局 */
.app-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.app-header-left {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 1.2rem;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.app-info-text {
    flex: 1;
}

.app-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.app-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.app-type-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.app-type-badge i {
    font-size: 0.8rem;
}

.app-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.app-version, .app-size {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.04);
    padding: 0.3rem 0.8rem;
    border-radius: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.app-version i, .app-size i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.app-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.app-date i {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* 描述文本 */
.app-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    white-space: pre-line;
}

/* 下载按钮 */
.btn-download {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: none;
    color: white;
}

.btn-download:hover {
    transform: scale(1.1);
    color: white;
    text-decoration: none;
}

.btn-free {
    background: var(--primary-color);
}

.btn-free:hover {
    background: var(--secondary-color);
}

.btn-locked {
    background: #fbbf24;
    color: #92400e;
}

.btn-locked:hover {
    background: #f59e0b;
    color: #78350f;
}

.btn-warning {
    background: #f97316;
}

.btn-warning:hover {
    background: #ea580c;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--secondary-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 搜索框样式 */
.search-box {
    margin-bottom: 1rem;
}

.search-input-wrapper {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-icon {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-right: 0.8rem;
}

.search-input {
    border: none;
    background: none;
    flex: 1;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.clear-search {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.2rem;
    margin-left: 0.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search:hover {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-header {
        padding: 2rem 0;
        border-radius: 0 0 1.5rem 1.5rem;
    }

    .site-icon {
        width: 80px;
        height: 80px;
    }

    .app-card {
        padding: 1rem;
    }

    .app-header {
        margin-bottom: 1rem;
    }

    .app-icon {
        width: 60px;
        height: 60px;
    }

    .app-meta {
        gap: 0.3rem;
    }

    .app-version, .app-size {
        padding: 0.2rem 0.5rem;
    }

    .btn-download {
        width: 36px;
        height: 36px;
    }
    
    .btn-download i {
        font-size: 1rem;
    }

    .category-btn {
        padding: 0.5rem 1rem;
    }

    .app-info {
        padding: 1rem;
    }

    .app-title {
        font-size: 1.1rem;
    }
    
    .app-type-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }

    .search-input-wrapper {
        padding: 0.6rem 1rem;
    }
    
    .search-input {
        font-size: 0.95rem;
    }
}

/* 添加加载更多按钮样式 */
.btn-load-more {
    background: var(--card-background);
    color: var(--text-secondary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-load-more i {
    transition: transform 0.3s ease;
}

.btn-load-more:hover i {
    transform: rotate(180deg);
}

/* 添加加载动画效果 */
@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-load-more.loading i {
    animation: loading-spin 1s linear infinite;
}

/* 修改 Toast 提示样式 */
.toast-container {
    position: fixed;
    z-index: 1050;
    padding: 1rem;
    pointer-events: none;
    max-width: 100%;
    width: auto;
    
    /* 默认在顶部中间 */
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    
    /* 添加动画 */
    animation: slideInDown 0.3s ease;
}

.toast-message {
    padding: 0.8rem 1.5rem;
    border-radius: 1rem;
    background: white;
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    min-width: 200px;
    justify-content: center;
    text-align: center;
    pointer-events: auto;
}

/* 修改动画方向为从上往下 */
@keyframes slideInDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* 移除旧的动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .toast-container {
        /* 移除之前的底部定位 */
        width: calc(100% - 2rem); /* 左右留出间距 */
        max-width: 400px; /* 限制最大宽度 */
    }
    
    .toast-message {
        width: 100%;
        padding: 0.8rem 1rem;
    }
}

/* 优化 Toast 消息样式 */
.toast-message.success {
    background: #34d399;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-message.warning {
    background: #fbbf24;
    color: #92400e;
    border: 1px solid rgba(146, 64, 14, 0.1);
}

.toast-message.error {
    background: #ef4444;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-message.info {
    background: #60a5fa;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 修改统计信息样式 */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0.8rem;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.stat-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover i {
    transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-container {
        padding: 0.8rem;
        justify-content: center;
        gap: 0.8rem;
    }
    
    .stat-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 修改应用信息样式 */
.app-meta-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.app-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 0.6rem;
    transition: all 0.3s ease;
}

.meta-item i {
    font-size: 0.9rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.meta-item:hover {
    background: rgba(79, 70, 229, 0.08);
}

.update-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

.update-time i {
    font-size: 0.85rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .app-meta-info {
        gap: 0.3rem;
        margin-top: 0.4rem;
    }

    .app-meta-row {
        gap: 0.8rem;
    }

    .meta-item {
        font-size: 0.8rem;
        padding: 0.15rem 0.5rem;
    }

    .meta-item i {
        font-size: 0.85rem;
    }

    .update-time {
        font-size: 0.75rem;
    }

    .update-time i {
        font-size: 0.8rem;
    }
}

/* 修改应用标签样式 */
.app-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--primary-color);
    color: white;
    transform: rotate(-45deg) translateX(-25%) translateY(-10%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.app-badge::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-width: 0 12px 12px 0;
    border-color: transparent rgba(0, 0, 0, 0.1) transparent transparent;
}

.app-badge i {
    font-size: 0.8rem;
}

/* 不同类型的颜色 */
.app-badge.type-1 { background: #4f46e5; } /* 应用 */
.app-badge.type-2 { background: #22c55e; } /* 游戏 */
.app-badge.type-3 { background: #3b82f6; } /* 影音 */
.app-badge.type-4 { background: #f59e0b; } /* 工具 */
.app-badge.type-5 { background: #ef4444; } /* 插件 */
.app-badge.type-0 { background: #6b7280; } /* 默认 */

/* 响应式调整 */
@media (max-width: 768px) {
    .app-badge {
        padding: 0.25rem 0.8rem;
        font-size: 0.7rem;
        transform: rotate(-45deg) translateX(-30%) translateY(-15%);
    }
    
    .app-badge i {
        font-size: 0.75rem;
    }
}

/* 其他相关输入框也可以添加这些属性 */
input, 
select, 
textarea {
    font-size: 16px;
    touch-action: manipulation;
}

/* 添加快捷操作按钮样式 */
.quick-actions {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, #3b82f6, #818cf8);
    border: none;
    border-radius: 1rem;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15),
                0 2px 10px rgba(59, 130, 246, 0.1);
}

.btn-action:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4f46e5, #818cf8);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: white;
}

.btn-action .btn-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 为每个按钮添加不同的渐变色 */
.btn-action:nth-child(1) {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.btn-action:nth-child(2) {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.btn-action:nth-child(3) {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

.btn-action:nth-child(4) {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.btn-action:nth-child(5) {
    background: linear-gradient(135deg, #10b981, #34d399);
}

/* 悬浮效果也相应调整 */
.btn-action:nth-child(1):hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.btn-action:nth-child(2):hover {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

.btn-action:nth-child(3):hover {
    background: linear-gradient(135deg, #db2777, #ec4899);
}

.btn-action:nth-child(4):hover {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

.btn-action:nth-child(5):hover {
    background: linear-gradient(135deg, #059669, #10b981);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .quick-actions {
        padding: 1rem;
    }
    
    .btn-action {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn-action .btn-icon {
        width: 20px;
        height: 20px;
    }
} 