/* グローバルスタイル */
html, body {
    margin: 0;
    padding: 0;
    background-color: #337c9e;
    color: #ffffff;
}

/* デバッグ情報の表示制御 */
.debug-info {
    opacity: 0;
    transition: opacity 0.3s;
}

body.show-debug .debug-info {
    opacity: 1;
}

/* タイトルのスタイル */
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.main-title {
    text-align: center;
    margin: 0;
}

.info-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    background: transparent;
    position: relative;
}

.info-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.info-icon[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    top: 30px;  /* 下方向に表示 */
    right: 0;
    padding: 10px;
    background: rgba(64, 130, 169, 0.98);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    width: 280px;
    max-width: 280px;
    padding: 12px;
    white-space: pre-wrap;
    line-height: 1.3;
    text-align: left;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    border: 1px solid #444;
    transform: translateY(-10px);
    z-index: 1000;  /* 最前面に表示 */
    line-height: 1.6;  /* 行間を広げる */
    text-align: left;  /* 左揃え */
}

.info-icon:hover[data-tooltip]::before {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);  /* スムーズな表示アニメーション */
}

/* メインコンテナのスタイル */
#main-display {
    background: transparent !important;
}

.orbit-container, .right-panels {
    background: transparent !important;
}

/* ローディング表示用のスタイル */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 999;
}

/* 天球表示のローディング */
#east-sky.loading::after,
#west-sky.loading::after {
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border-width: 3px;
}

/* 満ち欠け表示のローディング */
#phase-indicator.loading::after {
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-width: 2px;
}

/* ホバー時にカーソルを変更 */
[id$="-view"]:not(.loading),
[id$="-sky"]:not(.loading),
#phase-indicator:not(.loading) {
    cursor: pointer;
}

/* 読み込み中はポインターイベントを無効化 */
.loading {
    pointer-events: none;
}