/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
}

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

/* ヘッダー */
header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

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

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* セクション共通 */
section {
    padding: 4rem 0;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
}

/* ニュースセクション */
.news-section {
    background: white;
}

.news-list {
    display: grid;
    gap: 2rem;
}

.news-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Pinnedニュースは大きく表示 */
.news-item-pinned {
    flex-direction: column;
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #f8f9fa 100%);
}

.news-item-pinned .news-image img {
    height: 300px;
}

.news-item-pinned h3 {
    font-size: 2rem;
}

/* Recentニュースも少し大きめ */
.news-item-recent {
    border-left-color: #f39c12;
}

.news-item-recent h3 {
    font-size: 1.75rem;
}

.news-image {
    flex-shrink: 0;
}

.news-image img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.news-item-pinned .news-image img,
.news-item-recent .news-image img {
    width: 100%;
}

.news-content {
    flex: 1;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.news-item time {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.news-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.news-excerpt {
    color: #555;
    margin-bottom: 1rem;
}

.read-more-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.read-more-btn:hover {
    background: #2980b9;
}

.category {
    display: inline-block;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.category-release {
    background: #27ae60;
}

.category-event {
    background: #e74c3c;
}

.category-update {
    background: #3498db;
}

.pinned-badge {
    background: #e74c3c;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* オーバーレイ */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
}

.overlay-content {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    padding: 2rem;
}

.overlay-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #7f8c8d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.overlay-close:hover {
    background: #ecf0f1;
}

.overlay-body h2 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.overlay-body time {
    display: block;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.overlay-body img {
    width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
}

.overlay-body a {
    color: #3498db;
    text-decoration: underline;
}

/* ゲーム一覧 */
.games-section {
    background: #ecf0f1;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.game-banner {
    display: block;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

.game-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.game-banner-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #2c3e50;
}

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

.game-banner:hover .game-banner-image img {
    transform: scale(1.05);
}

.game-banner-info {
    padding: 1.5rem;
}

.game-banner h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.release-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.platform-tag {
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.platform-Steam {
    background: #171a21;
}

.platform-Switch {
    background: #e60012;
}

.platform-Xbox {
    background: #107c10;
}

.platform-iOS {
    background: #000;
}

.platform-Android {
    background: #3ddc84;
}

/* 会社情報 */
.about-section {
    background: white;
    text-align: center;
}

.about-section p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* フッター */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    nav {
        flex-wrap: wrap;
    }

    section h2 {
        font-size: 2rem;
    }

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

    /* ニュースカードを縦並び */
    .news-item {
        flex-direction: column;
    }

    .news-image img {
        width: 100%;
        height: 200px;
    }

    .news-item-pinned h3 {
        font-size: 1.5rem;
    }

    .news-item-recent h3 {
        font-size: 1.25rem;
    }

    /* オーバーレイ調整 */
    .overlay.active {
        padding: 1rem;
    }

    .overlay-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .overlay.active {
        padding: 0;
    }

    .overlay-content {
        border-radius: 0;
        max-height: 100vh;
    }
}
