/* Global Styles */
h1, h2 {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 4rem;
    margin-top: 100px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 20px;
}

/* Date Range Container */
.date-range-container {
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.date-picker-wrapper {
    position: relative;
    width: 200px;
}

/* Datepicker Styles */
.datepicker-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* 오버레이 스타일 */
.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;
}


#startDatepicker, #endDatepicker {
    text-align: center;
    width: 100%;
    padding: 10px 35px 10px 10px;
    background-color: #2c2c2c;
    color: #fff;
    border: 1px solid #8dc63f;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    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;
}

#startDatepicker:hover, #endDatepicker:hover {
    background-color: #3c3c3c;
    border-color: #9ed350;
}

#startDatepicker::placeholder, #endDatepicker::placeholder {
    color: #aaa;
}

/* Flatpickr Calendar Styles */
.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;
    z-index: 10000 !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;
}

/* Apply Button Style */
#applyDateRange {
    background-color: #8dc63f;
    color: #000;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#applyDateRange:hover {
    background-color: #7ab52f;
}

.custom-index-box {
    background-color: #2c2c2c;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: solid 2px #8dc63f;
}

.date-range-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.date-picker-wrapper {
    flex: 1;
    margin-right: 10px;
}

#applyDateRange {
    width: 100px;
    font-size: 1.1rem;
    font-weight: bold;
}

.selected-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
}

.selected-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
}

.option-divider {
    border: 1px solid; #fff;
    margin: 15px 0;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.option-btn, .selected-options .option-btn {
    background-color: #2c2c2c;
    color: #fff;
    border: 2px solid #8dc63f;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: bold;
}

.option-btn:hover {
    background-color: #8dc63f;
    color: black;
    font-weight: bold;
}

.option-btn:hover, .option-btn.selected {
    background-color: #8dc63f;
    color: #2c2c2c;
}

.logic-operator {
    background-color: #f39c12;
    color: #fff;
    padding: 10px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8dc63f;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 10px 0 0;
}


/* Stock Card Styles */
.custom-index-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stock-card {
    background-color: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.stock-card-header {
    padding: 15px 15px 0px 15px;
}

.stock-name {
    font-weight: bold;
    color: #ee2a7b;
    margin: 0;
    font-size: 1.2rem;
}

.stock-code {
    font-size: 0.9rem;
    color: #aaa;
    font-weight: normal;
}

.stock-card-body {
    padding: 15px;
}


.stock-price-change {
    font-size: 1.1rem;
    margin: 5px 0;
    padding: 5px;
    border-radius: 5px;
}

.positive-change {
    color: #ff4136;
    background-color: rgba(255, 65, 54, 0.1);
}

.negative-change {
    color: #0074d9;
    background-color: rgba(0, 116, 217, 0.1);
}

.no-change {
    color: #aaa;
    background-color: rgba(170, 170, 170, 0.1);
}


.daily-status-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.date-indicators {
    border-radius: 5px;
    padding: 10px;
    flex: 1 1 calc(20% - 8px);
    min-width: 100px;
    background-color: #2c2c2c;
}

.date {
    color: #eee;
    font-size: 1.1rem;
    font-weight: normal;
}

.indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.indicator {
    color: #ccc;
    font-size: 1rem;
    font-weight: bold;
    padding: 3px;
    border-radius: 5px;
    border: solid 2px #8dc63f;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    display: flex;
    flex-direction: column;
}

.card-title {
    color: #8dc63f;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.card-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-text strong {
    flex: 0 0 30%;
    text-align: left;
}

.card-text span {
    flex: 0 0 70%;
    text-align: right;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.closing-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #8dc63f;
}

.membership-info {
    background-color: #1a1a1a;   
}

.membership-info .alert {
    background-color: #1a1a1a;
    color: #fff;
}

.membership-info .alert-heading {
    color: #8dc63f;
}

.alert p{
    font-size: 1.2rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, #ee2a7b, #8dc63f);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.cta-button:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(238, 42, 123, 0.3);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .date-indicators {
        flex: 1 1 calc(33.33% - 7px);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }

    .date-range-container {
        flex-direction: column;
    }

    .date-picker-wrapper {
        width: 100%;
    }

    .date-separator {
        display: none;
    }

    #applyDateRange {
        width: 100%;
    }

    .date-indicators {
        flex: 1 1 calc(50% - 5px);
    }

    .flatpickr-calendar.centered {
        width: 90% !important;
        max-width: 300px !important;
    }
}

@media (max-width: 576px) {

    .date-indicators {
        flex: 1 1 100%;
    }
}