/*
Theme Name: JOSCR Theme
Description: 日本オタク&サブカルチャーリハビリテーション研究会 オリジナルテーマ
Author: JOSCR Dev Team
Version: 1.5
*/

:root {
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --accent-yellow: #ffe600;
    --accent-cyan: #00f2ff;
    --accent-pink: #ff0055;
    --gray-light: #f4f4f4;
    --border-bold: 3px solid #1a1a1a;
    --font-main: 'Noto Sans JP', sans-serif;
    --font-head: 'Mochiy Pop One', sans-serif;
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.8;
}

html {
    scroll-behavior: smooth;
    margin-top: 0 !important;
}

/* 共通パーツ */
h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 900;
    line-height: 1.3;
    text-transform: uppercase;
}

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

.section-title {
    font-size: clamp(1.5rem, 7vw, 3.5rem);
    margin-bottom: 60px;
    -webkit-text-stroke: 2px var(--text-main);
    color: transparent;
    position: relative;
    display: inline-block;
    white-space: nowrap;
    max-width: 100%;
}
.section-title::before {
    content: attr(data-text);
    position: absolute;
    top: 6px;
    left: 6px;
    color: var(--accent-yellow);
    z-index: -1;
    -webkit-text-stroke: 0;
}

.btn-push {
    display: inline-block;
    background: #fff;
    color: var(--text-main);
    border: var(--border-bold);
    padding: 15px 40px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 6px 6px 0 var(--text-main);
    transition: all 0.2s;
    font-size: 1.1rem;
}
.btn-push:hover {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 var(--text-main);
    background: var(--accent-cyan);
}
.btn-push.primary {
    background: var(--accent-yellow);
}
.btn-push.primary:hover {
    background: #fff;
}

/* Header */
header {
    border-bottom: var(--border-bold);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    width: 100%;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-head);
    font-size: 1.8rem;
    color: var(--text-main);
    text-decoration: none;
    background: var(--accent-yellow);
    padding: 0 10px;
    transform: skew(-10deg);
    border: 2px solid var(--text-main);
}
.logo span { display: inline-block; transform: skew(10deg); }

.nav-menu {
    display: flex;
    gap: 20px;
}
.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: bold;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--accent-pink); }

@media (max-width: 768px) {
    .nav-menu { display: none; }
}

