/* ========================================
   News Elementary - HD Pixel Art Style
   ニュースすごろく 公式サイト
   ======================================== */

/* CSS Variables */
:root {
    /* Color Palette - Retro Game Inspired */
    --primary: #2d5a27;
    --primary-light: #4a8c40;
    --primary-dark: #1a3518;
    --secondary: #d4a017;
    --secondary-light: #f4c430;
    --accent: #c73e1d;
    --accent-light: #e85a3d;
    
    /* Neutral Colors */
    --bg-dark: #1a1a2e;
    --bg-medium: #16213e;
    --bg-light: #0f3460;
    --text-light: #edf6f9;
    --text-muted: #a8b2d1;
    
    /* Pixel Border Colors */
    --border-light: #5a7d9a;
    --border-dark: #1a1a2e;
    
    /* Shadows */
    --pixel-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
    --pixel-shadow-hover: 6px 6px 0px rgba(0, 0, 0, 0.5);
    
    /* Fonts */
    --font-pixel: 'Press Start 2P', 'DotGothic16', monospace;
    --font-body-ja: 'Noto Sans JP', 'DotGothic16', sans-serif;
    --font-body-zh-hans: 'Noto Sans SC', sans-serif;
    --font-body-zh-hant: 'Noto Sans TC', sans-serif;
    --font-body-en: 'Noto Sans JP', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body-ja);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Language-specific font families */
body[data-lang="en"] {
    font-family: var(--font-body-en);
}
body[data-lang="zh-hans"] {
    font-family: var(--font-body-zh-hans);
}
body[data-lang="zh-hant"] {
    font-family: var(--font-body-zh-hant);
}

/* Pixel Background Pattern */
.pixel-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image: 
        linear-gradient(45deg, var(--bg-medium) 25%, transparent 25%),
        linear-gradient(-45deg, var(--bg-medium) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--bg-medium) 75%),
        linear-gradient(-45deg, transparent 75%, var(--bg-medium) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.3;
}

/* Language Visibility Control */
.text-ja, .text-en, .text-zh-hans, .text-zh-hant,
.title-ja, .title-en, .title-zh-hans, .title-zh-hant {
    display: none;
}

body[data-lang="ja"] .text-ja,
body[data-lang="ja"] .title-ja { display: inline; }
body[data-lang="en"] .text-en,
body[data-lang="en"] .title-en { display: inline; }
body[data-lang="zh-hans"] .text-zh-hans,
body[data-lang="zh-hans"] .title-zh-hans { display: inline; }
body[data-lang="zh-hant"] .text-zh-hant,
body[data-lang="zh-hant"] .title-zh-hant { display: inline; }

/* Language Navigation */
.lang-nav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    padding: 8px;
    background: rgba(26, 26, 46, 0.95);
    border: 3px solid var(--border-light);
    box-shadow: var(--pixel-shadow);
}

.lang-btn {
    font-family: var(--font-body-ja);
    font-size: 12px;
    padding: 8px 12px;
    background: var(--bg-medium);
    color: var(--text-muted);
    border: 2px solid var(--border-light);
    cursor: pointer;
    transition: all 0.1s ease;
}

.lang-btn:hover {
    background: var(--bg-light);
    color: var(--text-light);
}

.lang-btn.active {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary-light);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px;
    background:
        linear-gradient(180deg, rgba(26, 26, 46, 0.7) 0%, rgba(34, 34, 59, 0.7) 50%, rgba(42, 42, 74, 0.7) 100%),
        url('../images/top_section_bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, var(--primary) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, var(--secondary) 0%, transparent 30%);
    opacity: 0.1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.logo-container {
    margin-bottom: 30px;
}

.pixel-frame {
    display: inline-block;
    padding: 30px 50px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border: 6px solid var(--secondary);
    box-shadow: 
        var(--pixel-shadow),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.pixel-frame::before,
.pixel-frame::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--secondary-light);
}

.pixel-frame::before {
    top: -6px;
    left: -6px;
}

.pixel-frame::after {
    bottom: -6px;
    right: -6px;
}

.game-title {
    font-family: var(--font-pixel);
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    color: var(--text-light);
    text-shadow: 
        3px 3px 0px var(--primary-dark),
        -1px -1px 0px var(--secondary);
    letter-spacing: 2px;
    line-height: 1.4;
}

