body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

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

.toolbar {
    width: 250px;
    min-width: 200px;
    max-width: 500px;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    overflow-y: auto;
    resize: horizontal;
    overflow: auto;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.controls {
    background-color: white;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.canvas-container {
    flex: 1;
    background-color: #fafafa;
    position: relative;
    overflow: hidden;
}

#canvas {
    border: 1px solid #ddd;
    cursor: crosshair;
    background-color: white;
}

.component-section {
    margin-bottom: 25px;
}

.component-section h3 {
    margin-bottom: 10px;
    color: #ecf0f1;
    font-size: 14px;
    text-transform: uppercase;
}

.component-item {
    background-color: #34495e;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.component-item:hover {
    background-color: #3498db;
}

.component-item.selected {
    background-color: #e74c3c;
}

.btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.file-input {
    display: none;
}

.inventory {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #455a64;
}

.inventory h3 {
    color: #ecf0f1;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.inventory-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
    color: #bdc3c7;
}

.mode-indicator {
    padding: 5px 10px;
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    border-radius: 3px;
}

.context-menu {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    min-width: 150px;
}

.context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background-color: #f5f5f5;
}

.context-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: none;
    min-width: 120px;
}

.has-submenu:after {
    content: '▶';
    float: right;
}

.landing-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.landing-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
}

.landing-content h1 {
    font-size: 48px;
    margin-bottom: 16px;
    font-weight: 300;
}

.landing-content p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.landing-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.btn-large {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-new {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.btn-load {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.btn-load:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
}

.btn-sample {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.btn-sample:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .landing-buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .landing-content {
        max-width: 400px;
        padding: 20px;
    }

    .landing-content h1 {
        font-size: 36px;
    }
}

.mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
}

.mode-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e74c3c;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #27ae60;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.size-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.size-control label {
    font-size: 12px;
    color: #666;
}

.size-slider {
    width: 100px;
}

.project-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.project-info label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.project-title-input {
    border: none;
    outline: none;
    font-size: 14px;
    min-width: 200px;
    background: transparent;
}

.project-title-input::placeholder {
    color: #bbb;
    font-style: italic;
}

/* Print styles */
@media print {
    body * {
        visibility: hidden;
    }

    .print-content, .print-content * {
        visibility: visible;
    }

    .print-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .print-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 2px solid #333;
        padding-bottom: 10px;
    }

    .print-title {
        font-size: 24px;
        font-weight: bold;
        color: #333;
    }

    .print-date {
        font-size: 14px;
        color: #666;
        margin-top: 4px;
    }

    .print-logo {
        max-height: 60px;
        max-width: 200px;
    }

    .print-floorplan {
        text-align: center;
        margin: 20px 0;
    }

    .print-floorplan img {
        max-width: 100%;
        max-height: 70vh;
        border: 1px solid #ddd;
    }

    .inventory-section {
        page-break-before: always;
    }

    .inventory-category {
        margin-bottom: 30px;
    }

    .inventory-category h3 {
        background-color: #f8f9fa;
        padding: 8px 12px;
        margin: 0 0 10px 0;
        border-left: 4px solid #3498db;
        font-size: 16px;
        text-transform: uppercase;
        color: #333;
    }

    .inventory-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    .inventory-table th,
    .inventory-table td {
        padding: 8px 12px;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }

    .inventory-table th {
        background-color: #f8f9fa;
        font-weight: bold;
    }

    .inventory-table tr:nth-child(even) {
        background-color: #f9f9f9;
    }
}