/* TOP (HERO) */
.hero {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(var(--text-main) 1px, transparent 1px);
    background-size: 30px 30px;
    width: 100%;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-badge {
    background: var(--text-main);
    color: #fff;
    display: inline-block;
    padding: 5px 15px;
    font-weight: bold;
    transform: rotate(-2deg);
    margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 30px;
    background: #fff;
    display: inline-block;
    padding: 10px;
    border: var(--border-bold);
    box-shadow: 10px 10px 0 var(--accent-cyan);
    max-width: 100%;
}

/* Sticker Cloud */
.sticker-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 40px 0;
    max-width: 800px;
}
.sticker {
    font-size: 0.9rem;
    font-weight: bold;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid var(--text-main);
    border-radius: 50px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    user-select: none;
}
.sticker:hover { transform: scale(1.1) rotate(-3deg); z-index: 10; box-shadow: 5px 5px 0 var(--text-main); }
.st-pink { background: var(--accent-pink); color: #fff; }
.st-cyan { background: var(--accent-cyan); }
.st-yellow { background: var(--accent-yellow); }

/* 解析アニメーション用クラス */
.sticker.scanning {
    animation: scan-flash 0.5s linear infinite;
    border-color: var(--accent-cyan);
    background: var(--text-main) !important;
    color: var(--accent-cyan) !important;
}
@keyframes scan-flash {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Marquee */
.marquee-strip {
    background: var(--text-main);
    color: var(--accent-yellow);
    padding: 12px 0;
    white-space: nowrap;
    overflow: hidden;
    border-top: var(--border-bold);
    border-bottom: var(--border-bold);
    width: 101%; 
    margin-left: -0.5%;
    transform: rotate(-1deg);
    margin-top: 50px;
    margin-bottom: 50px;
}
.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
    font-family: var(--font-head);
    font-size: 1.2rem;
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* SECTIONS COMMON */
section { padding: 100px 0; border-bottom: 1px dashed var(--text-main); width: 100%; }

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-box {
    background: #fff;
    border: var(--border-bold);
    padding: 40px;
    position: relative;
    margin-top: 20px;
}
.about-box::after {
    content: "";
    position: absolute;
    top: 10px; left: 10px;
    width: 100%; height: 100%;
    border: var(--border-bold);
    z-index: -1;
    background: var(--accent-cyan);
}

/* LOGS (Blog Style) */
.logs-bg { background: var(--gray-light); }
.log-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}
.case-card {
    background: #fff;
    border: var(--border-bold);
    box-shadow: 8px 8px 0 var(--text-main);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}
.case-card:hover { transform: translate(-4px, -4px); box-shadow: 12px 12px 0 var(--accent-pink); }

.case-header {
    background: var(--text-main);
    color: #fff;
    padding: 10px 20px;
    font-family: var(--font-head);
    display: flex;
    justify-content: space-between;
}
.case-body { padding: 25px; flex-grow: 1; }
.case-title { font-size: 1.3rem; margin-bottom: 15px; line-height: 1.4; }
.case-title a { text-decoration: none; color: inherit; }

.clinical-note {
    margin-top: 20px;
    padding: 15px;
    background: #fffbe6;
    border: 2px dashed #aaa;
    font-size: 0.9rem;
}

/* DATABASE & MEMBER STYLES */
.db-wrapper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.db-category { border: var(--border-bold); background: #fff; padding: 20px; }
.db-category h3 { font-size: 1.2rem; border-bottom: 4px solid var(--accent-yellow); margin-bottom: 15px; display: inline-block; }
.db-list { list-style: none; }
.db-list li { margin-bottom: 8px; padding-left: 20px; position: relative; cursor: pointer; transition: 0.2s; }
.db-list li::before { content: "▶"; position: absolute; left: 0; font-size: 0.7rem; color: var(--accent-pink); top: 5px; }
.member-scroll { display: flex; gap: 30px; overflow-x: auto; padding-bottom: 40px; }
.member-card { min-width: 280px; background: #fff; border: var(--border-bold); padding: 20px; text-align: center; }
.member-avatar { width: 120px; height: 120px; background: #eee; border-radius: 50%; border: var(--border-bold); margin: 0 auto 20px; overflow: hidden; position: relative; }
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-role { background: var(--text-main); color: #fff; display: inline-block; padding: 4px 12px; font-size: 0.8rem; margin-bottom: 10px; border-radius: 15px; }
.member-hobby { color: var(--accent-pink); font-weight: bold; font-family: var(--font-head); display: block; margin-top: 10px; }
footer { background: var(--text-main); color: #fff; padding: 60px 20px; text-align: center; }
.footer-links a { color: #fff; margin: 0 15px; text-decoration: none; }

@media (max-width: 900px) {
    .about-grid, .db-wrapper { grid-template-columns: 1fr; }
    .db-wrapper { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .db-wrapper { grid-template-columns: 1fr; }
}

/* === ここから追加：サイバーアナライズ・ポップアップ用のスタイル === */
.analysis-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.analysis-box {
    background: rgba(10, 15, 28, 0.95);
    border: 2px solid var(--accent-cyan);
    padding: 20px;
    width: 90%;
    max-width: 400px;
    color: #fff;
    /* Google Fontsが読み込まれていない場合のフォールバック */
    font-family: monospace; 
    position: relative;
    box-shadow: 0 0 20px var(--accent-cyan);
    transform: scale(0.9);
    opacity: 0;
    transition: 0.3s;
}
.analysis-box.active {
    transform: scale(1);
    opacity: 1;
}
.analysis-header {
    border-bottom: 1px dashed var(--accent-cyan);
    margin-bottom: 10px;
    padding-bottom: 5px;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    display: flex;
    justify-content: space-between;
}
.analysis-target {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 0 5px #fff;
}
.analysis-result {
    font-size: 1rem;
    line-height: 1.6;
}
.analysis-close {
    background: var(--accent-cyan);
    color: #000;
    border: none;
    padding: 5px 20px;
    margin-top: 20px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    width: 100%;
}
/* タイピング風カーソル */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1em;
    background: var(--accent-cyan);
    animation: blink 1s infinite;
    vertical-align: bottom;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }