* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    background: #f0f0f0;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-toolbar {
    background: #2c3e50;
    color: white;
    padding: 10px;
    display: flex;
    gap: 20px;
}

.toolbar-group {
    display: flex;
    gap: 5px;
}

.top-toolbar button {
    background: #34495e;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 3px;
}

.top-toolbar button:hover {
    background: #4a5f7f;
}

.arrange-toolbar {
    background: #34495e;
    color: white;
    padding: 8px 10px;
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #2c3e50;
}

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

.toolbar-label {
    font-size: 12px;
    color: #bdc3c7;
    margin-right: 5px;
}

.arrange-toolbar button {
    background: #34495e;
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

.arrange-toolbar button:hover {
    background: #4a5f7f;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.left-sidebar, .right-sidebar {
    background: #ecf0f1;
    padding: 15px;
    overflow-y: auto;
}

.left-sidebar {
    width: 200px;
    border-right: 1px solid #bdc3c7;
}

.right-sidebar {
    width: 250px;
    border-left: 1px solid #bdc3c7;
}

h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
}

.tools-panel {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.tool-btn {
    background: white;
    border: 2px solid #bdc3c7;
    padding: 10px;
    cursor: pointer;
    text-align: left;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn span {
    font-size: 18px;
}

.tool-btn:hover {
    background: #e8f4f8;
    border-color: #3498db;
}

.tool-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

.properties-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.property-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.property-group label {
    font-size: 12px;
    color: #555;
}

.property-group input[type="color"] {
    width: 100%;
    height: 35px;
    border: 1px solid #bdc3c7;
    cursor: pointer;
}

.property-group input[type="range"] {
    width: 100%;
}

#strokeWidthValue {
    text-align: center;
    font-weight: bold;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 3px;
}

.delete-btn:hover {
    background: #c0392b;
}

.canvas-container {
    flex: 1;
    background: #95a5a6;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    padding: 40px 20px;
}

#canvas {
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    background: white;
    margin-top: 20px;
}

.layers-controls {
    margin-bottom: 10px;
}

#addLayerBtn {
    width: 100%;
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 3px;
}

#addLayerBtn:hover {
    background: #229954;
}

.layers-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.layer-item {
    background: white;
    border: 2px solid #bdc3c7;
    padding: 10px;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.layer-item.active {
    border-color: #3498db;
    background: #e8f4f8;
}

.layer-info {
    flex: 1;
    cursor: pointer;
}

.layer-name {
    font-weight: bold;
    font-size: 13px;
}

.layer-controls {
    display: flex;
    gap: 5px;
}

.layer-controls button {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
}

.layer-controls button:hover {
    background: #7f8c8d;
}

.layer-controls .delete {
    background: #e74c3c;
}

.layer-controls .delete:hover {
    background: #c0392b;
}

.text-options-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.text-options-panel select {
    width: 100%;
    padding: 8px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    background: white;
    font-size: 13px;
}

.text-options-panel input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.align-buttons {
    display: flex;
    gap: 5px;
}

.align-btn {
    flex: 1;
    background: white;
    border: 2px solid #bdc3c7;
    padding: 8px 5px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
}

.align-btn:hover {
    background: #e8f4f8;
    border-color: #3498db;
}

.align-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

/* PDF Export Modal */
.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.pdf-modal.active {
    display: flex;
}

/* New Drawing Modal - reuse PDF modal styles */
.new-drawing-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.new-drawing-modal.active {
    display: flex;
}

.pdf-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.pdf-modal h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
}

.pdf-option-group {
    margin-bottom: 20px;
}

.pdf-option-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

.pdf-option-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 14px;
}

.pdf-orientation {
    display: flex;
    gap: 10px;
}

.pdf-orientation-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid #bdc3c7;
    background: white;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
}

.pdf-orientation-btn:hover {
    background: #e8f4f8;
    border-color: #3498db;
}

.pdf-orientation-btn.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}

.pdf-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.pdf-modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.pdf-export-btn {
    background: #27ae60;
    color: white;
}

.pdf-export-btn:hover {
    background: #229954;
}

.pdf-cancel-btn {
    background: #95a5a6;
    color: white;
}

.pdf-cancel-btn:hover {
    background: #7f8c8d;
}

/* Icons Library */
.icons-library-content {
    margin-top: 10px;
}

.icon-category-header {
    background: #34495e;
    color: white;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 3px;
    margin-bottom: 5px;
    font-size: 13px;
}

.icon-category-header:hover {
    background: #4a5f7f;
}

.icon-category-toggle {
    font-size: 10px;
}

.icon-category-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 5px;
    margin-bottom: 10px;
}

.icon-item {
    background: white;
    border: 2px solid #bdc3c7;
    border-radius: 3px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    transition: all 0.2s;
}

.icon-item:hover {
    border-color: #3498db;
    background: #e8f4f8;
    transform: scale(1.05);
}

.icon-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
