:root {
    /* Light theme (default) */
    --primary-color: #3B82F6;
    --secondary-color: #1F2937;
    --highlight-color: #EC4899;
    --text-color: #0F172A;
    --text-muted-color: #4B5563;
    --background-color: #FFFFFF;
    --card-bg-color: #F1F5F9;
    --success-color: #10B981;
    --category-bg-color: #E2E8F0;
}

/* Dark theme */
.dark-theme {
    --primary-color: #3B82F6;
    --secondary-color: #1F2937;
    --highlight-color: #EC4899;
    --text-color: #F9FAFB;
    --text-muted-color: #D1D5DB;
    --background-color: #0F172A;
    --card-bg-color: #1E293B;
    --success-color: #10B981;
    --category-bg-color: #2D3748;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.theme-toggle i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background-color: var(--background-color);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: 40px;
    background-color: transparent;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    margin-right: 10px;
    border-radius: 8px;
    overflow: hidden;
}

nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* 英雄区域样式 */
.hero {
    padding: 5rem 3rem;
    display: flex;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
}

.hero h2 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--highlight-color);
}

.buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn:hover {
    transform: scale(1.05);
}

.primary {
    background-color: var(--primary-color);
    color: white;
}

.secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* 分类过滤区域 */
.category-filter {
    padding: 2rem 3rem;
    background-color: rgba(0, 0, 0, 0.1);
}

.category-filter h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: var(--category-bg-color);
    color: var(--text-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background-color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    font-weight: bold;
}

/* 子分类过滤按钮 */
.subcategory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 3rem;
    background-color: rgba(0, 0, 0, 0.1);
}

.subcategory-btn {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.1);
}

.parent-category.active {
    background-color: var(--highlight-color);
}

/* 验证部分样式 */
.verified-section {
    padding: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.verified-badge {
    width: 30px;
    height: 30px;
    background-color: var(--text-color);
    color: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
}

/* 分类容器 */
#categorizedApps {
    margin-top: 2rem;
}

.category-section {
    margin-bottom: 3rem;
}

.category-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.parent-category-section {
    margin-bottom: 4rem;
}

.child-category-section {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--highlight-color);
}

.child-category-section h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.parent-category-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: normal;
}

.category-description {
    color: var(--text-muted-color);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* 应用网格 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.app-card {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
    height: 175px;
    overflow: hidden;
    position: relative;
}

.app-card:hover {
    transform: translateY(-5px);
}

.app-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-description {
    font-size: 0.9rem;
    color: var(--text-muted-color);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* 已安装标记样式 */
.installed-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--success-color);
    color: white;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border-radius: 8px;
    margin: 10% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.admin-content {
    max-width: 600px;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.progress-bar {
    height: 20px;
    background-color: var(--background-color);
    border-radius: 10px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--text-muted-color);
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 5px;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    cursor: pointer;
}

/* 管理切换按钮 */
#adminToggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.3s;
    z-index: 900;
}

#adminToggle:hover {
    transform: scale(1.1);
}

/* 隐藏的应用分类 */
.hidden-category {
    display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .verified-section, .category-filter {
        padding: 2rem 1rem;
    }
    
    .app-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .filter-btn {
        width: 100%;
    }
}

/* 應用列表樣式 */
.app-list {
    margin: 1.5rem 0;
    border-radius: 5px;
    overflow: hidden;
}

.app-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: var(--card-bg-color);
    border-bottom: 1px solid rgba(127, 127, 127, 0.1);
    cursor: pointer;
    transition: background-color 0.2s;
}

.app-list-item:last-child {
    border-bottom: none;
}

.app-list-item:hover {
    background-color: var(--category-bg-color);
}

.app-list-category {
    font-size: 0.8rem;
    color: var(--text-muted-color);
    padding: 0.2rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* 管理按鈕差距 */
#manageCategoriesBtn {
    margin-top: 0.5rem;
}

/* 資訊樣式 */
.info-message {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    padding: 20px;
    color: var(--text-color);
    margin-top: 1rem;
}

.info-message h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* 模態框按鈕 */
.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

#uninstallBtn {
    background-color: #EF4444;
    border: none;
    color: white;
}

#uninstallBtn:hover {
    background-color: #DC2626;
} 