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

:root {
    --primary-color: #ffc0e3;
    --primary-hover: #ffadd9;
    --secondary-color: #ff9acf;
    --danger-color: #ff6b9d;
    --bg-color: #fff5fa;
    --card-bg: #ffffff;
    --text-primary: #4a2640;
    --text-secondary: #8b6b84;
    --border-color: #ffe4f1;
    --shadow: 0 1px 3px rgba(255, 182, 218, 0.2);
    --shadow-md: 0 4px 6px rgba(255, 182, 218, 0.25);
    --shadow-lg: 0 10px 15px rgba(255, 182, 218, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
                 'Noto Sans JP', Meiryo, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* ヘッダー */
header {
    background: var(--primary-color);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.header-main {
    flex: 1;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 700;
}

header .subtitle {
    font-size: 0.9rem;
    opacity: 0.95;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-twitter {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s;
}

.btn-twitter:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.btn-twitter svg {
    display: block;
}

.btn-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s;
}

.btn-discord:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.btn-discord svg {
    display: block;
}

.btn-lite {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-lite:hover {
    background: rgba(255, 255, 255, 0.3);
}

.last-updated {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 180px;
}

.last-updated small {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.last-updated time {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* メインコンテンツ */
main {
    padding: 40px 0;
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

/* 情報・登録要望ラッパー */
.info-request-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

/* 情報セクション */
.info-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.info-section p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.info-section ul {
    margin-left: 20px;
    margin-top: 15px;
}

.info-section li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* 検索セクション */
.search-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.search-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#searchInput {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: 6px;
    transition: background-color 0.2s;
}

.filter-controls label:hover {
    background-color: var(--border-color);
}

.filter-controls input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* プロファイル一覧セクション */
.profiles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.count {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* プロファイルカード */
.profile-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* プロファイル画像 */
.profile-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #ffe4f1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-card:hover .profile-image img {
    transform: scale(1.05);
}

.profile-image-placeholder {
    width: 100%;
    height: 200px;
    background: #ffe4f1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-header {
    margin-bottom: 15px;
    padding: 25px 25px 0 25px;
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* 情報欄のリンク */
.info-link {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}

.info-link:hover {
    color: var(--primary-color);
}

.info-link::after {
    content: '🔗';
    margin-left: 6px;
    font-size: 0.85em;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.info-link:hover::after {
    opacity: 1;
}

.profile-name .info-link {
    color: var(--text-primary);
}

.profile-name .info-link:hover {
    color: var(--primary-color);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.profile-image .badge,
.profile-image-placeholder .badge {
    position: absolute;
    top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-image .badge.official,
.profile-image-placeholder .badge.official,
.profile-image .badge.unofficial,
.profile-image-placeholder .badge.unofficial {
    right: 10px;
}

.profile-image .badge.notes-badge,
.profile-image-placeholder .badge.notes-badge {
    left: 10px;
    z-index: 10;
}

.badge.official {
    background-color: #ffe4f1;
    color: #c2185b;
}

.badge.unofficial {
    background-color: #fce4ec;
    color: #880e4f;
}

.badge.notes-badge {
    background-color: #fff9e6;
    color: #d97706;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.badge.notes-badge:hover {
    background-color: #fde68a;
    transform: scale(1.05);
}

.profile-info {
    margin: 15px 0;
    padding: 0 25px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 価格バッジ */
.price-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.price-badge.price-free {
    background-color: #f0f4c3;
    color: #558b2f;
}

.price-badge.price-paid {
    background-color: #fff9e6;
    color: #d97706;
}

.price-badge.price-bundled {
    background-color: #ffe4f1;
    color: #c2185b;
}

.price-amount {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.support-badges {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    padding: 0 25px;
}

.support-badge {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.support-badge.supported {
    background-color: #f0f4c3;
    color: #558b2f;
}

.support-badge.not-supported {
    background-color: #ffccdd;
    color: #c2185b;
}

.profile-footer {
    margin-top: 15px;
    padding: 0 25px 25px 25px;
}

.download-link {
    display: inline-block;
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.download-link:hover {
    background-color: var(--primary-hover);
}

.profile-dates {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 登録要望セクション */
.request-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.request-section p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background-color: #ff85b8;
    transform: scale(1.05);
}

.note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* フッター */
footer {
    background-color: var(--text-primary);
    color: white;
    padding: 20px 0;
    text-align: right;
    margin-top: 60px;
}

footer p {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* 空状態 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* 備考ツールチップ */
.notes-tooltip {
    position: fixed;
    background-color: var(--text-primary);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: pre-wrap;
    word-wrap: break-word;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
@media (min-width: 1500px) {
    .profiles-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .header-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .last-updated {
        align-items: flex-start;
        width: 100%;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header .subtitle {
        font-size: 1rem;
    }

    .info-request-wrapper {
        grid-template-columns: 1fr;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .profiles-header {
        flex-direction: column;
        align-items: start;
        gap: 15px;
    }

    .search-controls {
        gap: 10px;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls label {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 30px 0;
    }

    h2 {
        font-size: 1.5rem;
    }

    .profile-card {
        padding: 20px;
    }

    .info-row {
        flex-direction: column;
        gap: 5px;
    }
}
