/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    background-color: #f0f2f5;
    color: #333;
}

body.light-mode {
    background-color: #ffffff;
    color: #000000;
}

body.dark-mode {
    background-color: #333333;
    color: #ffffff;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ccc;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.tab {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    background-color: #fff;
    display: flex;
    justify-content: center;
    padding: 10px;
}

.dropdown {
    position: relative;
}

.dropdown .dropbtn {
    font-size: 16px;
    border: none;
    outline: none;
    color: black;
    padding: 10px 20px;
    background-color: #f0f2f5;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dropdown:hover .dropbtn, .dropdown .dropbtn.active {
    background-color: #ddd;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-content a {
    float: none;
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.tabcontent {
    display: none;
    padding: 20px;
    border: 1px solid #ccc;
    border-top: none;
}

.footer {
    text-align: center;
    margin-top: auto;
    padding: 10px;
    background-color: #f1f1f1;
    border-top: 1px solid #ccc;
    width: 100%;
}

.sidebar {
    position: fixed;
    top: 195px;
    left: 10px;
    width: 60px;
    background-color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: move;
    z-index: 1000;
    transition: background-color 0.3s;
}

.sidebar:hover {
    background-color: #444;
}

.sidebar-btn {
    background: none;
    border: none;
    margin: 10px 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.sidebar-btn img {
    width: 30px;
    height: 30px;
    background-color: #444;
    padding: 5px;
    border-radius: 5px;
}

.sidebar-btn:hover {
    transform: scale(1.1);
}

.color-picker {
    margin: 10px 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-picker:hover {
    transform: scale(1.1);
}

.brush-size-slider {
    margin: 10px 0;
    width: 40px;
    transform: rotate(-90deg);
}

.menu-bar {
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    padding: 10px;
    display: flex;
    z-index: 1001;
}

.menu {
    position: relative;
}

.menu-button {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    margin-right: 10px;
    transition: background-color 0.3s, transform 0.2s;
}

.menu-button:hover {
    background-color: #ddd;
    transform: scale(1.05);
}

.menu .dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.menu:hover .dropdown-content {
    display: block;
}

.menu .dropdown-content a, .menu .dropdown-content label, .menu .dropdown-content input, .menu .dropdown-content button, .menu .dropdown-content select {
    color: black;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s;
}

.menu .dropdown-content input, .menu .dropdown-content select {
    margin: 5px 0;
}

.menu .dropdown-content button {
    cursor: pointer;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.menu .dropdown-content button:hover {
    background-color: #ddd;
}

.menu .dropdown-content input[type="range"] {
    width: 100%;
}

.canvas-container {
    position: fixed;
    top: 195px;
    left: 80px;
    border: 1px solid #ccc;
    margin-top: 0;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    height: 400px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: auto;
    z-index: 10;
    transition: transform 0.2s;
}

.panel:hover {
    transform: scale(1.02);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #ddd;
    border-bottom: 1px solid #ccc;
    cursor: move;
}

.panel-content {
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto;
}

.panel-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.dragging {
    opacity: 0.5;
}

.menu-bar .menu:hover .dropdown-content {
    display: block;
    visibility: visible;
    opacity: 1;
}
