@charset "UTF-8";

/* =========================================
   Variables & Reset
   ========================================= */
:root {
    --primary: #8a2be2;
    --accent: #ff0055;
    --bg: #050505;
    --glass: rgba(20, 20, 20, 0.95);
    --border: rgba(255, 255, 255, 0.15);
    --font-script: 'Dancing Script', cursive;
    --font-jp: 'Zen Kaku Gothic New', sans-serif;
    --font-serif: 'Yuji Syuku', serif;
}

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

/* PCでマウスがある時のみカーソルを消す */
body.custom-cursor-active,
body.custom-cursor-active * {
    cursor: none;
}

@media (hover: none) and (pointer: coarse) {
    body.custom-cursor-active,
    body.custom-cursor-active * { cursor: auto; }
}
button, .game-btn, a { touch-action: manipulation; }

html { background-color: var(--bg); overscroll-behavior-y: none; }
body {
    background-color: transparent; color: #ffffff;
    font-family: var(--font-jp); overflow-x: hidden;
    position: relative; min-height: 100vh;
}

/* =========================================
   Background & Loader
   ========================================= */
#bg-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none; overflow: hidden;
    transform: translateZ(0); 
}
.bg-orb {
    position: absolute; border-radius: 50%; opacity: 0.3;
    background: radial-gradient(circle, var(--orb-color) 0%, transparent 60%);
}
.orb-1 { --orb-color: var(--primary); width: 60vw; height: 60vw; top: -20%; left: -20%; }
.orb-2 { --orb-color: var(--accent); width: 50vw; height: 50vw; bottom: -10%; right: -10%; }
.orb-3 { --orb-color: #4b0082; width: 40vw; height: 40vw; top: 40%; left: 30%; opacity: 0.2; }

.bg-particle {
    position: absolute; width: 2px; height: 2px; background: #fff;
    border-radius: 50%; opacity: 0.5; will-change: transform, opacity;
}

#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 20000; display: flex; justify-content: center; align-items: center;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    background-color: transparent;
}
#loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-panel {
    position: absolute; top: 0; width: 50%; height: 100%;
    background-color: #000; transition: transform 0.8s cubic-bezier(0.8, 0, 0.2, 1);
}
.panel-left { left: 0; border-right: 1px solid #333; }
.panel-right { right: 0; border-left: 1px solid #333; }
.slash-line {
    position: absolute; width: 0%; height: 2px;
    background: #fff; box-shadow: 0 0 10px #fff, 0 0 20px var(--primary);
    z-index: 10001; transform: rotate(-15deg);
}
#loader.loaded .panel-left { transform: translateX(-100%); }
#loader.loaded .panel-right { transform: translateX(100%); }
.loader-spinner { text-align: center; color: #666; width: 100%; padding: 20px; }

/* =========================================
   Navigation & Header
   ========================================= */
.header-logo {
    position: fixed; top: 40px; left: 5%; font-family: var(--font-script);
    font-size: 2rem; color: #fff; text-decoration: none; z-index: 1000;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8); transition: opacity 0.3s;
}
.header-logo:hover { opacity: 0.8; text-shadow: 0 0 15px var(--primary); }

#sound-toggle {
    position: fixed; top: 35px; right: 5%;
    width: 40px; height: 40px; display: flex; justify-content: center; align-items: center;
    cursor: none; color: #666; transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%;
    z-index: 2000;
}
#sound-toggle svg { width: 20px; height: 20px; transition: transform 0.3s; }
#sound-toggle .sound-wave { opacity: 0; transition: opacity 0.3s; }
#sound-toggle.active { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 15px rgba(255, 0, 85, 0.3); }
#sound-toggle.active .sound-wave { opacity: 1; }
#sound-toggle:hover { transform: scale(1.1); color: #fff; border-color: #fff; }

nav.global-nav {
    position: fixed; top: 35px; right: calc(5% + 70px); 
    display: flex; gap: 30px; z-index: 1000; align-items: center;
    height: 40px;
}
nav a {
    color: #fff; text-decoration: none; font-weight: 700; font-size: 0.9rem;
    opacity: 0.7; transition: opacity 0.3s; text-shadow: 0 0 5px rgba(0,0,0,0.8);
}
nav a:hover, nav a.current { opacity: 1; text-shadow: 0 0 10px var(--primary); }

.hamburger {
    display: none; position: fixed; top: 30px; right: 20px; width: 50px; height: 50px;
    background: transparent; border: none; z-index: 2000; cursor: none;
}
.hamburger span {
    display: block; width: 30px; height: 2px; background: #fff;
    margin: 6px auto; transition: all 0.3s ease-in-out; box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .header-logo { left: 50%; transform: translateX(-50%); top: 25px; width: auto; max-width: 60%; white-space: nowrap; text-align: center; }
    #sound-toggle { right: auto; left: 20px; top: 30px; }
    nav.global-nav {
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(5, 5, 5, 0.95); display: flex; flex-direction: column;
        justify-content: center; align-items: center; gap: 40px;
        opacity: 0; pointer-events: none; transition: opacity 0.4s ease; z-index: 1500;
        right: auto;
    }
    nav.global-nav a { font-size: 1.5rem; transform: translateY(20px); transition: transform 0.4s ease; }
    nav.global-nav.active { opacity: 1; pointer-events: auto; }
    nav.global-nav.active a { transform: translateY(0); }
    .hamburger { display: block; }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* =========================================
   Layout & Common
   ========================================= */
section { padding: 100px 0; position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.container { width: 92%; max-width: 1280px; margin: 0 auto; }
.section-title {
    font-size: 4rem; font-weight: 900; color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.2); text-align: center;
    margin-bottom: 80px; letter-spacing: 0.1em;
}

#hero {
    height: 100dvh; width: 100%; padding: 0; overflow: hidden;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; position: relative;
    opacity: 0; transition: opacity 1s ease 0.5s;
}
#hero.visible { opacity: 1; }

/* --- Review Fix: Mobile Title Layout --- */
.hero-title {
    font-family: var(--font-script);
    /* スマホで改行させない＆画面幅に応じてサイズ調整 */
    font-size: clamp(2rem, 11vw, 5rem);
    white-space: nowrap;
    color: #ffffff;
    margin-bottom: -20px; position: relative; z-index: 2;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.hero-logo {
    max-width: 800px; width: 85%; height: auto;
    animation: float 6s ease-in-out infinite;
    position: relative; z-index: 1;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
.hero-copy {
    margin-top: 10px; font-size: 1.2rem; letter-spacing: 0.3em;
    color: rgba(255,255,255,0.6); text-transform: uppercase; font-weight: 700;
    position: relative; z-index: 2;
}

@media (max-width: 600px) {
    #hero { text-align: center; }
    /* Mobile専用の調整は clamp() で処理済みだが、念のためマージン調整 */
    .hero-title { margin-bottom: -10px; }
    .hero-logo { display: block; margin: 0 auto 10px auto; width: 80%; max-width: 350px; }
    .hero-copy { width: 100%; font-size: 0.7rem; white-space: nowrap; padding: 0 10px; }
}

/* =========================================
   Member & List
   ========================================= */
.member-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 30px; }

.member-item {
    display: flex; flex-direction: column; align-items: center;
    width: 18%; min-width: 150px; position: relative;
    transition: transform 0.3s;
    content-visibility: auto; 
    contain-intrinsic-size: 150px 250px;
}
.member-item:hover { transform: translateY(-5px); z-index: 10; }

.member-circle {
    width: 150px; height: 150px; border-radius: 50%;
    background: var(--glass); border: 1px solid var(--border);
    position: relative; overflow: hidden; transition: all 0.3s;
    display: flex; justify-content: center; align-items: center;
}
.member-item:hover .member-circle {
    transform: scale(1.05); border-color: rgba(138, 43, 226, 0.5);
    background: rgba(138, 43, 226, 0.1); 
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}
.member-circle img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: transform 0.3s; }
.member-item:hover img { opacity: 1; transform: scale(1.05); }

.member-aura {
    position: absolute; top: -10%; left: -10%; width: 120%; height: 120%;
    border-radius: 50%; background: conic-gradient(from 0deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity 0.3s; 
    animation: spin 4s linear infinite paused; 
    z-index: -1; will-change: opacity;
}
.member-item:hover .member-aura { opacity: 0.6; animation-play-state: running; }

.member-name { margin-top: 15px; font-size: 1.1rem; font-weight: 700; text-align: center; }
.member-role { font-size: 0.8rem; color: #aaa; margin-top: 5px; text-transform: uppercase; }

/* スマホ用: ホバーできない環境ならSNSリンクは出さないか、詳細で見る */
.member-socials { display: none; } 

.placeholder-text { font-size: 3rem; color: rgba(255,255,255,0.2); font-weight: 900; }
.coming-soon .member-circle { border: 1px dashed rgba(255,255,255,0.2); background: transparent; }
.coming-soon:hover { transform: none; }

/* --- Member Modal --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000; opacity: 0; visibility: hidden;
    transition: all 0.3s ease; display: flex; justify-content: center; align-items: center;
    cursor: pointer;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--glass); border: 1px solid var(--border); border-radius: 30px;
    width: 90%; max-width: 800px; padding: 40px; position: relative;
    transform: scale(0.95); transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex; gap: 40px; align-items: center; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    cursor: default;
}
.modal-overlay.active .modal-content { transform: scale(1); }

.modal-close {
    position: absolute; top: 20px; right: 20px; font-size: 2rem; color: #fff;
    cursor: pointer; background: transparent; border: none; opacity: 0.5; transition: 0.3s; z-index: 10;
    width: 44px; height: 44px; /* タップ領域確保 */
}
.modal-close:hover { opacity: 1; transform: rotate(90deg); color: var(--accent); }

.modal-img-wrap {
    width: 300px; height: 300px; flex-shrink: 0; border-radius: 20px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--border);
}
.modal-img { width: 100%; height: 100%; object-fit: cover; }

.modal-info { flex-grow: 1; text-align: left; }
.modal-role { color: var(--primary); font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 5px; }
.modal-name { font-size: 3rem; font-weight: 900; margin-bottom: 20px; line-height: 1; font-family: var(--font-serif); }
.modal-detail-list { margin-bottom: 20px; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 15px 0; }
.detail-row { display: flex; margin-bottom: 8px; }
.detail-label { width: 100px; color: #888; font-size: 0.8rem; font-weight: bold; }
.detail-value { color: #fff; font-weight: 500; }
.modal-comment { font-size: 0.95rem; line-height: 1.8; color: #ccc; font-style: italic; margin-bottom: 20px; }
.modal-links { display: flex; gap: 15px; flex-wrap: wrap; }

/* スマホ対応: タップしやすいサイズに */
.modal-btn {
    padding: 15px 30px; /* 拡大 */
    background: rgba(255,255,255,0.1); border-radius: 30px;
    text-decoration: none; color: #fff; font-size: 1rem; font-weight: bold;
    border: 1px solid rgba(255,255,255,0.2); transition: 0.3s;
    cursor: pointer;
    min-width: 120px; text-align: center;
}
.modal-btn:hover { background: var(--primary); border-color: var(--primary); }

@media (max-width: 768px) {
    .modal-overlay { backdrop-filter: none; background: rgba(0, 0, 0, 0.9); }
    .modal-content { flex-direction: column; padding: 40px 20px; max-height: 90vh; overflow-y: auto; gap: 20px; }
    .modal-img-wrap { width: 150px; height: 150px; border-radius: 50%; }
    .modal-info { text-align: center; width: 100%; }
    .modal-name { font-size: 2rem; }
    .detail-row { justify-content: center; text-align: left; }
    .detail-label { width: auto; margin-right: 10px; }
    .modal-close { top: 10px; right: 10px; }
    .modal-links { justify-content: center; }
}

@media (max-width: 600px) {
    .member-grid { gap: 20px 8px; }
    .member-item { width: 31%; min-width: 0; margin-bottom: 5px; }
    .member-circle { width: 100%; height: auto; aspect-ratio: 1/1; border-width: 1px; }
    .member-name { font-size: 0.65rem; margin-top: 8px; }
    .member-role { font-size: 0.4rem; margin-top: 2px; }
    .placeholder-text { font-size: 1.5rem; }
}

/* =========================================
   Game Card & News
   ========================================= */
.game-select-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; width: 100%; }
.game-card {
    background: var(--glass); border: 1px solid var(--border); border-radius: 20px;
    padding: 30px; text-decoration: none; color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: all 0.4s; min-height: 250px; position: relative; overflow: hidden;
}
.game-card:hover { transform: translateY(-10px); background: rgba(255,255,255,0.08); border-color: var(--primary); }
.game-card-title { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 10px; z-index: 2; }
.game-card-icon { font-size: 4rem; margin-bottom: 20px; z-index: 2; }
.game-card-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent 50%, rgba(138,43,226,0.1) 100%); z-index: 1;
}

.news-list { width: 100%; max-width: 800px; display: flex; flex-direction: column; gap: 25px; }
.news-item {
    background: var(--glass); border: 1px solid var(--border); border-radius: 15px;
    padding: 25px 35px; transition: all 0.3s;
    display: flex; gap: 20px; align-items: flex-start;
}
.news-item:hover { transform: translateX(10px); background: rgba(255,255,255,0.1); border-color: var(--primary); }

.news-img-wrap {
    width: 120px; height: 120px; flex-shrink: 0;
    border-radius: 10px; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.news-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.news-content { flex-grow: 1; }
.news-date { display: block; font-family: var(--font-script); color: var(--primary); margin-bottom: 5px; }
.news-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.news-desc { font-size: 0.9rem; color: #aaa; line-height: 1.6; }

@media (max-width: 600px) {
    .news-item { flex-direction: column; align-items: center; text-align: center; }
    .news-img-wrap { width: 100%; height: 200px; margin-bottom: 15px; }
}

/* =========================================
   Kanji Game System
   ========================================= */
.page-game body { overflow: hidden; }
.page-game section { padding: 0; padding-top: 80px; height: 100vh; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; }

.game-logo-title { text-align: center; font-family: var(--font-serif); font-size: 2rem; margin-bottom: 20px; line-height: 1.2; }
.game-logo-title span { color: var(--accent); font-size: 2.8rem; font-weight: 900; }

.game-board {
    width: 90%; max-width: 600px; margin: 0 auto;
    background: rgba(20, 20, 20, 0.9); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px; padding: 30px; text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    display: flex; flex-direction: column; justify-content: center;
}

.rules-box { text-align: left; background: rgba(255,255,255,0.05); padding: 15px; border-radius: 10px; margin-bottom: 20px; font-size: 0.9rem; line-height: 1.6; }
.rules-box strong { color: var(--primary); }
.strike { text-decoration: line-through; color: #666; }
.warning-text { color: var(--accent); font-size: 0.85rem; margin-top: 10px; font-weight: bold; }

.level-select-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; width: 100%;
}
.level-btn { margin: 0; background: linear-gradient(45deg, #222, #333); cursor: pointer; }
.level-btn:hover { background: linear-gradient(45deg, var(--primary), var(--accent)); transform: translateY(-2px); }

.question-label { font-size: 0.9rem; color: #888; letter-spacing: 0.2em; margin-bottom: 10px; }
.question-text {
    font-family: var(--font-serif); font-weight: 700;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    min-height: 2.4em; display: flex; align-items: center; justify-content: center;
    font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1.2; margin-bottom: 20px;
}

.interaction-wrapper {
    position: relative; width: 100%; height: 200px;
    margin-bottom: 20px; display: grid; grid-template-areas: "stack"; overflow: hidden;
}
.input-area, .answer-area {
    grid-area: stack; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.answer-area { opacity: 0; pointer-events: none; transform: translateY(10px); }
.hide-input .input-area { opacity: 0; pointer-events: none; transform: translateY(-10px); }
.show-answer .answer-area { opacity: 1; pointer-events: auto; transform: translateY(0); }

#user-input {
    width: 90%; max-width: 300px; padding: 15px; font-size: 1.5rem; text-align: center;
    background: rgba(255, 255, 255, 0.1); border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px; color: #fff; outline: none; font-family: var(--font-jp);
}
#user-input:focus { border-color: var(--primary); background: rgba(255, 255, 255, 0.15); }

.error-msg {
    color: var(--accent); font-size: 0.9rem; margin-top: 10px; font-weight: bold;
    opacity: 0; transform: translateY(-5px); transition: all 0.3s;
}
.error-msg.show { opacity: 1; transform: translateY(0); }

.judge-result {
    font-size: 4rem; font-weight: 900; margin-bottom: 5px;
    line-height: 1.1; text-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.judge-correct { color: #00ffaa; text-shadow: 0 0 20px #00ffaa; }
.judge-wrong { color: var(--accent); text-shadow: 0 0 20px var(--accent); }

.wrong-label, .correct-wrap { font-size: 0.8rem; color: #aaa; margin-top: 5px; }
.wrong-text {
    font-size: 1.8rem; font-weight: 900; color: var(--accent);
    margin: 5px 0 10px 0; line-height: 1.1;
}
.correct-text { color: #fff; font-weight: 700; border-bottom: 1px solid #555; margin-left: 5px; }

.game-btn {
    padding: 10px 30px; font-size: 1.1rem; font-weight: 700;
    color: #fff; background: linear-gradient(45deg, #333, #555);
    border: none; border-radius: 50px; transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3); position: relative; overflow: hidden;
    margin-top: 0; cursor: pointer;
}
.score-display { margin-top: 15px; font-size: 0.9rem; color: #666; }

.result-score { 
    font-family: var(--font-jp); font-size: 5rem; font-weight: 900; color: #fff; margin: 20px 0; 
    text-shadow: 0 0 30px var(--primary); letter-spacing: 0.05em;
}
.result-msg {
    font-size: 1.2rem; color: #ccc; margin-bottom: 60px; line-height: 1.6;
}

@media (max-width: 600px) {
    .game-logo-title { font-size: 1.5rem; margin-bottom: 10px; }
    .game-board { padding: 15px; }
    .question-text { font-size: 2.5rem; margin-bottom: 10px; min-height: 2em; }
    .interaction-wrapper { height: 190px; }
    .judge-result { font-size: 3rem; margin-bottom: 5px; }
    .wrong-text { font-size: 1.5rem; margin: 2px 0 8px 0; }
    #user-input { padding: 10px; font-size: 1.3rem; }
}
@media (max-height: 600px) {
    .page-game section { justify-content: flex-start; padding-top: 60px; height: auto; min-height: 100vh; }
    .game-logo-title { font-size: 1.2rem; margin-bottom: 5px; }
    .question-text { font-size: 2rem; margin-bottom: 5px; }
    .interaction-wrapper { height: 140px; margin-bottom: 5px; }
    .judge-result { font-size: 2.5rem; }
    .wrong-text { font-size: 1.2rem; }
    .game-btn { padding: 8px 20px; font-size: 1rem; }
    .score-display { display: none; }
}

/* =========================================
   Footer & Common UI
   ========================================= */
footer {
    width: 100%; padding: 40px 0; background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid var(--border); text-align: center; position: relative; z-index: 10; margin-top: auto;
}
.footer-logo { font-family: var(--font-script); font-size: 2rem; color: #fff; margin-bottom: 20px; display: inline-block; }
.footer-links { display: flex; justify-content: center; gap: 30px; }
.copyright { font-size: 0.8rem; color: #666; margin-top: 20px; }

/* カーソル最適化: Z-Indexを限界突破させ、影を削除して軽量化 */
.cursor-dot { 
    width: 8px; height: 8px; background: white; position: fixed; border-radius: 50%; 
    z-index: 2147483647; 
    pointer-events: none; 
}
.cursor-outline { 
    width: 50px; height: 50px; 
    border: 1px solid rgba(255, 255, 255, 0.8); 
    box-shadow: none; 
    position: fixed; border-radius: 50%; 
    z-index: 2147483647; 
    pointer-events: none; transition: 0.2s; 
}
body.hovering .cursor-outline { width: 80px; height: 80px; background-color: rgba(138, 43, 226, 0.1); }
@media (hover: none) and (pointer: coarse) { .cursor-dot, .cursor-outline { display: none !important; } }

picture { display: contents; }
.member-circle picture, .game-card picture { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }


/* =========================================
   Countdown Game Styles (Scroll Fix)
   ========================================= */
.page-game body { overflow-y: auto; }
.page-game section { 
    min-height: 100vh; 
    height: auto; 
    padding: 100px 0; 
    justify-content: center;
}

.timer-display {
    font-family: 'Inter', sans-serif;
    font-size: 6rem;
    font-weight: 900;
    color: #fff;
    margin: 30px 0;
    text-shadow: 0 0 30px var(--primary);
    font-variant-numeric: tabular-nums;
    transition: opacity 0.5s ease;
}
.timer-display.blind { opacity: 0; }

.timer-msg {
    color: #aaa; font-size: 0.9rem; margin-bottom: 30px; letter-spacing: 0.1em;
}

.main-action-btn {
    width: 200px; height: 200px; border-radius: 50%;
    font-size: 2rem; display: flex; justify-content: center; align-items: center;
    margin: 0 auto 40px auto;
    border: 2px solid rgba(255,255,255,0.2);
    background: radial-gradient(circle, #333 0%, #111 100%);
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.2);
    transition: transform 0.1s, border-color 0.3s;
}
.main-action-btn:hover { transform: scale(1.05); border-color: var(--primary); }
.main-action-btn:active { transform: scale(0.95); }

/* ランキング */
.ranking-area { width: 100%; max-width: 400px; margin: 30px auto 0 auto; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.ranking-title { font-size: 1rem; color: var(--accent); margin-bottom: 15px; letter-spacing: 0.2em; font-weight: bold; }
.ranking-list { list-style: none; padding: 0; }
.ranking-list li {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.1); font-size: 0.95rem;
}
.rank-num { color: var(--primary); font-weight: bold; margin-right: 10px; width: 25px; }
.rank-name { flex-grow: 1; text-align: left; }
.rank-score { font-family: 'Inter', monospace; font-weight: bold; color: #fff; }
.rank-mode { font-size: 0.8rem; color: #666; margin-left: 10px; width: 40px; text-align: right; }

/* 結果モーダル */
.cd-result-content { flex-direction: column; text-align: center; gap: 15px; width: 90%; max-width: 400px; }
.cd-result-time { font-size: 5rem; font-weight: 900; color: #fff; line-height: 1; margin: 10px 0; }
.cd-result-msg { font-size: 1.5rem; font-weight: bold; color: var(--accent); margin-bottom: 10px; }

.entry-form { width: 100%; display: flex; flex-direction: column; gap: 15px; align-items: center; }

#player-name {
    width: 100%; padding: 12px; font-size: 1rem; color: #fff;
    background: rgba(0, 0, 0, 0.5); border: 1px solid #333;
    border-bottom: 2px solid var(--primary); border-radius: 4px;
    text-align: center; transition: all 0.3s ease;
}
#player-name:focus {
    outline: none; border-bottom-color: var(--accent);
    background: rgba(138, 43, 226, 0.1); box-shadow: 0 5px 15px rgba(138, 43, 226, 0.2);
}
#player-name::placeholder { color: #555; }

.text-link-btn { background: none; border: none; color: #666; text-decoration: underline; font-size: 0.8rem; cursor: pointer; }

@media (max-width: 600px) {
    .timer-display { font-size: 4rem; }
    .main-action-btn { width: 150px; height: 150px; font-size: 1.5rem; }
    .cd-result-time { font-size: 4rem; }
}

/* =========================================
   Visual FX: Scroll Reveal & Text Scramble
   ========================================= */

/* 下からフワッと浮き上がるアニメーション */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
    will-change: opacity, transform;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 順番に表示させるための遅延設定（必要な場合） */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* サイバー風テキスト解読中のスタイル */
.scramble-active {
    font-family: 'Courier New', monospace; /* 等幅フォントで機械的に見せる */
    color: var(--accent);
}