/* /assets/styles.css */

/* ===== 全域樣式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Microsoft JhengHei", "微軟正黑體", sans-serif;
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
    color: #e2e8f0;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 標題區塊 ===== */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
    position: relative;
}

.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

.agent-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.agent-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.agent-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f1f5f9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.header-description {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.header-description a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-description a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* ===== 狀態說明區塊 ===== */
.status-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.status-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-block;
}

.status-green-icon {
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6));
}

.status-yellow-icon {
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
}

.status-note {
    width: 100%;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

/* 應用卡片中的狀態指示器 */
.app-name .status-icon {
    margin-right: 8px;
    vertical-align: middle;
    width: 18px;
    height: 18px;
}

/* 響應式設計：手機上調整按鈕位置 */
@media (max-width: 768px) {
    header {
        position: relative;
    }
    
    .header-actions {
        position: static;
        margin-top: 15px;
        display: flex;
        justify-content: center;
    }
    
    .agent-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .agent-icon {
        width: 18px;
        height: 18px;
    }
    
    header h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .header-description {
        font-size: 0.85rem;
        margin-bottom: 15px;
        padding: 0 10px;
    }
}

/* ===== 搜尋區塊 ===== */
.search-section {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 14px 20px;
    font-size: 1rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #e2e8f0;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== 軟體列表區塊 ===== */
.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .app-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .app-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .app-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== 軟體卡片 ===== */
.app-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(30, 41, 59, 0.85);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    margin: 0 auto 16px;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.app-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.app-name .status-icon {
    flex-shrink: 0;
    margin-right: 0;
}

.app-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.meta-item {
    display: flex;
    align-items: center;
}

.app-desc {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.5;
}

/* ===== 下載按鈕 ===== */
.download-btn {
    display: block;
    text-align: center;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
    margin-top: auto;
}

.download-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* ===== 無結果提示 ===== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 1.2rem;
}

