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

:root {
    --cyber-pink: #ff0080;
    --cyber-blue: #00ffff;
    --cyber-purple: #9d00ff;
    --cyber-green: #00ff41;
    --dark-bg: #0a0a0f;
    --neon-glow: 0 0 10px var(--cyber-blue), 0 0 20px var(--cyber-blue), 0 0 30px var(--cyber-blue);
}

body {
    font-family: 'Courier New', monospace;
    background: var(--dark-bg);
    color: var(--cyber-blue);
    overflow: hidden;
    cursor: none;
}

/* カスタムカーソル */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--cyber-pink);
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px var(--cyber-pink), 0 0 20px var(--cyber-pink);
}

.cursor-trail {
    width: 10px;
    height: 10px;
    background: var(--cyber-blue);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.5;
    transition: transform 0.15s ease;
}

/* プレイヤー設定画面 */
.player-setup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.setup-content {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.95), rgba(30, 0, 50, 0.95));
    border: 2px solid var(--cyber-blue);
    box-shadow: 0 0 40px var(--cyber-blue);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.setup-content h1 {
    margin-bottom: 10px;
}

.setup-content h2 {
    color: var(--cyber-pink);
    margin-bottom: 30px;
    font-size: 1.5em;
}

.setup-section {
    margin-bottom: 25px;
    text-align: left;
}

.setup-section label {
    display: block;
    color: var(--cyber-blue);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.setup-section input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--cyber-blue);
    color: var(--cyber-blue);
    font-family: 'Courier New', monospace;
    font-size: 1em;
}

.setup-section input:focus {
    outline: none;
    box-shadow: var(--neon-glow);
}

.color-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.color-selector .color-option {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid var(--cyber-blue);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-selector .color-option:hover {
    transform: scale(1.1);
    border-color: var(--cyber-pink);
}

.color-selector .color-option.selected {
    border: 4px solid var(--cyber-pink);
    box-shadow: 0 0 20px var(--cyber-pink);
}

.btn-start {
    background: transparent;
    border: 3px solid var(--cyber-pink);
    color: var(--cyber-pink);
    padding: 15px 50px;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 20px;
}

.btn-start:hover {
    background: var(--cyber-pink);
    color: var(--dark-bg);
    box-shadow: 0 0 30px var(--cyber-pink);
    transform: scale(1.05);
}

/* ローディング画面 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

#loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    text-align: center;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(0, 255, 255, 0.2);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: var(--cyber-blue);
    box-shadow: var(--neon-glow);
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* グリッチエフェクト */
.glitch {
    position: relative;
    font-size: 2em;
    font-weight: bold;
    color: var(--cyber-blue);
    text-shadow: var(--neon-glow);
    animation: glitch 1s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyber-pink);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--cyber-green);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 31px, 0); }
    20% { clip: rect(85px, 9999px, 140px, 0); }
    40% { clip: rect(65px, 9999px, 75px, 0); }
    60% { clip: rect(40px, 9999px, 80px, 0); }
    80% { clip: rect(25px, 9999px, 55px, 0); }
    100% { clip: rect(95px, 9999px, 105px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 119px, 0); }
    20% { clip: rect(25px, 9999px, 90px, 0); }
    40% { clip: rect(85px, 9999px, 105px, 0); }
    60% { clip: rect(15px, 9999px, 45px, 0); }
    80% { clip: rect(75px, 9999px, 125px, 0); }
    100% { clip: rect(35px, 9999px, 85px, 0); }
}

/* HUDオーバーレイ */
.hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    padding: 20px;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hud-title h1 {
    font-size: 2.5em;
    margin: 0;
}

.hud-info {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border: 1px solid var(--cyber-blue);
    box-shadow: var(--neon-glow);
    font-size: 1.2em;
}

.hud-message {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 30px;
    border: 1px solid var(--cyber-pink);
    box-shadow: 0 0 10px var(--cyber-pink);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.hud-controls {
    position: absolute;
    bottom: 100px;
    left: 20px;
}

.control-hint {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    border: 1px solid var(--cyber-blue);
    box-shadow: var(--neon-glow);
}

.control-hint span {
    font-size: 0.9em;
    color: var(--cyber-blue);
    letter-spacing: 2px;
}

/* キャンバス */
#canvas {
    display: block;
    width: 100%;
    height: 100vh;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.95), rgba(30, 0, 50, 0.95));
    padding: 40px;
    border: 2px solid var(--cyber-blue);
    box-shadow: 0 0 30px var(--cyber-blue);
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    pointer-events: auto;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    color: var(--cyber-pink);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--cyber-blue);
    text-shadow: var(--neon-glow);
}

/* モーダルコンテンツスタイル */
#modal-body {
    color: var(--cyber-blue);
}

#modal-body h2 {
    color: var(--cyber-pink);
    text-shadow: 0 0 10px var(--cyber-pink);
    margin-bottom: 20px;
    font-size: 2em;
}

#modal-body p {
    line-height: 1.8;
    margin-bottom: 15px;
}

