/* 알파스퀘어 스타일 CSS */

/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.5;
}

/* Index page specific - slideshow styles (migrated from inline/index_page.css) */
.slideshow-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 100%); z-index: 10000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.slideshow-container { position: relative; width: 100%; height: 100%; max-width: 1200px; max-height: 800px; overflow: hidden; border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); backdrop-filter: blur(10px); }
.slideshow-list { position: relative; width: 100%; height: 100%; list-style: none; margin: 0; padding: 0; }
.slideshow-item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transform: scale(1.05); transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1); }
.slideshow-item.active { opacity: 1; transform: scale(1); }
.slideshow-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; background-repeat: no-repeat; }
.slideshow-bg::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%); z-index: 1; }
.slideshow-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; text-align: center; color: white; padding: 0 20px; }
.slideshow-title { font-size: 3rem; font-weight: bold; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.slideshow-text { font-size: 1.2rem; margin-bottom: 30px; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.slideshow-text em { font-style: italic; color: #ffd700; }
.slideshow-start-link { text-decoration: none; color: white; display: inline-block; transition: opacity 0.3s ease; }
.slideshow-start-link:hover { opacity: 0.8; }
.slideshow-start-text { margin: 0; font-size: 1.1rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.slideshow-prev, .slideshow-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.7); color: white; border: none; padding: 15px 20px; cursor: pointer; z-index: 10; font-size: 24px; transition: all 0.3s ease; border-radius: 50%; backdrop-filter: blur(10px); }
.slideshow-prev { left: 20px; }
.slideshow-next { right: 20px; }
.slideshow-prev:hover, .slideshow-next:hover { background: rgba(0,0,0,0.9); transform: translateY(-50%) scale(1.1); box-shadow: 0 8px 25px rgba(0,0,0,0.4); }
@media screen and (max-width: 991px) { .slideshow-red-text { font-size: 38px; } }
@media screen and (max-width: 768px) {
  .slideshow-red-text { font-size: 32px; }
  .slideshow-container { border-radius: 0; }
  .slideshow-title { font-size: 2rem; }
  .slideshow-text { font-size: 1rem; }
  .slideshow-prev, .slideshow-next { padding: 10px 15px; font-size: 20px; }
  .slideshow-prev { left: 10px; }
  .slideshow-next { right: 10px; }
}
.slideshow-red-text { font-family: 'TmonMonsori'; font-size: 44px; font-weight: 700; text-shadow: 0 0 5px #5c1a1a, 0 0 15px #b71414, 0 0 20px #bb1d1d; color: #ffffff; }

/* 헤더 스타일 - 율몽 디버그 기존 스타일 사용 */
/* hd-con은 hstyle.css에서 이미 정의되어 있으므로 추가 스타일만 정의 */

/* 헤더의 container 패딩 제거 */
.header .container {
    padding: 0 !important;
    max-width: 100% !important;
}

/* 헤더 내부 레이아웃 */
.hd-con {
    justify-content: space-between !important;
    padding: 0 20px !important;
    align-items: center;
}


.simple-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.simple-menu ul li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.simple-menu ul li a:hover {
    color: #3c5589;
}

/* Portfolio page - layout and basic components (migrated from inline) */
.layout-grid{ display:grid; grid-template-columns: 300px 1fr 320px; gap:14px; }
.card{ background:#fff; border:1px solid #edf2f7; border-radius:12px; padding:12px; width: 100%; max-width: 100%; overflow: hidden; box-sizing: border-box; }
.card .overflow-container{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card .overflow-container > *{ min-width: max-content; }
.section-title{ font-weight:800; font-size:16px; color:#304057; margin-bottom:10px; }
.orders-tabs{ display:flex; gap:10px; border-bottom:1px solid #edf2f7; margin-top:12px; }
.orders-tab{ padding:8px 12px; cursor:pointer; border-radius:8px 8px 0 0; }
.orders-tab.active{ background:#f7faff; color:#2b6cb0; }
table{ width:100%; border-collapse:collapse; }
th, td{ text-align:left; padding:8px; border-bottom:1px solid #edf2f7; }
.input{ width:100%; padding:8px 10px; border:1px solid #dee2e6; border-radius:8px; }
.btn{ padding:8px 12px; border:1px solid #dee2e6; border-radius:8px; background:#fff; cursor:pointer; }
.btn-primary{ background:#2b6cb0; border-color:#2b6cb0; color:#fff; }
.btn-secondary{ background:#f1f3f5; color:#333; }
.auth-actions{ display:flex; gap:8px; margin-top:6px; }
.auth-actions button{ flex:1; padding:10px 12px; border:none; border-radius:8px; font-weight:600; cursor:pointer; }

/* Order status label */
.order-status-label { margin-top: 10px; padding: 8px 12px; border-radius: 4px; font-size: 12px; display: flex; align-items: center; gap: 6px; transition: all 0.3s ease; }
.order-status-label.status-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.order-status-label.status-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.order-status-label.status-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.status-icon { font-size: 14px; font-weight: bold; }
.status-message { flex: 1; }

/* Spinner keyframes (used in portfolio overlay) */
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* PC 사용자 아바타 + 드롭다운 스타일 */
.user-avatar-container {
    position: relative;
    display: inline-block;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    min-width: 120px;
}

.user-avatar-btn:hover {
    border-color: #1e5eff;
    box-shadow: 0 2px 8px rgba(30, 94, 255, 0.15);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e9ecef;
}

.avatar-icon {
    font-size: 16px;
    color: #6c757d;
}

.user-name {
    font-weight: 500;
    color: #333;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 10px;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.user-avatar-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10001;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-email {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.user-status {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: #6c757d;
}

.user-status span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0;
}

.dropdown-items {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
}

.dropdown-item span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.logout-item {
    color: #2d6cdf;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    justify-content: center;
}

.dropdown-item.logout-item span {
    color: #2d6cdf;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: block;
    width: 100%;
}

.dropdown-item.logout-item:hover {
    background-color: #e3f2fd;
    color: #1976d2;
}

.dropdown-item.logout-item:hover span {
    color: #1976d2;
}

/* 회원 탈퇴 버튼 스타일 */
.dropdown-item.delete-account {
    color: #dc3545;
    text-align: center;
    justify-content: center;
}

.dropdown-item.delete-account span {
    color: #dc3545;
    text-align: center;
    display: block;
    width: 100%;
}

.dropdown-item.delete-account:hover {
    background-color: #fef2f2;
    color: #b02a37;
}

.dropdown-item.delete-account:hover span {
    color: #b02a37;
}

.simple-menu ul li a.active {
    color: #3c5589;
    font-weight: 600;
}

/* 모바일 햄버거 메뉴 */
.mobile-menu-btn {
    display: none;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
}

.menu-dots {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dot {
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
}

/* 모바일 드로어 메뉴 */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
}

.mobile-drawer.open,
.mobile-drawer.active {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.mobile-drawer-content {
    padding: 20px;
}

.mobile-menu-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid #eee;
}

.mobile-menu-list li:last-child {
    border-bottom: none;
}

.mobile-menu-list a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.mobile-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.mobile-drawer-backdrop.show {
    display: block;
}

@media (max-width: 768px) {
    .simple-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hd-con {
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }
    
    /* 모바일에서 주식 정보 글자 크기 축소 */
    .stock-name {
        font-size: 16px !important;
    }
    
    .stock-code {
        font-size: 10px !important;
    }
    
    .current-price {
        font-size: 16px !important;
    }
    
    .change-value {
        font-size: 12px !important;
    }
    
    .change-percent {
        font-size: 10px !important;
    }
    
    /* 모바일에서 검색창 크기 축소 */
    .stock-search {
        max-width: 180px !important;
    }
    
    .stock-search-input {
        font-size: 15px !important;
        padding: 10px 35px 10px 12px !important;
    }
    
    .stock-search-input::placeholder {
        font-size: 15px !important;
    }
    
    /* 모바일에서 새 관심목록 버튼 텍스트 숨김 */
    .btn-watchlist span {
        display: none !important;
    }
    
    .btn-watchlist {
        padding: 10px !important;
        min-width: 40px !important;
        height: 40px !important;
        justify-content: center !important;
    }
    
    /* 모바일에서 stock-top-row 간격 조정 */
    .stock-top-row {
        gap: 10px !important;
        padding: 0 10px 15px 0px !important;
        margin-bottom: 15px !important;
    }
}

/* 메인 컨테이너 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    min-height: calc(100vh - 160px); /* 헤더 높이(80px) + 패딩 고려 */
}

/* content-wrap에 헤더 높이만큼 패딩 추가 */
.content-wrap {
    padding-top: 80px;
}

/* 모바일에서 헤더 높이 조정 */
@media (max-width: 768px) {
    .content-wrap {
        padding-top: 70px;
    }
    
    .main-container {
        min-height: calc(100vh - 140px); /* 모바일 헤더 높이(70px) + 패딩 고려 */
    }
}

/* 3열 레이아웃 */
.layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 20px;
    min-height: calc(100vh - 200px);
}

/* 왼쪽 사이드바 - 관심목록 + DB증권 */
.left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

/* 주식 헤더 2줄 레이아웃 */
.stock-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.stock-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 주식 검색 */
.stock-search {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 300px;
}

.stock-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    background: #f8f9fa;
    outline: none;
    transition: border-color 0.3s ease;
}

.stock-search-input:focus {
    border-color: #3c5589;
    background: #fff;
}

.stock-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.3s ease;
}

.stock-search-btn:hover {
    color: #3c5589;
}

/* 주식 정보 */
.stock-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .stock-name {
        font-size: 28px;
        font-weight: 700;
        color: #1a1a1a;
    }
    
    .stock-code {
        font-size: 16px;
        color: #666;
        background: #f8f9fa;
        padding: 4px 8px;
        border-radius: 4px;
    }

/* 주식 가격 */
.stock-price {
    display: flex;
    align-items: center;
    gap: 20px;
}

    .current-price {
        font-size: 32px;
        font-weight: 700;
        color: #1a1a1a;
    }
    
    .price-change {
        display: flex;
        flex-direction: column;
        align-items: center; /* 중앙 정렬 */
        text-align: center;
    }
    
    .change-value {
        font-size: 16px; /* 인덱스와 동일 크기 */
        font-weight: 600;
        line-height: 1.2;
        display: inline-block;
        text-align: center;
    }
    
    .change-positive {
        color: #28a745;
    }
    
    .change-negative {
        color: #dc3545;
    }
    
    .change-percent {
        font-size: 14px;
    }
    
    .change-percent.change-positive {
        color: #28a745;
    }
    
    .change-percent.change-negative {
        color: #dc3545;
    }

.watchlist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.watchlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.watchlist-item:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.watchlist-item.active {
    background: #e3f2fd;
    border-color: #007bff;
}

.item-info {
    flex: 1;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.item-code {
    font-size: 12px;
    color: #666;
}

.item-price {
    text-align: right;
}

.price {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.change {
    font-size: 12px;
    font-weight: 500;
}

.change.positive {
    color: #28a745;
}

.change.negative {
    color: #dc3545;
}

/* 중앙 컨텐츠 */
.center-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 오른쪽 사이드바 */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 주식 정보 헤더 */
.stock-header {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stock-actions {
    display: flex;
    gap: 10px;
}

.btn-watchlist {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-watchlist:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.btn-watchlist.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.btn-watchlist.active i {
    color: #fff;
}

/* 차트 영역 */
.chart-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px 20px 120px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* chart-header - 별도 스타일 제거 (info-card와 동일하게 처리) */

.chart-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

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

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

/* 차트 탭 스타일 제거됨 - 기간 전환 기능 비활성화 */

.chart-container {
    height: 400px !important;
    max-height: 400px !important;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

#tradingview_chart {
    width: 100% !important;
    height: 400px !important;
    max-height: 400px !important;
    min-height: 400px;
    background: #f8f9fa;
}

#chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* 정보 그리드 - 제거됨 (오른쪽 사이드바로 이동) */

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 1px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 14px;
}

.info-value {
    color: #1a1a1a;
    font-weight: 500;
    font-size: 14px;
}

/* PC용 탭 스타일 */
.tab-navigation {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.tab-btn {
    min-width: 40px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.tab-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.3);
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}


/* 반응형 */
@media (max-width: 1200px) {
    .layout-grid {
        grid-template-columns: 250px 1fr 280px;
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .left-sidebar {
        order: 3; /* 관심목록을 가장 하단으로 */
    }
    
    .center-content {
        order: 1; /* 검색 + 트레이딩뷰 + 종목분석 */
    }
    
    .right-sidebar {
        order: 2; /* 주가예측 + 기본정보 + 재무정보 */
    }
}

/* 모바일 스타일은 mobile.css로 이동됨 */

/* 푸터 스타일 */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

/* 주가 예측 스타일 */
.prediction-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.prediction-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #007bff;
}

.prediction-summary {
    margin-bottom: 15px;
}

.prediction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.prediction-row:last-child {
    border-bottom: none;
}

.prediction-label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.prediction-value {
    font-weight: 600;
    font-size: 14px;
}

.prediction-value.positive {
    color: #28a745;
}

.prediction-value.negative {
    color: #dc3545;
}

.prediction-error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
}

.prediction-error i {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 예측 차트 스타일 */
#prediction-chart {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure plotly chart respects card bounds */
.info-card #prediction-chart,
.info-card .plotly-graph-div,
.info-card .js-plotly-plot {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.info-card .plotly-graph-div .main-svg {
    width: 100% !important;
}

/* Portfolio Risk Analysis (Monte Carlo) and PnL Analysis styles (from original inline) */
.monte-carlo-loading,
.monte-carlo-error {
    text-align: center;
    padding: 20px;
    color: #666;
}

.monte-carlo-loading i,
.monte-carlo-error i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.monte-carlo-analysis {
    padding: 10px 0;
}

.risk-metrics {
    margin-bottom: 15px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.metric-value {
    font-size: 14px;
    font-weight: 600;
}

.metric-value.positive { color: #28a745; }
.metric-value.negative { color: #dc3545; }

.confidence-intervals {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

.interval-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.interval-label {
    font-size: 13px;
    color: #666;
}

.interval-value {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.distribution-chart {
    text-align: center;
    margin-top: 15px;
    overflow: hidden;
}

.distribution-chart canvas {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.chart-description { text-align: left; padding: 0 5px; }
.chart-description div { margin-bottom: 2px; }
.chart-description strong { color: #333; }

/* Ensure any charts/canvas stay within card bounds */
.info-card canvas {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

.info-card .plotly-graph-div,
.info-card .plotly-graph-div * {
    max-width: 100% !important;
}

/* 모바일 예측 스타일 */
@media (max-width: 768px) {
    .prediction-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .prediction-value {
        font-size: 13px;
    }
}

/* 단기 변동성 스타일 */
.volatility-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.volatility-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #007bff;
}

.volatility-summary {
    margin-bottom: 15px;
}

.volatility-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.volatility-row:last-child {
    border-bottom: none;
}

.volatility-label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.volatility-value {
    font-weight: 600;
    font-size: 14px;
}

.volatility-value.positive {
    color: #28a745;
}

.volatility-value.negative {
    color: #dc3545;
}

.volatility-value.neutral {
    color: #6b7280;
}

.volatility-error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
}

.volatility-error i {
    font-size: 24px;
    margin-bottom: 10px;
}

/* 모바일 변동성 스타일 */
@media (max-width: 768px) {
    .volatility-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .volatility-value {
        font-size: 13px;
    }
}

/* 종목 분석 카드 스타일 */
.analysis-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.analysis-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

/* 모든 화면 크기에서 카드 제목 스타일 통일 */
/* 기술적 분석 제목 */
.analysis-card .analysis-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #e9ecef !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: auto !important;
    display: block !important;
    align-items: normal !important;
    box-sizing: border-box !important;
    position: static !important;
    transition: none !important;
}

/* 차트 제목 - 별도 스타일 제거 (info-title과 동일하게 처리) */

/* 주가 예측 제목 */
.info-card .info-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* 기본 정보 제목 */
.info-card#basic-info .info-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* 재무 정보 제목 */
.info-card#financial-info .info-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #e9ecef !important;
}

.analysis-badges {
    display: flex;
    gap: 8px;
}

.analysis-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.analysis-badge.technical {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

.analysis-badge.fundamental {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #388e3c;
}

.analysis-content {
    padding: 0;
}

.analysis-section {
    margin-bottom: 25px;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.indicator-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.indicator-label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.indicator-value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.indicator-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 500;
}

.indicator-status.positive {
    background: #d5f4e6;
    color: #27ae60;
}

.indicator-status.negative {
    background: #fadbd8;
    color: #e74c3c;
}

.indicator-status.neutral {
    background: #ebf3fd;
    color: #3498db;
}

.market-analysis {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.analysis-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

.analysis-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.ai-analysis {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-score {
    display: flex;
    align-items: center;
    gap: 15px;
}

.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.score-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 10px;
    opacity: 0.8;
}

.score-description {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.score-detail {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


/* 헤더 스타일 - 관심목록과 정렬 */
.hd-con {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Udemy 강의 카드 스타일 */
.course-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.course-image-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.course-image-link:hover {
    transform: scale(1.02);
}

.course-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.course-description {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-text {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.course-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feature-tag {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.course-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.course-link:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.course-link i {
    font-size: 12px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .analysis-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .analysis-badges {
        justify-content: center;
    }
    
    .indicator-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ai-analysis {
        flex-direction: column;
        gap: 15px;
    }
    
    .course-content {
        gap: 12px;
    }
    
    .course-link {
        width: 100%;
        justify-content: center;
    }
    
    .course-image {
        height: 100px;
    }
}

/* 검색 결과 스타일 */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.search-results-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.close-search {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-search:hover {
    color: #dc3545;
}

.search-results-list {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-code {
    font-size: 12px;
    color: #6c757d;
    font-family: 'Courier New', monospace;
    margin-bottom: 2px;
}

.result-exchange {
    font-size: 11px;
    color: #28a745;
    font-weight: 500;
}

.result-sector {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

.select-stock-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.select-stock-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.search-results.no-results,
.search-results.error-results {
    padding: 20px;
    text-align: center;
}

.no-results-content,
.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.no-results-content i,
.error-content i {
    font-size: 24px;
    color: #6c757d;
}

.no-results-content p,
.error-content p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.error-content i {
    color: #dc3545;
}

/* 모바일 검색 결과 */
@media (max-width: 768px) {
    .search-results {
        max-height: 300px;
    }
    
    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .result-info {
        width: 100%;
    }
    
    .select-stock-btn {
        align-self: flex-end;
        width: auto;
    }
    
    .result-name {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

/* 사용자 아바타 컨테이너 수평 정렬 */
#user-avatar-container {
    display: flex !important;
    align-items: center !important;
}

#user-avatar-container .user-avatar-btn {
    display: flex !important;
    align-items: center !important;
}

/* 로그아웃 시 모든 계정 관련 요소 숨기기 */
body:not(.auth) #user-avatar-container {
    display: none !important;
}

body:not(.auth) #user-avatar-container * {
    display: none !important;
}

/* 분석 그리드 스타일 - PC용 */
.analysis-grid {
    display: flex;
    gap: 16px;
}

.split-title {
    display: flex;
    margin-bottom: 8px;
    padding-bottom: 4px;
}

.section-title-left {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    text-align: left;
    margin-right: 8px;
}

.section-title-right {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    text-align: left;
    margin-left: 8px;
}

.analysis-grid .analysis-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0;
    margin: 0;
}



.news-analysis {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
}

.financial-analysis {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
}

.financial-analysis .placeholder {
    color: #666;
    font-size: 14px;
    text-align: center;
}

#financial-radar-chart {
    max-width: 100%;
    height: auto;
}

/* PC에서 모바일용 제목 숨김 */
.mobile-section-title {
    display: none !important;
}
