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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.controls {
    width: 300px;
    min-width: 300px;
    background-color: #fff;
    padding: 20px;
    border-right: 2px solid #ddd;
    overflow-y: auto;
    flex-shrink: 0;
}

.controls h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.controls h3 {
    color: #34495e;
    margin: 15px 0 8px 0;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.input-group input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 8px;
    width: 100%;
}

button:hover {
    background-color: #2980b9;
}

button:active {
    background-color: #21618c;
}

#deleteObject {
    background-color: #e74c3c;
}

#deleteObject:hover {
    background-color: #c0392b;
}

.object-controls {
    margin-top: 15px;
}


.room-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

.room-canvas {
    background-color: #34495e;
    border: 3px solid #2c3e50;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.room-dimensions {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    z-index: 100;
}

.room-grid {
    position: relative;
    background-image: 
        linear-gradient(to right, #5d6d7e 1px, transparent 1px),
        linear-gradient(to bottom, #5d6d7e 1px, transparent 1px);
    background-size: 20px 20px;
}

.room-object {
    position: absolute;
    border: 2px solid #2c3e50;
    border-radius: 4px;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    user-select: none;
    transition: transform 0.1s ease;
    min-width: 20px;
    min-height: 20px;
}

.object-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    user-select: none;
    pointer-events: none;
}

.room-object:hover {
    transform: scale(1.02);
    z-index: 10;
}

.room-object.selected {
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.selected-object {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

.rotate-controls {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.rotate-controls button {
    flex: 1;
    padding: 6px 10px;
    font-size: 12px;
}

.drag-over {
    background-color: rgba(52, 152, 219, 0.1) !important;
    border-color: #3498db !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .controls {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .room-container {
        height: 60vh;
    }
}
