/* Global Styles */
body {
    margin: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background: linear-gradient(90deg, #000035 0%, #00bfa5 100%);
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
    background-size: cover;
    position: relative;
    z-index: 0;
    /* Remove fallback solid color, or keep as fallback only */
    background-color: #000035;
}

/* Add global transitions */
* {
    transition: all 0.3s ease;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding-left: 20px;
    position: relative;
}

.schedule-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    width: 30%;
    max-width: 300px;
    color: #000035;
    margin-bottom: 20px;
    text-align: center;
    line-height: 2;
    position: fixed;
    bottom: 240px;
    left: 20px;
    z-index: 2;
}

/* Consolidated heading styles */
h3 {
    font-size: 1.2em;
    color: #ffffff;
    display: inline;
}

/* Consolidated select styles */
select {
    font-size: 1.2em;
    color: #000035;
    background-color: #ffffff;
    border: 2px solid #00bfa5;
    border-radius: 5px;
    padding: 5px;
    margin-left: 10px;
}

.schedule-container h1 {
    text-align: center;
    font-size: 1.5em;
}

#schedule {
    margin-bottom: 20px;
}

.current-period {
    position: fixed;
    bottom: 10px;
    left: 20px;
    text-align: left;
    z-index: 2;
}

#current-schedule-title {
    font-size: 2em;
    margin-bottom: 10px;
    color: #ffffff;
}

#remove-bg-button {
    background-color: white;
    color: #000035;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#remove-bg-button:hover {
    background-color: #f0f0f0;
}

#current-period-time {
    font-size: 8em;
    color: #ffffff;
    margin-top: 20px;
}

#current-schedule-title, #current-period-time {
    color: inherit;
}

#settings-button {
    position: fixed;
    bottom: 20px;
    right: 80px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: #ffffff;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#settings-button:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: rotate(45deg);
}

/* Consolidated dropdown styles */
.dropdown-toggle {
    width: calc(100% - 20px);
    padding: 12px;
    margin: 10px;
    background: rgba(0, 191, 165, 0.1);
    border: 1px solid rgba(0, 191, 165, 0.3);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    margin-left: 10px; /* Added margin for spacing */
    margin-right: 10px; /* Added margin for spacing */
}

.dropdown-toggle:hover {
    background: rgba(0, 191, 165, 0.2);
    transform: translateY(-1px);
}

.dropdown-toggle h3 {
    margin: 0;
    font-weight: 500;
}

