body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    line-height: 1.6;
}

.container {
    width: 98%;
    max-width: 1500px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

header {
    background-color: #4a5568; /* Tailwind-like gray */
    color: #fff;
    padding: 15px 25px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 1.6em;
    font-weight: 500;
}

main {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.controls-panel {
    width: 300px;
    padding: 20px;
    background-color: #f7fafc; /* Lighter gray */
    border-right: 1px solid #e2e8f0; /* Light border */
    overflow-y: auto;
    max-height: calc(100vh - 120px); /* Adjust based on header/footer */
}

.canvas-container {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #e9eef2; /* Slightly darker background for canvas area */
}

#logoCanvas {
    border: 1px solid #cbd5e0; /* Mid-tone border */
    background-color: #fff; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: default; /* Default cursor, changes on draggable elements */
}

.layers-panel {
    width: 240px;
    padding: 20px;
    background-color: #f7fafc;
    border-left: 1px solid #e2e8f0;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.layers-panel h2, .controls-panel h2 {
    margin-top: 0;
    font-size: 1.2em;
    color: #2d3748; /* Darker gray for headings */
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

#layerList {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#layerList li {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s;
    word-break: break-all;
}
#layerList li:hover {
    background-color: #edf2f7; /* Light hover */
}
#layerList li.selected {
    background-color: #bee3f8; /* Blueish selection */
    color: #2c5282; /* Darker blue text */
    font-weight: 500;
}

.tool-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}
.tool-section:last-child {
    border-bottom: none;
}

.control-group {
    margin-bottom: 20px;
}
.control-group h4, .control-group h5 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #4a5568;
    font-size: 1em;
    font-weight: 600;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85em;
    color: #4a5568;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9em;
    background-color: #fff;
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: #4299e1; /* Blue focus */
    box-shadow: 0 0 0 1px #4299e1;
    outline: none;
}

input[type="color"] {
    width: 100%;
    height: 35px;
    padding: 0;
    margin-bottom: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="range"] {
    width: calc(100% - 60px); /* Space for value display */
    margin-bottom: 2px;
    vertical-align: middle;
}
.control-group span { /* For range value display */
    display: inline-block;
    width: 40px;
    text-align: right;
    font-size: 0.85em;
    color: #718096; /* Mid-gray */
    vertical-align: middle;
}


button {
    background-color: #4299e1; /* Blue */
    color: white;
    padding: 9px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: background-color 0.2s;
    font-weight: 500;
}
button:hover {
    background-color: #2b6cb0; /* Darker blue */
}
button:active {
    background-color: #2c5282; /* Even darker blue */
}

#deleteShapeButton {
    background-color: #e53e3e; /* Red */
}
#deleteShapeButton:hover {
    background-color: #c53030; /* Darker red */
}

#clearCanvasButton, #updateCanvasSizeButton {
    background-color: #ecc94b; /* Yellow */
    color: #2d3748;
}
#clearCanvasButton:hover, #updateCanvasSizeButton:hover {
    background-color: #d69e2e; /* Darker yellow */
}

footer {
    text-align: center;
    padding: 15px;
    background-color: #4a5568;
    color: #a0aec0; /* Lighter gray for footer text */
    font-size: 0.8em;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .controls-panel { width: 250px; }
    .layers-panel { width: 200px; }
}

@media (max-width: 992px) {
    main {
        flex-direction: column;
    }
    .controls-panel, .layers-panel {
        width: 100%;
        max-height: 300px; /* Limit height when stacked */
        border-right: none;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .canvas-container {
        order: -1; /* Canvas moves to the top visually */
        min-height: 300px; /* Ensure canvas area has some height */
    }
    input[type="range"] { width: calc(100% - 70px); }
}
@media (max-width: 768px) {
    header h1 { font-size: 1.4em; }
    .controls-panel, .layers-panel { max-height: 250px; }
}