
body.dark-mode {
    background: linear-gradient(135deg, #1e1e1e 0%, #3e3e3e 100%);
    color: #fff;
}

.menu-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    justify-content: flex-start;
    position: relative;
}

.menu-item {
    position: relative;
    padding: 10px;
    margin-right: 10px;
    cursor: pointer;
    color: inherit;
}

.menu-item:hover .dropdown-content {
    display: block;
}

body.dark-mode .menu-bar {
    background: rgba(30, 30, 30, 0.85);
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
}

body.dark-mode .dropdown-content {
    background-color: rgba(50, 50, 50, 0.85);
}

.dropdown-content button {
    width: 100%;
    background: none;
    border: none;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

#darkModeToggle {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

#darkModeToggle i {
    color: inherit;
}

.toolbar {
    background: black;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    transition: background-color 0.3s, border-color 0.3s;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    margin: 20px;
    z-index: 1000;
    position: relative;
}

.toolbar-group {
    display: flex;
    align-items: center;
    margin: 5px;
}

body.dark-mode .toolbar {
    background: rgba(30, 30, 30, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.toolbar button, .toolbar select, .toolbar input[type="color"] {
    padding: 10px;
    margin-right: 5px;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

.toolbar button:hover, .toolbar select:hover, .toolbar input[type="color"]:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .toolbar button:hover, body.dark-mode .toolbar select:hover, body.dark-mode .toolbar input[type="color"]:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: inherit;
}

.color-picker-wrapper {
    position: relative;
}

#colorPicker, #highlightPicker {
    display: none;
}

.color-picker-wrapper.active #colorPicker, .color-picker-wrapper.active #highlightPicker {
    display: block;
}

#editor-container {
    flex: 1;
    height: 500px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s, border-color 0.3s;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    margin: 20px;
    overflow-x: hidden;
    
}

body.dark-mode #editor-container {
    background: rgba(30, 30, 30, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

#editor {
    width: 80%;
    max-width: 80%;
    min-height: 800px;
    margin: 0 auto;
    padding: 1in;
    background-color: rgba(255, 255, 255, 0.85);
    color: black;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    position: relative;
    page-break-inside: avoid;
}

body.dark-mode #editor {
    background-color: rgba(50, 50, 50, 0.85);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.letter {
    height: 11in;
}

.legal {
    height: 14in;
}

.tabloid {
    height: 17in;
}

.A4 {
    height: 297mm;
}

.A3 {
    height: 420mm;
}

.page-break {
    display: block;
    width: 100%;
    height: 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
    margin: 10px 0;
    page-break-after: always;
}

body.dark-mode .page-break {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.slider {
    display: none;
    padding: 10px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background-color 0.3s, border-color 0.3s;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin: 20px;
    z-index: 1000;
}

body.dark-mode .slider {
    background: rgba(30, 30, 30, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.slider input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: transparent;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    margin-top: 5px;
}

.slider input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.slider input[type=range]::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #4CAF50;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode .slider input[type=range]::-webkit-slider-thumb {
    background: #FF5722;
}

body.dark-mode .slider input[type=range]::-moz-range-thumb {
    background: #FF5722;
}

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

.slider-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

button.active {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.font-dropdown, .font-size-dropdown {
    padding: 10px;
    margin-right: 5px;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

body.dark-mode .font-dropdown, body.dark-mode .font-size-dropdown {
        background-color: rgba(50, 50, 50, 0.85);
    border-color: rgba(0, 0, 0, 0.3);
  }

.colors {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.color-picker-dropdown {
    display: none;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background: rgba(200, 200, 200, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    position: absolute;
    z-index: 1001;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
}

body.dark-mode .color-picker-dropdown {
    background-color: rgba(50, 50, 50, 0.85);
    border-color: rgba(0, 0, 0, 0.3);
}

.color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid; 
    border-color: inherit;
    justify-content: center;
    align-items: center;
}

.color.no-highlight i {
    color: inherit;
    font-size: 18px;
  
}