.tagline {
    font-size: 1.3rem;
    color: var(--secondary-light);
    margin-bottom: 40px;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

/* Dice Animation */
.dice-animation {
    margin-top: 40px;
}

.dice {
    font-size: 4rem;
    animation: diceRoll 3s ease-in-out infinite;
    display: inline-block;
    filter: drop-shadow(4px 4px 0px rgba(0, 0, 0, 0.5));
}

@keyframes diceRoll {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
}

/* Sections */
.section {
    padding: 80px 0;
}

.section:nth-child(even) {
    background: rgba(15, 52, 96, 0.3);
}

/* Intro Section Background */
.section.intro {
    position: relative;
    background-image: url('../images/about_the_game_bg.png');
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
}

.section.intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        var(--bg-dark) 0%,
        rgba(10, 25, 47, 0.85) 50%,
        rgba(10, 25, 47, 0.7) 100%
    );
    pointer-events: none;
}

.section.intro .container {
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--font-pixel);
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--secondary-light);
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

/* Intro Cards */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.intro-card {
    background: linear-gradient(135deg, var(--bg-medium), var(--bg-dark));
    border: 3px solid var(--border-light);
    padding: 30px;
    text-align: center;
    box-shadow: var(--pixel-shadow);
    transition: all 0.2s ease;
}

.intro-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--pixel-shadow-hover);
    border-color: var(--secondary);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.intro-card h3 {
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    color: var(--secondary-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.intro-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Screenshots Section Background */
.section.screenshots {
    position: relative;
    background-image: url('../images/screenshot_section_bg.png');
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
}

.section.screenshots::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        var(--bg-dark) 0%,
        rgba(10, 25, 47, 0.85) 50%,
        rgba(10, 25, 47, 0.7) 100%
    );
    pointer-events: none;
}

.section.screenshots .container {
    position: relative;
    z-index: 1;
}

/* Screenshots Gallery */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.screenshot-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--bg-medium), var(--bg-dark));
    border: 4px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--pixel-shadow);
}

.placeholder-content {
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.screenshot-item {
    aspect-ratio: 16/9;
    border: 4px solid var(--border-light);
    box-shadow: var(--pixel-shadow);
    overflow: hidden;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Features List */
.feature-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 15px;
    background: linear-gradient(90deg, var(--bg-medium), transparent);
    border-left: 4px solid var(--secondary);
    transition: all 0.2s ease;
}

.feature-list li:hover {
    background: linear-gradient(90deg, var(--bg-light), transparent);
    border-left-color: var(--secondary-light);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

/* Download Section Background */
.section.download {
    position: relative;
    background-image: url('../images/download_section_bg.png');
    background-size: cover;
    background-position: bottom center;
    background-repeat: no-repeat;
}

.section.download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        var(--bg-dark) 0%,
        rgba(10, 25, 47, 0.85) 50%,
        rgba(10, 25, 47, 0.7) 100%
    );
    pointer-events: none;
}

.section.download .container {
    position: relative;
    z-index: 1;
}

/* Store Buttons */
.store-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--bg-medium), var(--bg-dark));
    border: 3px solid var(--border-light);
    color: var(--text-light);
    text-decoration: none;
    box-shadow: var(--pixel-shadow);
    transition: all 0.2s ease;
}

.store-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--pixel-shadow-hover);
    border-color: var(--secondary);
}

.store-btn.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
}

.store-icon {
    font-size: 2rem;
}

.store-text {
    text-align: left;
}

.store-text small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.store-text strong {
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    border-top: 4px solid var(--border-light);
    padding: 50px 0 30px;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: var(--secondary-light);
    border-color: var(--secondary);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-medium);
    border: 3px solid var(--border-light);
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--secondary);
    transform: translate(-2px, -2px);
    box-shadow: var(--pixel-shadow);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Pixel Text Effect */
.pixel-text {
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lang-nav {
        top: 10px;
        right: 10px;
        flex-wrap: wrap;
        max-width: calc(100% - 20px);
    }
    
    .lang-btn {
        font-size: 10px;
        padding: 6px 10px;
    }
    
    .hero {
        padding: 80px 20px;
    }
    
    .pixel-frame {
        padding: 20px 30px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .store-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .store-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 0.9rem;
    }
    
    .intro-card h3 {
        font-size: 0.7rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Selection Color */
::selection {
    background: var(--secondary);
    color: var(--bg-dark);
}
