/* リセット & ベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e1e8ed;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* メインコンテンツ */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 300px);
}

/* フィルターセクション */
.filters {
    margin-bottom: 40px;
}

.search-box {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

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

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* アプリグリッド */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* アプリカード */
.app-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

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

.app-card.hidden {
    display: none;
}

.app-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #5877ff 0%, #d0cbff 100%); /* 一旦、適当なグラデーション */
}

.app-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
    white-space: pre-line;
}

.app-description {
    color: var(--text-light);
    margin-bottom: 15px;
    flex: 1;
}

.app-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.app-tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 15px;
    font-size: 0.85rem;
}

.app-links {
    display: flex;
    gap: 10px;
}

.app-link {
    flex: 1;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

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

.app-link.primary:hover {
    background: #357abd;
}

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

.app-link.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 結果なし */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* フッター */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filter-buttons {
        justify-content: center;
    }

    .header {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .app-links {
        flex-direction: column;
    }
}
