.setting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    overflow: hidden; /* Prevent scrolling */
}

/* Prevent body scroll when settings modal is open */
body.settings-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.setting-container {
    width: 418px;
    height: 225px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-radius: 24px;
    box-shadow: 1px 0px 4px 0px rgba(0, 0, 0, 0.25);
    padding: 0;
    position: relative;
    font-family: "Outfit", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    animation: slideInScale 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
    
.setting-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 24px 0 0 0;
}

.setting-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    flex: 1;
    margin: 0;
    color: var(--txt-primary);
}

.setting-container .close-btn {
    position: absolute;
    left: 205px;
    top: 14px;
    background: none;
    border: none;
    font-size: 1.6rem;
   color: var(--txt-primary);
    cursor: pointer;
    z-index: 2;
}

.setting-content {
    width: 394px;
    height: 141px;
    flex-shrink: 0;
    border-radius: 21px;
    border: 1px solid #636363;
    opacity: 0.5;
    background: var(--bg-primary);
    margin: 0 auto;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
    padding: 0 32px;
    box-sizing: border-box;
}

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.08rem;
    font-weight: 500;
   color: var(--txt-primary);
    margin-bottom: 0;
    letter-spacing: 1px;
}

/* Custom toggle switch */
.toggle-switch {
    appearance: none;
    width: 48px;
    height: 28px;
    background: var(--txt-primary);
    border-radius: 9px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    margin-left: 12px;
}

.toggle-switch:checked {
    background: #4ebd2a;
}
body.high-contrast .toggle-switch:checked {
    background: #c27d0d;
}

.toggle-switch::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 4px;
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border-radius: 50%;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.toggle-switch:checked::before {
    left: 23px;
}

.next-waffle-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 20px 0 10px;
    text-transform: none;
}

.time-options {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.time-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-right: 10px;
    background: #f9f9f9;
    cursor: pointer;
}

.time-option:last-child {
    margin-right: 0;
}

.time-option.active {
    background: #e8f5e9;
    border-color: #4caf50;
}

.time-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

.time-type {
    font-size: 0.8rem;
    color: #666;
}

.time-value {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.time-warning {
    font-size: 0.9rem;
    color: #999;
    text-align: center;
    margin-top: 10px;
    text-transform: none;
}

.close-btn img {
    width: 14px;
    height: 14px;
}

/* Dark Mode CSS */

/* body.dark-mode {
  background: #000 !important;
  color: #fff !important;
}

body.dark-mode .setting-container,
body.dark-mode .setting-content,
body.dark-mode .setting-title,
body.dark-mode .setting-header,
body.dark-mode .toggle-option,
body.dark-mode .close-btn {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
} */

/* Dark Mode */
/* body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

body.dark-mode .setting-container {
    background-color: #1e1e1e;
    color: #ffffff;
}

body.dark-mode .toggle-switch {
    background: #444;
}

body.dark-mode .toggle-switch:checked {
    background: #4caf50;
} */

/* High Contrast Mode */
/* body.high-contrast {
    background-color: #000000;
    color: #ffff00;
}

body.high-contrast .setting-container {
    background-color: #000000;
    color: #ffff00;
}

body.high-contrast .toggle-switch {
    background: #ffff00;
}

body.high-contrast .toggle-switch:checked {
    background: #ff0000;
} */



@media (max-width: 450px) {
    .setting-container {
       width: 356px;
    }

    .setting-content {
        width: 331px;
    }
    .setting-container .close-btn {
    position: absolute;
    left: 187px;
    top: 16px;
   
}

/* Animation keyframes for setting modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
}