.triangle {
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .triangle {
    transform: rotate(180deg);
}

.dropdown-content {
    margin: 0 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 191, 165, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-content input[type="text"],
.dropdown-content input[type="number"],
.dropdown-content input[type="time"] {
    width: calc(100% - 16px);
    padding: 8px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 191, 165, 0.3);
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.dropdown-content label {
    display: block;
    color: #00bfa5;
    margin-top: 12px;
    font-size: 14px;
}

#period-inputs > div {
    background: rgba(0, 191, 165, 0.05);
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid rgba(0, 191, 165, 0.1);
}

#save-schedule-button {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: #00bfa5;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#save-schedule-button:hover {
    background: #00a693;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Modern Settings Sidebar */
.settings-sidebar {
    display: none;
    position: fixed;
    inset: 0;
    background: #1a1a1a;
    color: #ffffff;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-sidebar.open {
    display: block;
    opacity: 1;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-left i {
    font-size: 1.25rem;
    color: #00bfa5;
}

.header-left h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
    color: inherit;
}

.close-settings {
    background: none;
    border: none;
    color: inherit;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-settings:hover {
    background: rgba(255, 255, 255, 0.1);
}

.close-settings i {
    font-size: 1.25rem;
}

.settings-sidebar.light-mode .settings-header {
    background: rgba(255, 255, 255, 0.8);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.settings-sidebar.light-mode .close-settings:hover {
    background: rgba(0, 0, 0, 0.05);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    position: fixed; /* Change to fixed */
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.settings-sidebar.open .theme-toggle {
    display: flex;  /* Show only when settings sidebar is open */
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.settings-actions {
    display: flex;
    gap: 1rem;
}

.settings-actions button {
    background: none;
    border: none;
    color: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.settings-actions button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.close-settings span {
    font-size: 1.5rem;
    line-height: 1;
}

.settings-content {
    display: flex;
    height: calc(100vh - 73px);
}

.settings-nav {
    position: sticky;
    top: 73px; /* Match header height */
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    width: 240px;
    min-width: 240px;
    height: calc(100vh - 73px);
}

.settings-panels {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.settings-group {
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
    width: 100%;
    box-sizing: border-box;
}

.theme-toggle {
    position: fixed; /* Change to fixed */
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.settings-panels {
    padding: 2rem;
    overflow-y: auto;
}

.settings-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.settings-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin: 0 auto 20px auto;
    padding: 20px;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.settings-group h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    color: #00bfa5;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Light theme modifications */
.settings-sidebar.light-mode {
    background: #ffffff;
    color: #1a1a1a;
}

.settings-sidebar.light-mode .settings-nav {
    background: #f5f5f5;
    border-right-color: #e0e0e0;
}

.settings-sidebar.light-mode .settings-group {
    background: #f5f5f5;
}

.settings-sidebar.light-mode .nav-item {
    color: #1a1a1a;
}

.settings-sidebar.light-mode .nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.settings-sidebar.light-mode .nav-item.active {
    background: #00bfa5;
    color: #ffffff;
}

.dropdown-toggle:hover {
    background: rgba(0, 173, 181, 0.2);
    transform: translateY(-1px);
}

.settings-sidebar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.close-settings-sidebar {
    background: rgba(0, 173, 181, 0.1);
    border: 1px solid rgba(0, 173, 181, 0.2);
    color: #EEEEEE;
}

close-settings-sidebar:hover {
    background: rgba(0, 173, 181, 0.2);
}

.dropdown-content {
    padding: 10px 20px;  /* Add some padding for better visibility */
    background-color: rgba(255, 255, 255, 0.1); /* Light background for contrast */
    border-radius: 8px;  /* Rounded corners for a smoother look */
    display: none;       /* Hide by default */
    transition: max-height 0.3s ease;
    overflow: hidden;    /* Hide overflow content */
    padding: 15px;
    margin: 10px 0;
}

/* When the dropdown is toggled to show */
.dropdown-content.show {
    display: block;      /* Show the dropdown */
    max-height: none;    /* Allow the content to expand to its full size */
}

/* Double Spaced Text Elements */
.settings-sidebar div {
    margin-bottom: 20px;
}

.settings-sidebar button {
    background-color: #00ADB5;
    color: #EEEEEE;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.settings-sidebar button:hover {
    background-color: #009aa1;
    transform: translateY(-2px);
}

.settings-sidebar button:active {
    background-color: #004d40;
    transform: translateY(1px);
}

@media (max-width: 600px) {
    .schedule-container {
        width: 80%;
        max-width: none; 
        margin: 0 auto;
        position: static;
    }

    .current-period {
        position: relative;
        bottom: 0;
        left: 0;
        width: 100%;
        text-align: center;
    }
}
/* Media query for smaller screens */
@media (max-width: 600px) {
    .schedule-container {
        width: 90%; /* Adjust the width to 90% of the viewport */
        max-width: none; /* Remove the max-width constraint */
        margin: 10px auto; /* Center the container */
        padding: 10px; /* Adjust padding for better spacing */
    }

    .current-period {
        position: relative; /* Change position to allow for proper alignment */
        bottom: 0;
        left: 0;
        width: 100%; /* Ensure it takes full width */
        text-align: center; /* Center the text */
    }
}

#bg-image-drop-area {
    border: 2px dashed #00bfa5;
    border-radius: 8px;
    padding: 5px; /* Reduced padding */
    text-align: center;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.3s ease;
    background-color: rgba(0, 191, 165, 0.1);
    min-height: 30px; /* Reduced min-height */
    width: 150px; /* Set a fixed width */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed currentColor;
    background-color: transparent;
    color: inherit;
}

#bg-image-drop-area:hover {
    background-color: rgba(0, 191, 165, 0.2);
    border-color: #ffffff;
}

#bg-image-drop-area.drag-over {
    background-color: rgba(0, 191, 165, 0.3);
    border-color: #ffffff;
    transform: scale(1.02);
}

#bg-image-drop-area p {
    margin: 2px 0; /* Reduced margin */
    color: #ffffff;
    font-size: 10px; /* Reduced font size */
    color: inherit;
    opacity: 0.8;
}

#bg-image {
    display: none; /* Hide the file input */
}

#save-schedule-button {
    margin-top: 15px;
    padding: 8px 16px; /* Existing padding */
    background-color: #00bfa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: auto; /* Change from 100% to auto for dynamic width */
    display: block !important; /* Force display */
    margin-left: 10px; /* Add left margin for spacing */
    margin-right: 10px; /* Add right margin for spacing */
}

#save-schedule-button:hover {
    background-color: #00796b;
}

#custom-schedule-content {
    padding: 15px;
    display: none;
}

