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

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

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

.tool-group {
    display: flex;
    gap: 10px;
}

.tool-btn {
    padding: 5px 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.tool-btn:hover {
    background-color: #f0f0f0;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-content {
    display: flex;
    flex: 1;
    position: relative;
}

.side-toolbar {
    width: 60px;
    background-color: #f8f8f8;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.tool-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tool-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.color-palette {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #ddd;
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#text-input-container {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #ccc;
    padding: 5px;
    pointer-events: auto;
    display: none;
}

.text-element {
    position: absolute;
    pointer-events: auto;
    padding: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
}

#image-tool {
    position: relative;
    overflow: hidden;
}

#bg-upload {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

#text-input-container {
    position: absolute;
    z-index: 2;
    background: white;
    padding: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.text-element {
    position: absolute;
    z-index: 1;
    pointer-events: auto;
    padding: 2px 5px;
}

.text-element:hover {
    outline: 1px dashed #00a2ff;
}