/* PLEX API 테스트 대시보드 스타일 */

:root {
    --primary-color: #4a90e2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --body-bg: #f4f6f9;
    --card-bg: #ffffff;
    --text-color: #34495e;
    --text-muted: #95a5a6;
}

body {
    background-color: var(--body-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.navbar-brand i {
    color: var(--primary-color);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.list-group-item-action {
    border: none;
    padding: 1rem 1.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-color);
    border-left: 3px solid transparent;
}

.list-group-item-action:hover, .list-group-item-action:focus {
    background-color: #e8f0fe;
    color: var(--primary-color);
    transform: translateX(5px);
    border-left-color: var(--primary-color);
}

.list-group-item-action i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: #95a5a6;
    transition: color 0.2s ease;
}

.list-group-item-action:hover i {
    color: var(--primary-color);
}

/* API 테스트 폼 스타일 */
.api-form {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
}

.api-response {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
}

.curl-code {
    background: #282c34;
    color: #abb2bf;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    overflow-x: auto;
}

.status-success { color: var(--success-color); }
.status-error { color: var(--danger-color); }
.status-pending { color: var(--warning-color); }

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    .api-form { padding: 1.5rem; }
    h1 { font-size: 1.8rem; }
}

/* JSON 하이라이팅 */
.json-key { color: #9b59b6; font-weight: bold; }
.json-string { color: #2ecc71; }
.json-number { color: #3498db; }
.json-boolean { color: #e67e22; }
.json-null { color: #c0392b; }

/* 테이블 스타일 */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table-responsive {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
}
.table th, .table td {
    padding: 1rem;
    vertical-align: middle;
}
.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid #bdc3c7;
    font-weight: 600;
    color: var(--dark-color);
    text-align: left;
}
.table tbody tr:nth-child(odd) {
    background-color: #fdfdfd;
}
.table tbody tr:hover {
    background-color: #f0f4f8;
}

/* 버튼 스타일 */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #3a80d2;
    border-color: #3a80d2;
}

/* 통계 카드 - Bootstrap 클래스와 충돌 방지 */
.card.bg-primary, .card.bg-success, .card.bg-info, .card.bg-danger {
    color: white !important;
}
.card.bg-warning {
    color: var(--dark-color) !important;
}

/* 인라인 스타일이 적용된 카드들의 텍스트 색상 강제 적용 */
.card[style*="background-color: var(--primary-color)"] .text-white,
.card[style*="background-color: var(--success-color)"] .text-white,
.card[style*="background-color: var(--info-color)"] .text-white {
    color: white !important;
}

.card[style*="background-color: var(--warning-color)"] .text-dark {
    color: var(--dark-color) !important;
}
.card h3 {
    font-weight: 700;
}

/* 폼 요소 */
.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #dce4ec;
    transition: all 0.2s ease;
}
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* 토스트 알림 */
.toast-container {
    z-index: 1100;
}
.toast {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 페이지 헤더 */
.page-header {
    background: var(--card-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.page-header h1 {
    margin: 0;
    font-weight: 700;
    color: var(--dark-color);
}

/* 코드 블록 스타일 */
.code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    font-family: 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9rem;
    color: #212529;
}

/* 성공/실패 표시 */
.test-result {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-width: 1px;
    border-style: solid;
}
.test-result.success {
    background-color: #e6fffa;
    border-color: var(--success-color);
    color: #004d40;
}
.test-result.error {
    background-color: #ffebee;
    border-color: var(--danger-color);
    color: #b71c1c;
}