:root {
    --bg-color: #0b0f19;
    /* Dark dark blue background */
    --text-color: #e0e0e0;
    /* Light text */
    --primary-color: #00ffcc;
    /* Cyan / Neon green accent */
    --secondary-color: #ff00ff;
    /* Magenta accent */
    --window-bg: #111111;
    /* RPG Box background */
    --window-border: #ffffff;
    /* RPG Box border */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'DotGothic16', sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
}

/* CRT Scanline effect: It simulates the horizontal lines found in old CRT monitors */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%,
            rgba(0, 0, 0, 0.25));
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    /* Make clicks pass through */
}

/* Typography & Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 5px var(--secondary-color);
}

h1,
h2,
h3 {
    font-weight: normal;
    letter-spacing: 2px;
}

/* Base Layout for Sections */
.section {
    min-height: 100vh;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

/* --- Header / Navigation --- */
header {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

nav {
    background: var(--window-bg);
    border: 4px solid var(--window-border);
    padding: 15px;
    /* Box shadow to fake a 3D pixel effect */
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.8), inset -2px -2px 0px rgba(255, 255, 255, 0.3);
}

nav .title {
    font-size: 1.1rem;
    color: var(--primary-color);
    border-bottom: 2px dashed #555;
    margin-bottom: 15px;
    padding-bottom: 5px;
    text-align: center;
}

nav ul {
    list-style: none;
}

nav li {
    margin: 10px 0;
    font-size: 1.2rem;
}

/* --- RPG Window Style --- */
.window {
    background: var(--window-bg);
    border: 4px solid var(--window-border);
    padding: 40px;
    width: 100%;
    position: relative;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.6);
    margin-bottom: 40px;
}

.window-title {
    position: absolute;
    top: -20px;
    left: 20px;
    background: var(--bg-color);
    padding: 0 15px;
    color: var(--primary-color);
    font-size: 1.5rem;
    text-shadow: 0 0 5px var(--primary-color);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    max-width: none;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/hero_bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    /* Darken so text is readable */
    z-index: -1;
    /* Pixelate the background image slightly if it is high res */
    image-rendering: pixelated;
}

.hero-content {
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 40px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
}

.hero .glitch {
    font-size: 5rem;
    color: #fff;
    text-shadow: 3px 3px var(--secondary-color), -3px -3px var(--primary-color);
    margin-bottom: 30px;
    letter-spacing: 5px;
}

.hero .blink {
    font-size: 1.8rem;
    color: var(--primary-color);
    animation: blinker 1s step-end infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* --- Tabs & Game List UI --- */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    background: #222;
    color: #fff;
    border: 3px solid #555;
    padding: 10px 25px;
    font-family: 'DotGothic16', sans-serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.tab-btn:hover {
    background: #444;
    border-color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: #000;
    border-color: #fff;
    text-shadow: none;
    font-weight: bold;
}

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

.game-card {
    border: 3px solid #444;
    padding: 20px;
    background: #1a1a1a;
    transition: transform 0.2s, border-color 0.2s;
    /* 隠すアニメーション用（script.jsで操作します） */
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 255, 204, 0.2);
}

.game-card h3 {
    margin-bottom: 12px;
    color: #fff;
    font-size: 1.6rem;
    border-bottom: 1px dotted #666;
    padding-bottom: 5px;
}

.game-thumbnail {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 2px solid #333;
    margin-bottom: 15px;
    border-radius: 4px;
    display: block;
    image-rendering: pixelated;
    /* ドット絵感を強調する場合は残す */
}

.game-card p {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 1rem;
    margin-top: 15px;
    border: 2px solid;
    font-weight: bold;
}

.steam-tag {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.consumer-tag {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* --- Work & Contact Content --- */
.typing-text p,
.work-content p {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.skills-list {
    margin-top: 20px;
    list-style-type: none;
    padding-left: 20px;
}

.skills-list li {
    font-size: 1.3rem;
    margin-bottom: 10px;
    position: relative;
    color: var(--primary-color);
}

.skills-list li::before {
    content: "▶";
    position: absolute;
    left: -20px;
    color: var(--secondary-color);
}

.contact-card {
    text-align: center;
}

.email-box {
    margin: 30px auto;
    padding: 20px;
    border: 3px dashed var(--primary-color);
    display: inline-block;
    font-size: 1.8rem;
    color: var(--primary-color);
    background: rgba(0, 255, 204, 0.05);
    letter-spacing: 3px;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
    word-break: break-all;
    max-width: 100%;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px;
    border-top: 4px solid var(--window-bg);
    background: #000;
}

.btn-top {
    display: inline-block;
    margin-top: 20px;
    background: #222;
    padding: 10px 20px;
    border: 2px solid #555;
    color: #fff;
    font-size: 1.2rem;
}

.btn-top:hover {
    border-color: var(--primary-color);
    background: #000;
}

/* --- Responsive Adjustments --- */
@media (max-width: 850px) {
    header {
        position: static;
        margin: 20px auto;
        display: flex;
        justify-content: center;
    }

    nav {
        width: 90%;
        max-width: 400px;
    }

    .hero .glitch {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .email-box {
        font-size: 1.2rem;
        padding: 15px 10px;
        letter-spacing: 1px;
    }

    .section {
        padding: 40px 15px;
    }

    .window {
        padding: 30px 15px;
    }
}