h1{
    font-size: 4rem;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    margin-top: 100px;
}

h2{
    text-align: center;
    font-size: 2.5rem;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 20px;
}


/* 전체 레이아웃 */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.main-content {
    flex: 1;
    min-width: 300px;
    max-width: 800px;
}

.side-content {
    width: 300px;
    margin-left: 20px;
}

/* 오버레이 스타일 */
.datepicker-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
}

/* Flatpickr 캘린더 z-index 조정 */
.flatpickr-calendar.centered {
    z-index: 10000 !important;
}

/* 데이트피커 컨테이너 스타일 */
.datepicker-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

#datepicker {
    background-color: #2c2c2c;
    color: #fff;
    border: 1px solid #8dc63f;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#datepicker:hover {
    background-color: #3c3c3c;
    border-color: #9ed350;
}

#datepicker::placeholder {
    color: #aaa;
}

/* 데이트 네비게이션 스타일 */
.date-navigation {
    display: flex;
    align-items: center;
}

.date-navigation button {
    flex: 0 0 auto;
    padding: 0.375rem 0.75rem;
    font-size: 1.2rem; /* 버튼의 폰트 크기를 조정 */
    color: #fff;
    background-color: #2c2c2c;
    border: 1px solid #8dc63f;
    border-radius: 5px;
}

.date-navigation button:hover {
    background-color: #3c3c3c;
    border-color: #9ed350;
}


.date-navigation input {
    flex: 1 1 auto;
    text-align: center;
    margin: 0 10px;
    min-width: 0;
    background-color: #2c2c2c;
    color: #fff;
    border: 1px solid #8dc63f;
    cursor: pointer;
    font-size: 16px;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.date-navigation input:hover {
    background-color: #3c3c3c;
    border-color: #9ed350;
}

.date-navigation input::placeholder {
    color: #aaa;
}

/* 달력 아이콘 추가 (옵션) */
#datepicker {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%238dc63f" class="bi bi-calendar" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/></svg>');
    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
    padding-right: 35px; /* 아이콘을 위한 여백 */
}

#datepicker-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.flatpickr-calendar.centered {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1000 !important;
}

/* Flatpickr 캘린더 스타일 */
.flatpickr-calendar {
    background-color: #1a1a1a !important;
    color: #fff !important;
    border: 1px solid #8dc63f !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
}

.flatpickr-calendar.centered {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* 화살표 제거 */
.flatpickr-calendar:before,
.flatpickr-calendar:after {
    display: none !important;
}

/* 날짜 스타일 */
.flatpickr-day {
    color: #fff !important;
    border-radius: 5px !important;
}

.flatpickr-day.selected,
.flatpickr-day:hover {
    background-color: #8dc63f !important;
    border-color: #8dc63f !important;
}

.flatpickr-day.today {
    border-color: #8dc63f !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #666 !important;
    text-decoration: line-through;
    cursor: not-allowed;
    background-color: transparent !important;
}

/* 월 및 요일 스타일 */
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
.flatpickr-weekday,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    background-color: #1a1a1a !important;
    color: #fff !important;
}

/* 이전/다음 월 버튼 스타일 */
.flatpickr-prev-month,
.flatpickr-next-month {
    color: #8dc63f !important;
    fill: #8dc63f !important;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: #fff !important;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .flatpickr-calendar.centered {
        width: 90% !important;
        max-width: 300px !important;
    }
}
/* 차트 */
#indexChart {
    width: 100%;
    height: 400px;
    margin-top: 20px;
}

/* 오늘의 인덱스 */
.daily-index-item {
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    height: 100%;
}

.daily-index-item .stock-name {
    font-size: 1.2rem;
    font-weight: bold;
}

.daily-index-item .closing-price {
    font-size: 1.1rem;
    color: #8dc63f;
    margin-bottom: 5px;
}

.stock-code {
    font-size: 0.9rem;
    color: #aaa;
    font-weight: normal;
}

