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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
}

/* 메인 컨테이너 */
.main-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: #f0f0f0;
}

/* 왼쪽 패널들 */
.left-panels {
    display: flex;
    flex-direction: column;
    width: 300px;
    height: 100vh;
    background: white;
    border-right: 2px solid #666666;
}

/* 오른쪽 패널들 */
.right-panels {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100vh;
}

/* 패널 헤더 공통 스타일 */
.panel-header {
    background: #e0e0e0;
    padding: 4px 15px;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid #ccc;
    color: #333;
    height: 24px;
    display: flex;
    align-items: center;
}

/* Ocean Harbinger 로고 */
.logo-panel {
    background: #0066cc;
    color: white;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 32px;
    text-align: center;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #0052a3;
}

/* 정보 패널 */
.info-panel {
    height: 70%; /* 80%에서 70%로 감소하여 재생 컨트롤 공간 확보 */
    border-bottom: 2px solid #666666;
}

.panel-content {
    padding: 15px;
    height: calc(100% - 24px);
    overflow: auto;
}

/* 재생 컨트롤 패널 (왼쪽 하단) */
.playback-panel {
    height: 180px !important;
    min-height: 180px !important;
    max-height: 180px !important;
    background: white;
}

/* 지도 패널 */
.map-panel {
    height: calc(100vh - 300px); /* 어탐 로그 300px를 제외한 나머지 공간 */
    border-bottom: 2px solid #666666;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 어탐 로그 패널 (오른쪽 하단) - 남은 공간 모두 차지 */
.fishfinder-panel {
    flex: 1; /* 남은 공간 모두 차지 */
    min-height: 300px !important; /* 최소 높이 보장 */
    width: 100% !important;
    overflow: hidden; /* 내용이 넘치지 않도록 */
    position: relative; /* Canvas 위치 기준점 */
    margin: 0 !important; /* margin 제거 */
    padding: 0 !important; /* padding 제거 */
    background: white;
}

/* 어탐 로그 패널의 panel-content에서 padding 조정 */
.fishfinder-panel .panel-content {
    padding: 0 !important;
    margin: 0 !important;
    height: calc(100% - 24px); /* panel-header 높이(24px) 제외 */
}

/* 로딩 인디케이터 스타일 */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sonar 표시 스타일 */
.sonar-display {
    width: 100% !important;
    height: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative; /* Canvas의 절대 위치 기준점 */
    margin: 0 !important; /* margin 제거 */
    padding: 0 !important; /* padding 제거 */
}

.sonar-placeholder {
    color: #666;
    font-size: 14px;
    text-align: center;
    position: relative;
    z-index: 1;
}

#sonar-canvas {
    width: 100% !important;
    height: 100% !important;
    border: none; /* 테두리 제거 */
    background: #000;
    display: block; /* 인라인 요소 제거 */
    position: absolute; /* 절대 위치로 설정 */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 !important; /* margin 제거 */
    padding: 0 !important; /* padding 제거 */
}

/* 중복 제거 - 위의 fishfinder-panel 규칙과 통합됨 */

.playback-panel .controls {
    position: relative;
    bottom: auto;
    right: auto;
    transform: none;
    background: transparent;
    box-shadow: none;
    padding: 15px;
    min-width: auto;
}

.controls {
    position: relative;
    bottom: auto;
    right: auto;
    background: transparent;
    padding: 15px;
    border-radius: 0;
    box-shadow: none;
    z-index: 1000;
    min-width: auto;
    width: 100%;
}

.time-display {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.timeline-container {
    margin-bottom: 15px;
}

#timeline {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
}

#timeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#timeline::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.timeline-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.live-indicator {
    display: flex;
    align-items: center;
    color: #ff4444;
    font-weight: bold;
    font-size: 14px;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.play-control {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
}

.play-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #667eea;
    border-radius: 50%;
    background: #667eea;
    color: white;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: #5a6fd8;
}

.play-btn:active {
    background: #4a5fc8;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #666666;
    border-radius: 50%;
    background: #666666;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #555555;
    transform: scale(1.1);
}

.control-btn:active {
    background: #444444;
    transform: scale(0.95);
}

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

/* 커서 위치 정보 스타일 */
.cursor-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    min-width: 150px;
}

.coordinates {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.coordinates span {
    color: #333;
    font-weight: 500;
}

/* 배 정보 팝업 스타일 */
.ship-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #0066cc;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 0;
    min-width: 250px;
    max-width: 300px;
    z-index: 2000;
    font-family: 'Arial', sans-serif;
    backdrop-filter: blur(10px);
}

.ship-popup-header {
    background: #0066cc;
    color: white;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ship-popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ship-popup-content {
    padding: 15px;
}

.ship-popup-content p {
    margin: 8px 0;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.ship-popup-content strong {
    color: #0066cc;
    font-weight: bold;
}

/* 정보 패널 배 정보 표시 스타일 */
.ship-info-display {
    padding: 0;
}

.info-placeholder {
    color: #999;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

.ship-info-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.ship-info-header {
    background: #0066cc;
    color: white;
    padding: 10px 15px;
    border-radius: 6px 6px 0 0;
    margin: -15px -15px 15px -15px;
    font-weight: bold;
    font-size: 16px;
}

.ship-info-content {
    color: #333;
}

.ship-info-content p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.ship-info-content strong {
    color: #0066cc;
    font-weight: bold;
}