#custom-schedule-content.show {
    display: block;
}

/* ...existing code... */

.settings-group {
    border: 1px solid rgba(0, 173, 181, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 0 auto 20px auto;
    background: #393E46;
    max-width: 800px;
    width: calc(100% - 40px);
}

.settings-group h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #00ADB5;
    font-size: 1.1em;
    font-weight: bold;
}

/* Improved Dropdown Styling */
.dropdown-toggle {
    width: 100%;
    padding: 15px;
    background: rgba(34, 34, 34, 0.3);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

.dropdown-toggle:hover {
    background: rgba(34, 34, 34, 0.5);
}

.dropdown-toggle.active {
    background: rgba(34, 34, 34, 0.6);
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.dropdown-content {
    display: none;
    padding: 20px;
    background: rgba(34, 34, 34, 0.3);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-bottom: 15px;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Improved Dropdown Styling */
.dropdown-toggle {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #393E46;
    border: 1px solid #00ADB5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dropdown-toggle:hover {
    background: #454b54;
    transform: translateY(-1px);
}

.dropdown-toggle h3 {
    margin: 0;
    font-weight: 500;
}

.triangle {
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .triangle {
    transform: rotate(180deg);
}

.dropdown-content {
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    background: #393E46;
    border: 1px solid #00ADB5;
    border-radius: 8px;
    box-sizing: border-box;
}

.dropdown-content input[type="text"],
.dropdown-content input[type="number"],
.dropdown-content input[type="time"] {
    width: calc(100% - 16px);
    padding: 8px;
    margin: 8px 0;
    background: #222831;
    border: 1px solid #00ADB5;
    border-radius: 4px;
    color: #EEEEEE;
    font-size: 14px;
}

.dropdown-content label {
    display: block;
    color: #00bfa5;
    margin-top: 12px;
    font-size: 14px;
}

#period-inputs > div {
    background: rgba(0, 191, 165, 0.05);
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid rgba(0, 191, 165, 0.1);
}

#save-schedule-button {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: #00bfa5;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#save-schedule-button:hover {
    background: #00a693;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ...existing code... */

/* Improved Settings Sidebar Layout */
.settings-sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background: #222831;  /* Changed from rgba(0, 0, 53, 0.95) to solid color */
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.settings-group {
    max-width: 800px;
    margin: 0 auto 20px auto;
    padding: 15px;
}

/* Handle long content in dropdowns */
.dropdown-content {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00bfa5 rgba(255, 255, 255, 0.1);
}

.dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #00bfa5;
    border-radius: 4px;
}

/* Fix inputs and labels from overflowing */
.dropdown-content input[type="text"],
.dropdown-content input[type="number"],
.dropdown-content input[type="time"] {
    width: calc(100% - 20px);
    box-sizing: border-box;
}

#period-inputs > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
}

@media (max-width: 600px) {
    #period-inputs > div {
        grid-template-columns: 1fr;
    }
}

/* ...existing code... */

.timer-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ...existing code... */

#text-shadow-dropdown {
    background-color: #ffffff; /* White background */
    color: #000035; /* Dark text color */
    border: 2px solid #00bfa5; /* Border color */
    border-radius: 5px; /* Rounded corners */
    padding: 10px; /* Padding for better spacing */
    font-size: 16px; /* Font size */
    cursor: pointer; /* Pointer cursor on hover */
    transition: border-color 0.3s; /* Smooth border color transition */
}

#text-shadow-dropdown:focus {
    border-color: #00796b; /* Darker border on focus */
    outline: none; /* Remove outline */
}

#text-shadow-dropdown option {
    background-color: #ffffff; /* White background for options */
    color: #000035; /* Dark text color for options */
}

/* ...existing code... */

#shadow-settings-content {
    padding: 15px;
    background: #393E46;
    border-radius: 8px;
}

#shadow-settings-content input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

#shadow-settings-content input[type="color"] {
    width: 50px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: none;
}

#shadow-settings-content div {
    margin-bottom: 15px;
}

