/* 
  ゲーム一覧 - styles.css
  Rich Header/Footer + Game List UI
*/

:root {
    /* Colors */
    --color-primary: #ff6600;
    --color-primary-light: #ff8c00;
    --color-primary-glow: rgba(255, 102, 0, 0.3);
    --color-bg: #f6f2ef;
    --color-surface: #ffffff;
    --color-ink: #333333;
    --color-ink-muted: #807f75;
    --color-header-bg: rgba(26, 26, 26, 0.85);
    --color-footer-bg: #1a1a1a;
    --color-border: #dddddd;
    
    /* Fonts */
    --font-main: Arial, sans-serif;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-standard: all 0.3s ease-in-out;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    text-align: center;
    background-color: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- カスタムスクロールバー --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* --- リッチ・ヘッダー (Glassmorphism) --- */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    z-index: 2000;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-header.is-scrolled {
    padding: 2px 0;
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 8px;
    margin-right: 12px;
    display: flex;
    transition: var(--transition-smooth);
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

.logo-container img {
    height: 30px;
    width: auto;
    display: block;
}

.site-title {
    font-size: 16px;
    font-weight: 400;
    margin-left: 10px;
    margin-top: 0;
    margin-bottom: 0;
}

.menu-button {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-button:hover .hamburger-line {
    background: var(--color-primary);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: white;
    transition: var(--transition-smooth);
}

.menu-button.is-active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-button.is-active .hamburger-line:nth-child(2) { opacity: 0; }
.menu-button.is-active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.dropdown-menu {
    position: absolute;
    right: 20px;
    top: 70px;
    width: 280px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    pointer-events: none;
}

.dropdown-menu.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--color-ink);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
    text-align: left;
}

.dropdown-menu a span { color: var(--color-primary); font-size: 10px; }
.dropdown-menu a:hover { background: #f0f0f0; padding-left: 22px; }

.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--color-primary);
    width: 0%;
}

/* --- ヘッダー画像 --- */
header {
    width: 100%;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 20px;
}

header img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    max-height: 166px;
}

/* --- メインコンテンツ --- */
main {
    flex-grow: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ページタイトル */
.page-title {
    text-align: center;
    font-size: 20px;
    font-weight: 550;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-ink);
    margin-top: 10px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding: 10px 20px;
}

.page-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 1.5px;
    background-color: var(--color-primary);
    margin: 4px auto 0;
    border-radius: 2px;
}

.page-title span {
    background: linear-gradient(to right, var(--color-primary-light), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* パンくずリスト */
.breadcrumb {
    text-align: left;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--color-ink-muted);
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin-left: 8px;
    opacity: 0.5;
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-standard);
}

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

/* ゲームカードコンテナ */
.game-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.game-card {
    background: var(--color-surface);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: var(--color-ink);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    text-align: left;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.game-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.game-card:hover .game-card-image img {
    transform: scale(1.1);
}

.game-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-card-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: var(--color-ink);
}

.game-genre {
    display: inline-block;
    background: var(--color-bg);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 10px;
    width: fit-content;
}

.game-card-content p {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--color-ink-muted);
    line-height: 1.6;
    flex-grow: 1;
}

.play-label {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-standard);
}

.game-card:hover .play-label {
    padding-left: 5px;
}

/* --- リッチ・フッター --- */
.rich-footer {
    background: var(--color-footer-bg);
    color: white;
    padding: 60px 20px 20px;
    margin-top: 100px;
    position: relative;
    text-align: center;
}

.rich-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    text-align: left;
}

.footer-brand h3 { font-size: 20px; margin: 15px 0 10px; color: var(--color-primary); }
.footer-brand p { font-size: 14px; opacity: 0.7; line-height: 1.8; }
.footer-logo { height: 40px; }

.footer-nav { display: flex; gap: 60px; }
.footer-nav-group h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; opacity: 0.5; }
.footer-nav-group a { display: block; color: white; text-decoration: none; font-size: 12px; margin-bottom: 12px; opacity: 0.8; transition: 0.3s; }
.footer-nav-group a:hover { opacity: 1; color: var(--color-primary); transform: translateX(5px); }

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.copyright {
    margin: 0;
    font-size: 12px;
    opacity: 0.5;
}

/* --- トップへ戻るボタン --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 10px 20px var(--color-primary-glow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 9999;
}

.back-to-top.is-visible { 
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto; 
}

.back-to-top:hover { 
    transform: translateY(-5px); 
    background: var(--color-primary-light); 
}

/* アフィリエイト広告スタイル */
a[href*="a8.net"],
a[href*="accesstrade.net"] {
    display: inline-block;
    margin: 30px auto;
    line-height: 0;
    text-align: center;
}

a[href*="a8.net"] > img,
a[href*="accesstrade.net"] > img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-nav { justify-content: center; gap: 40px; }
    
    header { margin-bottom: 5px; }
    header img { max-height: 200px; }

    .page-title { font-size: 15px; margin-top: 1px; margin-bottom: 10px; }
    .page-title::after { width: 40px; }

    .game-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}