/* 전체 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

ul {
	margin:0px;
	padding:0px;
}

ul li{
	list-style: none;
}

/* 헤더 스타일 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
	width:218px;

	-webkit-box-pack: justify;
    -moz-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.logo i {
    font-size: 2rem;
    color: #3b82f6;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background: #f3f4f6;
    color: #3b82f6;
}

/* 메인 컨텐츠 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* 코스피/코스닥 지수 섹션 */
.market-indices-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.indices-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.index-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.index-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}

.kospi-card::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.kosdaq-card::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.index-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.index-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.index-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.index-name {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.9;
}

.index-name i {
    font-size: 1.1rem;
}

.index-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.index-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    text-align: center;
    min-width: 80px;
    white-space: nowrap;
}

.index-change.positive {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.index-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.mini-chart-container {
    height: 80px;
    margin: 0.8rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.3rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-chart {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    display: block;
}

.index-details {
    display: flex;
    justify-content: space-between;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.detail-label {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 500;
}

.detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* 대시보드 카드 */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 2.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f1f5f9;
}

.text-green { color: #10b981; }
.text-red { color: #ef4444; }
.text-blue { color: #3b82f6; }
.text-orange { color: #f59e0b; }

.card-content h3 {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.card-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

/* 섹션 헤더 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header i {
    color: #3b82f6;
}

.section-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.refresh-btn, .filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* 테이블 스타일 */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stocks-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.stocks-table th {
    background: #374151;
    color: white;
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.stocks-table td {
    padding: 1rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.stocks-table tbody tr:hover {
    background: #f8fafc;
}

.stock-name {
    text-align: left !important;
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stock-market {
    font-size: 0.7rem;
    color: #6b7280;
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    width: fit-content;
}

.price {
    font-weight: 600;
    color: #1f2937;
}

.change.positive {
    color: #10b981;
    font-weight: 600;
}

.change.negative {
    color: #ef4444;
    font-weight: 600;
}

.volume.high {
    color: #f59e0b;
    font-weight: 600;
}

.rsi.oversold {
    color: #10b981;
    font-weight: 600;
}

.rsi.overbought {
    color: #ef4444;
    font-weight: 600;
}

.macd.positive {
    color: #10b981;
    font-weight: 600;
}

.analysis-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.analysis-tag.buy {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.analysis-tag.sell {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.sentiment {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.sentiment.positive {
    color: #10b981;
}

.sentiment.negative {
    color: #ef4444;
}

.action-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem;
    margin: 0 0.25rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* 뉴스 섹션 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease;
    position: relative;
}

.news-card:hover {
    transform: translateY(-2px);
}

.news-sentiment {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-sentiment.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.news-sentiment.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.news-sentiment.neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.news-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1f2937;
    line-height: 1.4;
}

.news-card p {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* 차트 섹션 */
.chart-container {
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: auto;
    height: auto;
}

/* 전략 링크 스타일 */
.chart-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.chart-item:last-child {
    margin-bottom: 0;
}

.strategy-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    color: #374151;
    position: relative;
}

.strategy-link:hover {
    background: #3b82f6;
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.strategy-link i {
    font-size: 1.2rem;
    color: #3b82f6;
}

.strategy-link:hover i {
    color: white;
}

.strategy-link .arrow {
    margin-left: auto;
    font-size: 1.2rem;
    opacity: 0.7;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #374151;
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close {
    font-size: 2rem;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

/* 전략 상세 스타일 */
.strategy-details h4 {
    color: #1f2937;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    font-weight: 600;
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
}

.strategy-details h4:first-child {
    margin-top: 0;
}

.strategy-details p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.strategy-details ul {
    list-style: none;
    padding: 0;
}

.strategy-details li {
    background: #f8fafc;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.strategy-details li strong {
    color: #1f2937;
}

.strategy-stocks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.stock-chip {
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.backtest-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.result-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.result-item .label {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.result-item .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

.result-item .value.success {
    color: #10b981;
}

.result-item .value.danger {
    color: #ef4444;
}

/* 트레이딩뷰 링크 스타일 */
.tradingview-link {
    margin: 1rem 0;
    text-align: center;
}

.tradingview-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tradingview-link a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: #2563eb;
}

.tradingview-link i {
    font-size: 1rem;
}

#tradingview-widget {
    border-radius: 12px;
}

/* 푸터 */
footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .status-cards {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    /* 코스피/코스닥 지수 모바일 스타일 */
    .indices-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .index-card {
        padding: 0.8rem;
        min-height: 160px;
    }
    
    .index-header {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        margin-bottom: 0.8rem;
    }
    
    .index-value {
        font-size: 1.5rem;
    }
    
    .index-name {
        font-size: 0.9rem;
    }
    
    .index-change {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        min-width: 70px;
    }
    
    .mini-chart-container {
        height: 60px;
        margin: 0.6rem 0;
    }
    
    .index-details {
        flex-direction: row;
        gap: 1rem;
        margin-top: 0.6rem;
        padding-top: 0.6rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: center;
    }
    
    .detail-label {
        font-size: 0.7rem;
    }
    
    .detail-value {
        font-size: 0.8rem;
    }
} 