:root {
    --bg-main: #07090e;
    --bg-card: rgba(13, 18, 28, 0.85);
    --bg-card-border: rgba(0, 243, 255, 0.18);
    --neon-blue: #00f3ff;
    --neon-green: #00ff66;
    --neon-amber: #ffaa00;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --font-mono: 'Fira Code', 'Consolas', 'Courier New', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* --- ANIMATED BACKGROUND GRID OVERLAY --- */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    /* 動くグリッド線 */
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    animation: gridScroll 15s linear infinite;
}

/* 背景を流れるようなグリッドアニメーション */
@keyframes gridScroll {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 40px;
    }
}

/* 脈動する背景の輝き（ネオンライト効果） */
.grid-overlay::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(0, 243, 255, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(0, 255, 102, 0.06) 0%, transparent 50%);
    animation: neonGlow 8s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* --- STAGING BANNER --- */
.staging-banner {
    background: linear-gradient(90deg, #b45309, #d97706, #b45309);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    padding: 4px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.staging-banner span {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 26px;
    left: 0; width: 100%;
    z-index: 999;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(7, 9, 14, 0.85);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
}

.logo-icon { color: var(--neon-blue); font-size: 1.3rem; }

.test-badge {
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid var(--neon-amber);
    color: var(--neon-amber);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
}

nav { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 0.8rem; }
nav a { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
nav a:hover { color: var(--neon-blue); }

/* --- HERO SECTION --- */
.hero {
    position: relative;
    z-index: 1;
    padding: 160px 5% 80px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-green);
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid rgba(0, 255, 102, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.status-dot {
    width: 6px; height: 6px;
    background-color: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-green);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
}

.highlight {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 35px;
    max-width: 560px;
}

.hero-cta { display: flex; gap: 15px; }

.btn {
    padding: 12px 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--neon-blue);
    color: #000;
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.terminal {
    background: #04060a;
    border: 1px solid var(--bg-card-border);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow: hidden;
}

.terminal-header {
    background: #0d121d;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title { color: var(--text-muted); font-size: 0.7rem; }
.terminal-body { padding: 20px; min-height: 200px; color: #a7f3d0; }
.terminal-line { margin-bottom: 8px; display: flex; gap: 8px; }
.prompt { color: var(--neon-blue); }
.cmd { color: #fff; }

.watermark-stamp {
    position: absolute;
    right: 5%;
    top: 22%;
    font-family: var(--font-mono);
    font-size: 4.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    border: 6px solid rgba(255, 255, 255, 0.02);
    padding: 10px 30px;
    transform: rotate(-12deg);
    pointer-events: none;
    user-select: none;
}

/* --- SECTIONS & CARDS --- */
.section {
    position: relative;
    z-index: 1;
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header { margin-bottom: 40px; }

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before { content: '//'; color: var(--neon-blue); }
.section-sub { color: var(--text-muted); font-size: 0.9rem; margin-top: 5px; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 243, 255, 0.1);
}

.card-icon { font-size: 1.8rem; color: var(--neon-blue); margin-bottom: 15px; }
.card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.card-desc { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

.portfolio-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-green);
    background: rgba(0, 255, 102, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.story-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 8px;
    padding: 35px;
}

.story-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-amber);
    margin-bottom: 10px;
}

.sim-container {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 8px;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.sim-control { margin-bottom: 20px; }
.sim-label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 8px; }
input[type=range] { width: 100%; accent-color: var(--neon-blue); }

.sim-result {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.sim-price { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 800; color: var(--neon-green); margin: 10px 0; }

.diag-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 8px;
    padding: 35px;
}

.diag-btn {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.diag-btn:hover {
    border-color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.05);
    color: var(--neon-blue);
}

footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 5%;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #04060a;
}

@media (max-width: 768px) {
    .hero { grid-template-columns: 1fr; padding-top: 120px; }
    .sim-container { grid-template-columns: 1fr; }
    nav { display: none; }
}
