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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #000;
    color: #0f0;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(0, 20, 0, 0.9);
    padding: 10px 15px;
    border-bottom: 2px solid #0f0;
    position: relative;
}

header h1 {
    font-size: 18px;
    margin-bottom: 5px;
}

#status {
    font-size: 12px;
    color: #0f0;
}

.version {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 14px;
    color: #0f0;
    opacity: 0.7;
}

.mode-selector {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 20, 0, 0.9);
}

.mode-btn {
    flex: 1;
    padding: 10px;
    background: #001100;
    border: 1px solid #0f0;
    color: #0f0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active {
    background: #0f0;
    color: #000;
}

.view {
    display: none;
    flex: 1;
    position: relative;
}

.view.active {
    display: block;
}

#map {
    width: 100%;
    height: 100%;
}

/* レーダーモード */
#radarContainer {
    background: #000;
    display: none;
}

#radarContainer.active {
    display: block;
}

#radarCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.radar-overlay {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#distanceInfo, #directionInfo {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px #0f0;
    margin: 5px 0;
}

/* 情報パネル */
.info-panel {
    position: absolute;
    bottom: 70px;
    left: 10px;
    right: 10px;
    background: rgba(0, 20, 0, 0.95);
    border: 1px solid #0f0;
    padding: 10px;
    border-radius: 5px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
}

.info-item.danger {
    border-top: 1px solid #0f0;
    margin-top: 5px;
    padding-top: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #f00;
}

.label {
    opacity: 0.7;
}

/* サウンドコントロール */
.sound-control {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}

#soundToggle {
    width: 100%;
    padding: 12px;
    background: #333;
    border: 1px solid #666;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
}

#soundToggle.active {
    background: #0f0;
    color: #000;
    border: 1px solid #0f0;
}

.version-display {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: #0f0;
    opacity: 0.6;
}

/* アニメーション */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.danger {
    animation: pulse 0.5s infinite;
}

/* デバッグパネル */
.debug-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
}

#debugToggle {
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #0f0;
    color: #0f0;
    font-size: 12px;
    cursor: pointer;
}

.debug-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 70%;
    background: rgba(0, 20, 0, 0.95);
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 15px;
    z-index: 1000;
    overflow-y: auto;
}

.debug-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #0f0;
    text-align: center;
}

#debugLog {
    font-family: monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #0f0;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 5px;
}

.debug-actions {
    margin-top: 10px;
}

.debug-actions button {
    width: 100%;
    margin-bottom: 5px;
    padding: 10px;
    border: 1px solid #0f0;
    color: #0f0;
    cursor: pointer;
    font-size: 14px;
}

.debug-panel button {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: #001100;
    border: 1px solid #0f0;
    color: #0f0;
    cursor: pointer;
}
