.whiteboard-container {
    position: relative;
    border-radius: 6px;
    width: 100%;
    max-width: 1200px;
    height: 400px;
    display: flex;
    flex-direction: column;
    touch-action: none;
    overflow: hidden;
    border: 1px solid #ff9800;
}

.night .whiteboard-container{
    border:1px solid #444;
}

.whiteboard-container.web-fullscreen {
    width: 100%;
    max-width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: #2d3e4b !important;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999999;
}

.canvas-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    touch-action: none;
}

.canvas-wrapper canvas { 
    display: block; 
    width: 100%; 
    height: 100%; 
    cursor: crosshair; 
    touch-action: none; 
}

.floating-toolbar {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: #607D8B;
    backdrop-filter: blur(16px);
    border-radius: 6px;
    padding: 0.3rem 0.4rem;
    display: flex;
    gap: 0.2rem;
    align-items: center;
    z-index: 100;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    touch-action: manipulation;
}

.tool-btn {
    background: #375969;
    border: none;
    color: white;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 100%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    touch-action: manipulation;
    transition: all 0.1s ease;
}

.tool-btn i{
    font-size: 0.6rem;
}

.tool-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e2a36;
    color: #ffd966;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.6rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    margin-bottom: 8px;
}

.tool-btn:active { 
    transform: scale(0.96); 
    background: #e67e22; 
}

.tool-btn.active { 
    background: #f39c12; 
    color: #1e2a2f; 
}

.tool-btn:hover::after { 
    opacity: 1; 
}

.separator {
    width: 1px; 
    height: 1rem; 
    background: rgba(255, 255, 255, 0.3); margin: 0 0.1rem; 
}

.settings-popup {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(30, 40, 50, 0.96);
    backdrop-filter: blur(16px);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: white;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 14rem;
    cursor: default;
    touch-action: pan-y pinch-zoom;
}

.settings-popup h3 {
    margin: 0 0 0 0;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    line-height: 1rem;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    padding: 0 0 0.5rem 0;
    border-bottom: 1px solid #2c3e50;
}

.settings-popup .close-btn {
    background: none;
    border: none;
    color: #ffaa66;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    touch-action: manipulation;
}

.setting-row {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.setting-row label {
    width: 3rem;
    font-size: 0.7rem;
}

.setting-row input,
.setting-row select {
    background: #2c3e44;
    border: 1px solid #5a7a8a;
    color: white;
    padding: 0.2rem;
    flex: 1;
}

.setting-row input[type="color"] { 
    width: 56px;
    height: 1.3rem;
    padding: 0.1rem;
}

.setting-row input[type="range"] {
    flex: 1; 
    min-height: 2rem; 
}

.setting-row input[type="radio"]{
    vertical-align: -2px;
    margin-right: 0.3rem;
}

.checkbox-row { gap: 8px; }
.checkbox-row label { width: auto; }
.hidden { display: none; }
.shape-type-group {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    width: 22rem;
}
.shape-type-btn {
    background: #2c3e44;
    border: none;
    color: white;
    padding: 0.2rem 0.3rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.6rem;
    touch-action: manipulation;
}

.shape-type-btn.active-shape {
    background: #f39c12;
    color: #1e2a2f;
}

.classbuts {
    background: #f39c12;
    border: none;
    padding: 0.2rem 0.6rem;
    color: #fff;
    border-radius: 6px;
    font-size: 0.6rem;
}

#deleteShapeBtn {
    background: #e74c3c;
    border: none;
    padding: 0.4rem 0;
    color: white;
    cursor: pointer;
    width: 100%;
    touch-action: manipulation;
}

.btn-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.btn-row button {
    flex: 1;
    background: #f39c12;
    border: none;
    padding: 0.3rem;
    border-radius: 6px;
    color: #1e2a2f;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-row button.cancel {
    background: #5a7a8a;
    color: white;
}

.fullscreen-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.fullscreen-btn-group button {
    background: #2c3e44;
    border: none;
    padding: 0.4rem;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    touch-action: manipulation;
    font-size: 0.7rem;
}

.fullscreen-btn-group button:hover {
    background: #f39c12;
    color: #1e2a2f;
}

.baibanmargen5 {
    margin-bottom: 0.25rem;
}

.cetoolbars {
    width: 1.4rem;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.cetoolbars button {
    margin: 0.2rem 0;
}

.cetoolbars .tool-btn::after {
    left: unset;
    right: 1.6rem;
    transform: none;
    bottom: 0;
    margin-bottom: 0;
}

.labledivs {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    width: 3.5rem !important;
}

.labledivspardiv{
    display: flex;
    gap: 8px;
    flex: 1;
}

.text-input-row {
    margin-bottom: 0.6rem;
}

.text-input-row textarea {
    width: 100%; 
    background: #2c3e44; 
    border: 1px solid #5a7a8a; 
    color: white; 
    padding: 0.4rem; 
    border-radius: 6px; 
    font-size: 0.6rem; 
    display: block; 
}