:root {
    --vh: 100%;

}

body {
    margin: 0;
}

#toast-container {
    position: fixed;
    bottom: 40px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 500px;
    max-width: 500px;
    background-color: #60E0E0; /* 기본 색상 (성공) */
    color: black;
    padding: 5% 2%;
    font-size: 1.4rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: auto;
}


@media (max-width: 767px) {
    :root {
        /* Light mode colors */
        --section-bg-color: none;
        --title-text-color: #1e1e1e;
        --text-color: #1e1e1e;
        --button-text-color: #1e1e1e;
        --button-bg-color: #1e1e1e;
        --explained-text-color: #585858;
        --product-available-color: #666;
        --pagination-text-color: #333;
        --pagination-bg-color: #f5f5f5;
        --img-filter: invert(0);
        --img-filter-with-text: invert(0);
        --graph-head-color: #f5f5f5;
    }

    body.dark {
        /* Dark mode colors */
        --section-bg-color: #000000;
        --title-text-color: #ffffff;
        --text-color: #ffffff;
        --button-text-color: #000000;
        --button-bg-color: #ffffff;
        --explained-text-color: #ffffff;
        --product-available-color: #ffffff;
        --pagination-text-color: #333;
        --pagination-bg-color: #888888;
        --img-filter: invert(1) hue-rotate(180deg) brightness(10) contrast(1);
        --img-filter-with-text: invert(0);
        --graph-head-color: #1e1e1e;
    }

    body {
        margin: 0;
        background-color: var(--section-bg-color);
    }

    .index-container,
    .cart-container,
    .second-section,
    .third-section,
    .fourth-section,
    .fifth-section,
    .sixth-section,
    .seventh-section,
    .eighth-section,
    .ninth-section,
    .tenth-section {
        background-color: var(--section-bg-color);
    }

    #toast-container {
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: calc(100vw - 40px);
    }

    .toast {
        min-width: auto;
        max-width: 100%;
        width: 100%;
        font-size: 1.2rem;
        padding: 15px;
    }
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* 상태별 색상 */
.toast.success {
    background-color: #60E0E0;
    color: #0e6251;
}

.toast.error {
    background-color: #f9d6d5;
    color: #922b21;
}

.toast.info {
    background-color: #d6eaf8;
    color: #154360;
}

/* PC (1280px 이상) */
@media (min-width: 1280px) {
    html { font-size: 16px; }
}

/* 노트북 & 테블릿 가로 (1024px ~ 1279px) */
@media all and (min-width:1024px) and (max-width:1279px) {
    html {
        font-size: 15px;
    }
}

/* 테블릿 가로 (768px ~ 1023px) */
@media all and (min-width:768px) and (max-width:1023px) {
    html {
        font-size: 14px;
    }
}

/* 모바일 가로 & 테블릿 세로 (480px ~ 767px) */
@media all and (min-width:480px) and (max-width:767px) {
    html {
        font-size: 13px;
    }
}

/* 모바일 세로 (~ 479px) */
@media all and (max-width:479px) {
    html {
        font-size: 12px;
    }
}