#modal-body form {
    margin-top: 20px;
}

#modal-body input,
#modal-body textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--cyber-blue);
    color: var(--cyber-blue);
    font-family: 'Courier New', monospace;
    font-size: 1em;
}

#modal-body input:focus,
#modal-body textarea:focus {
    outline: none;
    box-shadow: var(--neon-glow);
}

#modal-body button {
    background: transparent;
    border: 2px solid var(--cyber-pink);
    color: var(--cyber-pink);
    padding: 12px 30px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

#modal-body button:hover {
    background: var(--cyber-pink);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--cyber-pink);
}

/* スクロールバーカスタマイズ */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--cyber-blue);
    box-shadow: var(--neon-glow);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-pink);
}

/* ボイス/ビデオコントロール */
.voice-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 1500;
}

.voice-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--cyber-blue);
    background: rgba(10, 10, 15, 0.9);
    color: var(--cyber-blue);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--cyber-blue);
}

.voice-btn.mic-on {
    background: var(--cyber-blue);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--cyber-blue);
}

.voice-btn.mic-off {
    border-color: var(--cyber-pink);
    color: var(--cyber-pink);
}

.voice-btn.video-on {
    background: var(--cyber-pink);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--cyber-pink);
}

.voice-btn.video-off {
    border-color: var(--cyber-purple);
    color: var(--cyber-purple);
}

/* チャットUI */
.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 500px;
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.95), rgba(30, 0, 50, 0.95));
    border: 2px solid var(--cyber-blue);
    box-shadow: 0 0 30px var(--cyber-blue);
    display: flex;
    flex-direction: column;
    z-index: 1500;
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.chat-container.minimized {
    transform: translateY(calc(100% - 50px));
}

.chat-header {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--cyber-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.chat-header .glitch {
    font-size: 1.2em;
}

.chat-toggle {
    background: transparent;
    border: 1px solid var(--cyber-pink);
    color: var(--cyber-pink);
    padding: 5px 15px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

.chat-toggle:hover {
    background: var(--cyber-pink);
    color: var(--dark-bg);
    box-shadow: 0 0 10px var(--cyber-pink);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    min-height: 300px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 5px;
    animation: messageSlideIn 0.3s ease;
    word-wrap: break-word;
}

.chat-message.user {
    background: rgba(255, 0, 128, 0.2);
    border-left: 3px solid var(--cyber-pink);
    align-self: flex-end;
    max-width: 80%;
}

.chat-message.ai {
    background: rgba(0, 255, 255, 0.2);
    border-left: 3px solid var(--cyber-blue);
    align-self: flex-start;
    max-width: 80%;
}

.chat-message.system {
    background: rgba(157, 0, 255, 0.2);
    border-left: 3px solid var(--cyber-purple);
    align-self: center;
    text-align: center;
    font-size: 0.9em;
    opacity: 0.8;
}

.chat-message .message-author {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.chat-message.user .message-author {
    color: var(--cyber-pink);
}

.chat-message.ai .message-author {
    color: var(--cyber-blue);
}

.chat-message .message-text {
    color: var(--cyber-blue);
    line-height: 1.4;
}

.chat-message .message-time {
    font-size: 0.75em;
    opacity: 0.6;
    margin-top: 5px;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-input-wrapper {
    display: flex;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--cyber-blue);
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--cyber-blue);
    color: var(--cyber-blue);
    font-family: 'Courier New', monospace;
    font-size: 1em;
    outline: none;
}

.chat-input:focus {
    box-shadow: 0 0 10px var(--cyber-blue);
}

.chat-send {
    background: transparent;
    border: 2px solid var(--cyber-pink);
    color: var(--cyber-pink);
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-send:hover {
    background: var(--cyber-pink);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--cyber-pink);
}

/* チャットスクロールバー */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--cyber-blue);
    box-shadow: 0 0 5px var(--cyber-blue);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-pink);
}

/* カスタマイズUI */
/* グラフィック設定UI */
.graphics-ui {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.graphics-content {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.95), rgba(30, 0, 50, 0.95));
    border: 2px solid var(--cyber-blue);
    box-shadow: 0 0 40px var(--cyber-blue);
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

.graphics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--cyber-blue);
    padding-bottom: 15px;
}

.graphics-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.graphics-close {
    background: transparent;
    border: none;
    color: var(--cyber-pink);
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s;
}

.graphics-close:hover {
    color: var(--cyber-blue);
    text-shadow: 0 0 10px var(--cyber-blue);
}

.graphics-section {
    margin-bottom: 30px;
}

.graphics-section h3 {
    color: var(--cyber-blue);
    margin-bottom: 15px;
    font-size: 1.3em;
    text-shadow: 0 0 10px var(--cyber-blue);
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid var(--cyber-blue);
    border-radius: 5px;
}

.setting-row label {
    color: var(--cyber-blue);
    font-size: 1.1em;
}

.setting-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.setting-row select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--cyber-blue);
    color: var(--cyber-blue);
    padding: 5px 15px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 5px;
}

