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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #3aaa35 0%, #2d8a2a 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.controls {
    padding: 30px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.control-group {
    margin-bottom: 25px;
}

.control-group h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.input-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.input-row label {
    flex: 1;
    font-weight: 500;
    color: #6c757d;
}

.input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-row input:focus {
    outline: none;
    border-color: #667eea;
}



#panel-type {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.custom-inputs {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.custom-inputs .input-row {
    margin-bottom: 10px;
}

.custom-inputs .input-row:last-child {
    margin-bottom: 0;
}

.custom-inputs label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

.custom-inputs input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    margin-bottom: 15px;
}

.btn:hover {
    background: #5a6fd8;
}

.drag-hint {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #1976d2;
    line-height: 1.4;
}

.share-hint {
    background: #f0f8f0;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 13px;
    color: #2d5a2d;
    line-height: 1.4;
}

.results {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.result-item .label {
    font-weight: 500;
    color: #6c757d;
}

.result-item span:last-child {
    font-weight: bold;
    color: #667eea;
}

.visualization {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.svg-container {
    flex: 1;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

#roof-svg {
    width: 100%;
    height: auto;
    max-height: 600px;
}

.legend {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.legend h4 {
    margin-bottom: 15px;
    color: #495057;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid #ccc;
}

.legend-color.panel-color {
    background: #6e6e6e;
}

.legend-color.obstacle-color {
    background: #007bff;
}

.legend-line {
    width: 20px;
    height: 2px;
    margin-right: 10px;
    border-top: 1px dashed #666;
}

.legend-line.margin-line {
    border-top: 1px dashed #666;
}

.obstacle-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
}

.obstacle-item .obstacle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.obstacle-item .obstacle-title {
    font-weight: 500;
    color: #495057;
}

.obstacle-item .remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.obstacle-item .remove-btn:hover {
    background: #c82333;
}

.obstacle-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.obstacle-inputs input {
    padding: 6px 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 12px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 300px 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .controls {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
}

/* Animace pro panely */
.panel {
    transition: opacity 0.3s ease;
}

.panel:hover {
    opacity: 0.8;
}

/* Styling pro SVG elementy */
.panel-rect {
    fill: #6e6e6e;
    stroke: #5a5a5a;
    stroke-width: 1;
}

.obstacle-rect {
    fill: #007bff;
    stroke: #0056b3;
    stroke-width: 1;
    transition: all 0.2s ease;
}

.obstacle-rect.draggable {
    cursor: move;
}

.obstacle-rect.draggable:hover {
    fill: #0069d9;
    stroke: #004085;
    stroke-width: 2;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.obstacle-rect.dragging {
    fill: #0069d9;
    stroke: #004085;
    stroke-width: 2;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
    opacity: 0.8;
}

.dimension-text {
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    fill: #495057;
}

.dimension-line {
    stroke: #6c757d;
    stroke-width: 1;
}

/* Resize handle styly */
.resize-handle {
    fill: #007bff;
    stroke: #0056b3;
    stroke-width: 2;
    cursor: nw-resize;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.resize-handle:hover {
    fill: #0069d9;
    stroke: #004085;
    opacity: 1;
    r: 8;
}

/* Drag and drop pomocné styly */
.svg-container {
    user-select: none;
}

body.dragging {
    cursor: grabbing !important;
} 