#shadow-settings-content label {
    display: block;
    margin-bottom: 5px;
    color: #EEEEEE;
}

/* ...existing code... */

#shadow-preview {
    font-size: 4em;
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
}

.range-value {
    display: inline-block;
    margin-left: 10px;
    color: #ffffff;
    min-width: 40px;
}

#shadow-settings-content {
    display: none;
}

#shadow-settings-content.show {
    display: block;
}

/* ...existing code... */

/* ...existing code... */

.switch-container {
    display: flex;
    align-items: center;
    gap: 8px;        /* Reduced from 10px */
    margin-bottom: 12px; /* Reduced from 15px */
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;     /* Reduced from 60px */
    height: 24px;    /* Reduced from 34px */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #393E46;
    transition: .4s;
    border-radius: 34px;
    border: 2px solid #00ADB5;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;    /* Reduced from 26px */
    width: 18px;     /* Reduced from 26px */
    left: 3px;       /* Reduced from 4px */
    bottom: 1px;     /* Reduced from 2px */
    background-color: #EEEEEE;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00ADB5;
}

input:checked + .slider:before {
    transform: translateX(22px); /* Reduced from 26px */
}

.switch-label {
    color: #ffffff;
    font-size: 1em;
}

/* ...existing code... */

#gradient-stops {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.gradient-stop {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gradient-stop input[type="color"] {
    width: 50px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
}

.gradient-stop input[type="number"] {
    width: 60px;
    padding: 5px;
    border: 1px solid #00bfa5;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.remove-stop {
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    font-size: 20px;
    padding: 0 5px;
}

#add-stop {
    background: #00bfa5;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    margin-top: 5px;
}

#add-stop:hover {
    background: #00896f;
}

/* ...existing code... */

#gradient-preview {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(to right, #000035, #00bfa5);
}

.gradient-controls {
    background: #393E46;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.gradient-opacity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.gradient-opacity input[type="range"] {
    flex-grow: 1;
}

.gradient-layer-toggle {
    margin: 10px 0;
}

#gradient-stops {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