.graphics-actions {
    text-align: center;
    margin-top: 30px;
}

.customize-ui {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.customize-ui.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.customize-content {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.95), rgba(30, 0, 50, 0.95));
    border: 2px solid var(--cyber-blue);
    box-shadow: 0 0 40px var(--cyber-blue);
    padding: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
}

.customize-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--cyber-blue);
    padding-bottom: 15px;
}

.customize-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.customize-close {
    background: transparent;
    border: none;
    color: var(--cyber-pink);
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s;
}

.customize-close:hover {
    color: var(--cyber-blue);
    text-shadow: 0 0 10px var(--cyber-blue);
}

.customize-section {
    margin-bottom: 30px;
}

.customize-section h3 {
    color: var(--cyber-blue);
    margin-bottom: 15px;
    font-size: 1.3em;
    text-shadow: 0 0 10px var(--cyber-blue);
}

/* カラーグリッド */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid var(--cyber-blue);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: var(--cyber-pink);
}

.color-option.selected {
    border: 4px solid var(--cyber-pink);
    box-shadow: 0 0 30px var(--cyber-pink);
}

.color-name {
    background: rgba(0, 0, 0, 0.8);
    color: var(--cyber-blue);
    padding: 5px;
    font-size: 0.7em;
    width: 100%;
    text-align: center;
}

/* アクセサリーグリッド */
.accessory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.accessory-option {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--cyber-blue);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.accessory-option:hover {
    transform: scale(1.05);
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--cyber-pink);
}

.accessory-option.selected {
    border: 3px solid var(--cyber-pink);
    background: rgba(255, 0, 128, 0.2);
    box-shadow: 0 0 20px var(--cyber-pink);
}

.accessory-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--cyber-blue);
}

.accessory-name {
    display: block;
    font-size: 0.9em;
    color: var(--cyber-blue);
}

/* アクションボタン */
.customize-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--cyber-blue);
}

.btn-apply {
    background: transparent;
    border: 3px solid var(--cyber-pink);
    color: var(--cyber-pink);
    padding: 15px 50px;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: bold;
}

.btn-apply:hover {
    background: var(--cyber-pink);
    color: var(--dark-bg);
    box-shadow: 0 0 30px var(--cyber-pink);
    transform: scale(1.05);
}

/* モバイルコントロール */
.mobile-joystick {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2000;
    user-select: none;
    -webkit-user-select: none;
}

.joystick-base {
    width: 120px;
    height: 120px;
    background: rgba(0, 255, 255, 0.1);
    border: 3px solid var(--cyber-blue);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 20px var(--cyber-blue);
    transition: all 0.3s;
}

.joystick-base.active {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 30px var(--cyber-blue);
}

.joystick-stick {
    width: 50px;
    height: 50px;
    background: var(--cyber-pink);
    border: 2px solid var(--cyber-blue);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--cyber-pink);
    transition: box-shadow 0.2s;
}

.joystick-base.active .joystick-stick {
    box-shadow: 0 0 25px var(--cyber-pink);
}

.joystick-label {
    text-align: center;
    color: var(--cyber-blue);
    margin-top: 5px;
    font-size: 0.8em;
    text-shadow: 0 0 5px var(--cyber-blue);
}

.mobile-look-area {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1500;
    pointer-events: auto;
    touch-action: none;
}

.look-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--cyber-blue);
    font-size: 1em;
    opacity: 0.5;
    pointer-events: none;
    text-align: center;
    text-shadow: 0 0 10px var(--cyber-blue);
    transition: opacity 0.3s;
}

/* モバイルレスポンシブ */
@media (max-width: 768px) {
    .hud-title h1 {
        font-size: 1.5em;
    }

    .hud-info {
        font-size: 0.9em;
        padding: 5px 10px;
    }

    .hud-message {
        font-size: 0.8em;
        padding: 8px 15px;
        bottom: 20px;
    }

    .hud-controls {
        display: none;
    }

    .chat-container {
        width: 90%;
        max-width: 350px;
        right: 5%;
        bottom: 80px;
    }

    .modal-content {
        width: 90%;
        max-width: 90%;
        padding: 20px;
        max-height: 70vh;
    }

    .glitch {
        font-size: 1.3em !important;
    }

    #modal-body h2 {
        font-size: 1.5em;
    }

    /* カーソルは非表示 */
    .cursor,
    .cursor-trail {
        display: none;
    }

    body {
        cursor: auto;
    }
}

/* タブレット向け */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-joystick,
    .mobile-look-area {
        display: block;
    }

    .hud-controls {
        display: block;
    }
}

/* 横向き対応 */
@media (max-height: 500px) and (orientation: landscape) {
    .hud-title h1 {
        font-size: 1.2em;
    }

    .hud-message {
        bottom: 10px;
        font-size: 0.7em;
    }

    .mobile-joystick {
        bottom: 10px;
    }

    .joystick-base {
        width: 100px;
        height: 100px;
    }

    .chat-container {
        max-height: 60vh;
        bottom: 60px;
    }
}
