.category-main {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.category-header {
    grid-column: 1 / -1;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.category-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.category-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

.category-nav a {
    text-decoration: none;
    color: #666;
    font-size: 1.1rem;
    padding: 10px 0;
}

.category-nav .active a {
    color: #000;
    font-weight: 600;
    border-bottom: 2px solid #000;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.news-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.news-info h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.news-info h2 a {
    text-decoration: none;
    color: #333;
}

.news-info .excerpt {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.news-info .meta {
    color: #888;
    font-size: 0.9rem;
}

.meta span:not(:last-child)::after {
    content: '|';
    margin: 0 10px;
}

.category-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.popular-news {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

.popular-news h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.popular-news ul {
    list-style: none;
}

.popular-news li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.popular-news a {
    text-decoration: none;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.view-count {
    color: #888;
    font-size: 0.9rem;
}

.market-index {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.market-index h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.market-index ul {
    list-style: none;
}

.market-index li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.market-index li:last-child {
    border-bottom: none;
}

.index-name {
    font-weight: 500;
}

.index-value {
    font-family: 'Roboto Mono', monospace;
}

.index-value.up {
    color: #d63031;
}

.index-value.down {
    color: #0984e3;
}

.news-item.featured {
    grid-template-columns: 1fr;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.news-item.featured .news-image {
    margin-bottom: 20px;
}

.news-item.featured .news-image img {
    height: 400px;
}

.news-item.featured h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.news-item.featured .excerpt {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .category-main {
        grid-template-columns: 1fr;
    }

    .news-item {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        display: none;
    }

    .news-item.featured .news-image img {
        height: 250px;
    }

    .news-item.featured h2 {
        font-size: 1.5rem;
    }
}

/* 암호화폐 시세 스타일 업데이트 */
.crypto-market-overview {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.market-chart-container {
    position: relative;
    padding: 20px 0;
}

.market-chart-container h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.realtime-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 4px 8px;
    border-radius: 12px;
}

.realtime-indicator::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2e7d32;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.current-price-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.price-label {
    font-size: 0.9rem;
    color: #666;
}

#current-price {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
}

.chart-container {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    height: 400px;
    position: relative;
}

.chart-container canvas {
    width: 100% !important;
    height: 350px !important;
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

/* 실시간 표시 애니메이션 */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 사이드바 가격 정보 업데이트 */
.market-index.crypto li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.crypto-price {
    font-family: 'Roboto Mono', monospace;
    text-align: right;
    font-weight: 500;
}

.crypto-price.up {
    color: #d63031;
}

.crypto-price.down {
    color: #0984e3;
}

.price-change {
    font-size: 0.9rem;
    margin-top: 3px;
}

/* 반응형 스타일 추가 */
@media (max-width: 768px) {
    .crypto-market-overview {
        padding: 15px;
    }

    #current-price {
        font-size: 1.2rem;
    }
}

/* 업데이트 상태 표시 스타일 */
.update-info {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.status-normal {
    color: #2e7d32;
}

.status-error {
    color: #c62828;
}

#last-update-time {
    font-family: 'Roboto Mono', monospace;
}

/* 실시간 시세 페이지 스타일 추가 */
.market-trends {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.market-trends h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.market-trends ul {
    list-style: none;
}

.market-trends li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.trend-label {
    color: #666;
    font-size: 0.9rem;
}

.trend-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
}

.trend-value.up {
    color: #d63031;
}

.trend-value.down {
    color: #0984e3;
}

/* 차트 로딩 상태 표시 */
.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 10px auto;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 로딩 상태 및 데이터 표시 개선 */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.price-transition {
    transition: all 0.3s ease-out;
}

.price-flash {
    animation: priceUpdate 0.5s ease-out;
}

@keyframes priceUpdate {
    0% { background-color: rgba(0, 123, 255, 0.1); }
    100% { background-color: transparent; }
}

/* 차트 호버 효과 개선 */
.chart-container {
    position: relative;
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chart-tooltip {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

/* 데이터 업데이트 표시 개선 */
.update-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #666;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    margin-top: 8px;
}

.update-indicator.success {
    color: #2e7d32;
    background: #e8f5e9;
}

.update-indicator.error {
    color: #c62828;
    background: #ffebee;
}

/* 차트 컨트롤 스타일 */
.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.period-selector, .chart-type-selector {
    display: flex;
    gap: 8px;
}

.period-btn, .chart-type-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover, .chart-type-btn:hover {
    background: #f1f3f5;
}

.period-btn.active, .chart-type-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.chart-indicators {
    display: flex;
    gap: 15px;
    font-family: 'Roboto Mono', monospace;
    color: #666;
}

.volume-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 차트 로딩 애니메이션 개선 */
.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.chart-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 0.9rem;
    color: #666;
    animation: pulse 1.5s infinite;
}

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

/* KB부동산 시세 스타일 */
.data-source {
    font-size: 0.8rem;
    color: #666;
    font-weight: normal;
    margin-left: 8px;
}

.price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-change {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.update-info {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.source-link {
    color: #007bff;
    text-decoration: none;
}

.source-link:hover {
    text-decoration: underline;
}

/* 차트 에러 표시 스타일 */
.chart-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-error .error-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.chart-error p {
    color: #dc3545;
    margin-bottom: 15px;
}

.chart-error button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.chart-error button:hover {
    background: #0056b3;
}

/* 연결 상태 표시 스타일 */
.connection-status-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.connection-status {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.connection-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.connection-status.connected {
    background: #e8f5e9;
    color: #2e7d32;
}

.connection-status.connected::before {
    background: #2e7d32;
    animation: pulse 2s infinite;
}

.connection-status.connecting {
    background: #fff3e0;
    color: #ef6c00;
}

.connection-status.connecting::before {
    background: #ef6c00;
    animation: blink 1s infinite;
}

.connection-status.disconnected {
    background: #ffebee;
    color: #c62828;
}

.connection-status.disconnected::before {
    background: #c62828;
}

.data-status {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    position: relative;
}

.status-icon.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 애니메이션 정의 */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* 데이터 업데이트 효과 */
.price-update {
    animation: highlight 0.5s ease-out;
}

@keyframes highlight {
    0% { background-color: rgba(0, 123, 255, 0.1); }
    100% { background-color: transparent; }
}

/* 연결 상태 스타일 */
.connection-status.connected {
    color: #2e7d32;
}

.status-icon.active {
    background: #2e7d32;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    display: inline-block;
}

/* 가격 업데이트 효과 */
.price-update {
    animation: priceUpdate 0.5s ease-out;
}

@keyframes priceUpdate {
    0% { background-color: rgba(46, 125, 50, 0.1); }
    100% { background-color: transparent; }
} 