.gradient-stop {
    display: grid;
    grid-template-columns: auto 80px 30px;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.gradient-stop:last-child {
    margin-bottom: 0;
}

.gradient-stop input[type="color"] {
    width: 60px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: none;
}

.gradient-stop input[type="number"] {
    width: 100%;
    padding: 5px;
    border: 1px solid #00bfa5;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ...existing code... */

.gradient-editor {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

.gradient-editor.show {
    display: block;
}

.gradient-preview {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-bar-container {
    position: relative;
    width: 100%;
    height: 40px;
    margin: 15px 0;
    padding: 10px 0;
}

.gradient-bar {
    width: 100%;
    height: 24px;
    border-radius: 4px;
    margin: 20px 0;
    background: linear-gradient(to right, #000035, #00bfa5);
}

.gradient-stops-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
}

.gradient-stop-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 2px;
    margin-left: -8px;
    background: white;
    border: 2px solid #00bfa5;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.gradient-stop-marker:hover,
.gradient-stop-marker.active {
    transform: scale(1.2);
    z-index: 2;
}

.gradient-controls {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    align-items: center;
}

.stop-editor {
    background: #393E46;
    padding: 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.stop-editor input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.position-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.position-input input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.delete-stop {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ff4444;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-stop:hover {
    background: rgba(255, 0, 0, 0.1);
}

/* ...existing code... */

/* Remove or update these styles if they exist */
.drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 191, 165, 0.15);
    z-index: 10000;
    pointer-events: none;
    display: none;
}

.drop-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

/* ...existing code... */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.popup {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.popup button {
    margin: 0 10px;
    padding: 5px 15px;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-align: center;
    /* Ensure text is dark for legibility */
    color: #000;
}

.popup-box p {
    margin-bottom: 20px;
    font-size: 16px;
}

.popup-buttons {
    display: flex;
    justify-content: space-around;
}

.popup-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.popup-btn.confirm {
    background-color: #28a745;
    color: #fff;
}

.popup-btn.cancel {
    background-color: #dc3545;
    color: #fff;
}

input, select {
    margin-bottom: 10px;
}

.settings-group input[type="text"],
.settings-group input[type="number"],
.settings-group input[type="time"],
.settings-group select {
    width: 100%;
    padding: 8px;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.settings-group input[type="color"] {
    width: 60px;
    height: 30px;
    padding: 0;
    margin-bottom: 1rem;
}

.settings-group input[type="range"] {
    width: calc(100% - 60px);
    margin-bottom: 1rem;
}

/* ...existing code... */

/* Improved nav buttons */
.nav-item {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: inherit;
    font-size: 14px;
    text-align: left;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.nav-item.active {
    background: rgba(0, 191, 165, 0.15);
    border-color: rgba(0, 191, 165, 0.3);
    color: #00bfa5;
}

/* ...existing code... */

/* ...existing code... */

.legal-links {
    padding: 10px 0;
}

.legal-links a {
    color: #00bfa5;
    text-decoration: none;
    padding: 8px 0;
    display: inline-block;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #ffffff;
}

/* ...existing code... */

/* Gradient Test Panel Styles */
.gradient-preview {
    width: 300px;
    height: 100px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.gradient-controls {
    margin: 20px 0;
}

.gradient-controls .controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gradient-controls label {
    color: inherit;
    margin-right: 10px;
}

.gradient-controls input[type="color"] {
    width: 60px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
}

.gradient-save-btn {
    background: #00bfa5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.gradient-save-btn:hover {
    background: #00a693;
}

/* ...existing code... */

/* ...existing code... */

.settings-nav {
    width: 200px;
    background: #222;
    border-right: 1px solid #333;
}

.nav-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: none;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-item i {
    width: 20px;
    margin-right: 10px;
    font-size: 16px;
}

.nav-item:hover {
    background: #333;
}

.nav-item.active {
    background: #00bfa5;
    color: #fff;
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #fff;
}

.settings-group h3 {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.settings-group h3 i {
    margin-right: 10px;
    color: #00bfa5;
}

/* ...existing code... */

/* Extension Panel Styles */
.color-controls {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.direction-controls {
    margin-bottom: 20px;
}

#saveExtensionButton {
    background: #00bfa5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

#saveExtensionButton:hover {
    background: #00a392;
}

#extensionPreview {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-top: 20px;
}

/* ...existing code... */

/* Progress Bar Styles */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 100vh; /* Changed from 4px to 100vh */
    background: rgba(0, 191, 165, 0.2);
    transition: width 0.5s linear;
    z-index: 1;
    pointer-events: none; /* Ensure clicks pass through */
}

#progress-bar-settings {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: rgba(34, 34, 34, 0.5);
    border-radius: 8px;
}

/* ...existing code... */

/* Schedule Section Dropdowns */
#rename-periods, #custom-schedule {
    margin: 10px 0;
}

.dropdown-toggle {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.dropdown-toggle:hover {
    background: rgba(0, 0, 0, 0.3);
}

.dropdown-toggle.active {
    border-radius: 8px 8px 0 0;
    background: rgba(0, 0, 0, 0.3);
}

.dropdown-content {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 8px 8px;
    padding: 15px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content input[type="text"],
.dropdown-content input[type="number"],
.dropdown-content input[type="time"] {
    width: 100%;
    padding: 8px 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    transition: all 0.2s ease;
}

.dropdown-content input:focus {
    outline: none;
    border-color: #00bfa5;
    background: rgba(255, 255, 255, 0.15);
}

.rename-period {
    margin: 10px 0;
    padding: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

#save-schedule-button {
    margin-top: 15px;
    padding: 8px 16px;
    background: #00bfa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#save-schedule-button:hover {
    background: #00a593;
}

/* Welcome popup styles */
#grade-level-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.grade-level-modal-box {
    background: #fff;
    color: #222;
    border-radius: 18px;
    padding: 40px 36px 32px 36px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    text-align: center;
    min-width: 320px;
    max-width: 95vw;
    position: relative;
    font-family: 'Inter', 'Roboto', Arial, sans-serif;
    border: 2.5px solid #00bfa5;
    transition: box-shadow 0.2s;
}

.grade-level-modal-box h2 {
    margin-bottom: 18px;
    color: #00bfa5;
    font-size: 2.1em;
    font-weight: 700;
}

.grade-level-modal-box p {
    margin-bottom: 8px;
    font-size: 1.18em;
    font-weight: 500;
}

.grade-level-modal-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 10px;
}

.grade-level-modal-btn {
    min-width: 160px;
    padding: 18px 0;
    background: linear-gradient(90deg, #00bfa5 60%, #00796b 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.18em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,191,165,0.10);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    outline: none;
    border: 2px solid transparent;
    letter-spacing: 0.02em;
}

.grade-level-modal-btn:last-child {
    background: linear-gradient(90deg, #00796b 60%, #00bfa5 100%);
}

.grade-level-modal-btn:hover,
.grade-level-modal-btn:focus {
    background: linear-gradient(90deg, #00bfa5 80%, #00796b 100%);
    box-shadow: 0 6px 24px rgba(0,191,165,0.18);
    transform: translateY(-2px) scale(1.06);
    border: 2px solid #00bfa5;
}

.grade-level-modal-info {
    margin-top: 18px;
    color: #888;
    font-size: 0.98em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.grade-level-modal-info i {
    color: #00bfa5;
}
    background: #333;
}

.nav-item.active {
    background: #00bfa5;
    color: #fff;
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #fff;
}

.settings-group h3 {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.settings-group h3 i {
    margin-right: 10px;
    color: #00bfa5;
}

/* ...existing code... */

/* Extension Panel Styles */
.color-controls {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.direction-controls {
    margin-bottom: 20px;
}

#saveExtensionButton {
    background: #00bfa5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

#saveExtensionButton:hover {
    background: #00a392;
}

#extensionPreview {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-top: 20px;
}

/* ...existing code... */

/* Progress Bar Styles */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 100vh; /* Changed from 4px to 100vh */
    background: rgba(0, 191, 165, 0.2);
    transition: width 0.5s linear;
    z-index: 1;
    pointer-events: none; /* Ensure clicks pass through */
}

#progress-bar-settings {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: rgba(34, 34, 34, 0.5);
    border-radius: 8px;
}

/* ...existing code... */

/* Schedule Section Dropdowns */
#rename-periods, #custom-schedule {
    margin: 10px 0;
}

.dropdown-toggle {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.dropdown-toggle:hover {
    background: rgba(0, 0, 0, 0.3);
}

.dropdown-toggle.active {
    border-radius: 8px 8px 0 0;
    background: rgba(0, 0, 0, 0.3);
}

.dropdown-content {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 8px 8px;
    padding: 15px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content input[type="text"],
.dropdown-content input[type="number"],
.dropdown-content input[type="time"] {
    width: 100%;
    padding: 8px 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    transition: all 0.2s ease;
}

.dropdown-content input:focus {
    outline: none;
    border-color: #00bfa5;
    background: rgba(255, 255, 255, 0.15);
}

.rename-period {
    margin: 10px 0;
    padding: 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

#save-schedule-button {
    margin-top: 15px;
    padding: 8px 16px;
    background: #00bfa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#save-schedule-button:hover {
    background: #00a593;
}

/* Welcome popup styles */
#grade-level-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.grade-level-modal-box {
    background: #fff;
    color: #222;
    border-radius: 18px;
    padding: 40px 36px 32px 36px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    text-align: center;
    min-width: 320px;
    max-width: 95vw;
    position: relative;
    font-family: 'Inter', 'Roboto', Arial, sans-serif;
    border: 2.5px solid #00bfa5;
    transition: box-shadow 0.2s;
}

.grade-level-modal-box h2 {
    margin-bottom: 18px;
    color: #00bfa5;
    font-size: 2.1em;
    font-weight: 700;
}

.grade-level-modal-box p {
    margin-bottom: 8px;
    font-size: 1.18em;
    font-weight: 500;
}

.grade-level-modal-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 10px;
}

.grade-level-modal-btn {
    min-width: 160px;
    padding: 18px 0;
    background: linear-gradient(90deg, #00bfa5 60%, #00796b 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.18em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,191,165,0.10);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    outline: none;
    border: 2px solid transparent;
    letter-spacing: 0.02em;
}

.grade-level-modal-btn:last-child {
    background: linear-gradient(90deg, #00796b 60%, #00bfa5 100%);
}

.grade-level-modal-btn:hover,
.grade-level-modal-btn:focus {
    background: linear-gradient(90deg, #00bfa5 80%, #00796b 100%);
    box-shadow: 0 6px 24px rgba(0,191,165,0.18);
    transform: translateY(-2px) scale(1.06);
    border: 2px solid #00bfa5;
}

.grade-level-modal-info {
    margin-top: 18px;
    color: #888;
    font-size: 0.98em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.grade-level-modal-info i {
    color: #00bfa5;
}
