/* 통합 모니터링 대시보드 CSS */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 호스트 정보 카드 */
.host-info {
    margin-bottom: 30px;
}

.host-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.status-indicator {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    background: #2ecc71;
    color: white;
}

.card-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.metric .label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.metric .value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.metric .note {
    font-size: 0.8rem;
    color: #95a5a6;
    margin-top: 5px;
}

/* 컨트롤 버튼 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-secondary {
    background: rgba(149, 165, 166, 0.9);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
}

.refresh-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* 서비스 그리드 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #e74c3c);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.service-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
}

.service-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-healthy {
    background: #2ecc71;
    color: white;
}

.status-offline {
    background: #e74c3c;
    color: white;
}

.status-warning {
    background: #f39c12;
    color: white;
}

/* 메트릭 그리드 */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.metric {
    text-align: center;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.metric-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.metric-unit {
    font-size: 0.8rem;
    color: #95a5a6;
}

/* 차트 컨테이너 */
.chart-container {
    margin-bottom: 20px;
    height: 180px;
    background: rgba(236, 240, 241, 0.5);
    border-radius: 8px;
    padding: 25px 10px 10px 10px;
    position: relative;
}

.chart {
    width: 100%;
    height: 100%;
    position: relative;
}

.chart svg {
    width: 100%;
    height: 100%;
}

.chart-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(52, 152, 219, 0.3);
}

/* 에러 로그 */
.error-logs {
    max-height: 120px;
    overflow-y: auto;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.error-log {
    font-size: 0.8rem;
    color: #c0392b;
    margin-bottom: 5px;
    padding: 5px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    word-break: break-word;
}

.service-footer {
    text-align: center;
    margin-top: 15px;
}

.click-hint {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-style: italic;
}

/* 로딩 스피너 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.8);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* 모달 팝업 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    margin: 15% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
}

.close {
    color: #95a5a6;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-line;
}

.modal-actions {
    text-align: right;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .card-content {
        grid-template-columns: 1fr;
    }
} 