.index-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.indicator {
    background-color: #333;
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.indicator.active {
    border: solid 2px;
    border-color: #8dc63f;
    color: #fff;
    font-family: 'Fira Sans', sans-serif;
}

/* 상한가 카드 */
.upper-limit-card {
    background-color: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.upper-limit-card:hover {
    transform: translateY(-5px);
}

.upper-limit-card .card-header {
    background-color: #8dc63f;
    color: #000;
    padding: 15px;
}

.upper-limit-card .card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
}

.upper-limit-card .card-header .code {
    margin: 0;
    font-size: 0.9rem;
    color: #111;
    font-weight: normal;
}

.upper-limit-card .card-body {
    padding: 15px;
    color: #fff;
}

.upper-limit-card .closing-price {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.upper-limit-card .news-issue {
    font-weight: normal;
    font-size: 1.1rem;
    line-height: 1.5;
    max-height: 4.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 주요 지수 테이블 */
.indices-table {
    margin-top: 20px;
}

.table-dark {
    background-color: #1a1a1a;
}


/* 데이트피커 스타일 */
.centered-datepicker {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 9999 !important;
}

.flatpickr-calendar {
    background-color: #333 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.flatpickr-day {
    color: #fff !important;
}

.flatpickr-day.selected {
    background-color: #8dc63f !important;
    border-color: #8dc63f !important;
}

.flatpickr-day:hover {
    background-color: #555 !important;
}

.flatpickr-current-month,
.flatpickr-monthDropdown-months,
.flatpickr-weekday {
    color: #fff !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    fill: #fff !important;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .side-content {
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    #indexChart {
        height: 300px;
    }
}

/* 유틸리티 클래스 */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}


/* 신고가 컨테이너 스타일 */
.new-highs-container {
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.new-highs-item {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #2c2c2c;
    border-radius: 5px;
}

.item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.item-info .stock-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.stock-name .code {
    font-size: 0.9rem;
    font-weight: normal;
    color: #aaa;
}

.change-rate {
    font-weight: bold;
    color: #8dc63f;
    white-space: nowrap;
}

.progress-bar-container {
    height: 20px;
    background-color: #444;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
    width: 0;
}

.price-info {
    font-size: 0.9rem;
    color: #eee;
}

.price-info .row {
    margin: 0 -5px;
}

.price-info .col-6 {
    padding: 0 5px;
}

.price-info span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 반응형 디자인을 위한 미디어 쿼리 */
@media (max-width: 576px) {
    .price-info .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: left !important;
    }
    
    .price-info span {
        margin-bottom: 5px;
    }
}

/* 전일대비 상승률 스타일 */
.daily-change-container {
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.daily-change-item {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #2c2c2c;
    border-radius: 5px;
}

.daily-change-item .item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.daily-change-item .stock-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.daily-change-item .change-rate {
    font-weight: bold;
    white-space: nowrap;
}

.daily-change-item .progress-bar-container {
    height: 20px;
    background-color: #444;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.daily-change-item .progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
    width: 0;
}

.daily-change-item .price-info {
    font-size: 0.9rem;
    color: #eee;
}

.daily-change-item .progress-bar-container {
    position: relative;
}

.daily-change-item .exceed-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: #f1c40f;
}

.daily-change-item .change-rate .fa-exclamation-triangle {
    color: #f1c40f;
    margin-left: 5px;
}

/* 거래대금, 순매수 */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 10px;
    background-color: #1a1a1a;
}

.table {
    width: 100%;
    margin-bottom: 0;
    color: #fff;
    background-color: #1a1a1a;
}

.table th,
.table td {
    font-size: 1.1rem;
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #32383e;
    vertical-align: middle;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #32383e;
}

.table tbody + tbody {
    border-top: 2px solid #32383e;
}

table .stock-name {
    font-size: 1.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.text-muted {
    color: #aaa !important;
}

.text-primary {
    font-size: 1rem;
}

.text-danger {
    font-size: 1rem;
}

.text-white{
    font-size: 1rem;
}

/* 반응형 디자인을 위한 미디어 쿼리 */
@media (max-width: 768px) {
    table .stock-name {
        max-width: 100%;
    }
}
@media (max-width: 768px) {
    .day-status {
        flex: 1 1 calc(50% - 5px);
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

.index-card {
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.index-card-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: #8dc63f;
    margin-bottom: 15px;
}

.index-card-body {
    display: flex;
    flex-direction: column;
}

.index-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.index-label {
    font-size: 1rem;
    color: #fff;
}

.index-data {
    font-size: 1rem;
    font-weight: bold;
    text-align: right;
}

.positive-change {
    color: #dc3545;
}

.negative-change {
    color: #0d6efd;
}

.zero-change {
    color: #ffffff;
}

