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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: white;
    color: #333;
}

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

.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.header-text {
    flex: 1;
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 2px;
    font-weight: 600;
}

.subtitle {
    font-size: 10px;
    color: #888;
    margin: 0;
    line-height: 1.3;
}

.upload-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#fileInput {
    display: none;
}

.upload-button {
    display: block;
    padding: 10px 15px;
    background: #333;
    color: white;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    border: none;
}

.upload-button:hover {
    background: #555;
}

.secondary-button {
    display: block;
    padding: 10px 15px;
    background: white;
    color: #666;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #666;
}

.current-size {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: -4px;
    margin-bottom: 4px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 1px 0;
}

.toggle-label input[type="checkbox"] {
    cursor: pointer;
    accent-color: #666;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 12px;
    color: #999;
    cursor: help;
    margin-left: 4px;
}

.preset-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

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

.preset-select {
    padding: 8px;
    border: 1px solid #666;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    background: white;
    cursor: pointer;
}

.text-link {
    font-size: 11px;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
}

.credit {
    font-size: 13px;
    color: #555;
    margin: 0 0 20px 0;
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 6px;
}

.credit a {
    color: #0066cc;
    text-decoration: underline;
}

.credit a:hover {
    color: #004499;
}

.copyright {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: auto;
    padding-top: 15px;
}

.block-buttons {
    display: flex;
    gap: 8px;
}

.block-button {
    flex: 1;
    padding: 6px 10px;
    background: white;
    border: 1px solid #666;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.poster-block {
    position: absolute;
    border: 2px dashed #999;
    background: rgba(200, 200, 200, 0.1);
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
}

.poster-block.selected {
    outline: 2px solid #333;
    outline-offset: 0px;
}

.wall-guide {
    position: absolute;
    border: 2px dashed #ccc;
    pointer-events: none;
    box-sizing: border-box;
}

.wall-guide-label {
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 11px;
    color: #999;
}

.image-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-item {
    padding: 12px;
    border: 1px solid #ddd;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.image-item:hover {
    background: #f5f5f5;
}

.image-item-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #ddd;
}

.image-item-info {
    flex: 1;
    min-width: 0;
}

.image-item-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    word-break: break-word;
}

.image-item-dimensions {
    font-size: 11px;
    color: #666;
}

.main-area {
    flex: 1;
    position: relative;
    background: white;
    overflow: auto;
}

.placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    text-align: center;
}

.placed-image {
    position: absolute;
    border: 1px solid #ddd;
    cursor: move;
    background: white;
}

.placed-image.selected {
    outline: 2px solid #333;
    outline-offset: 0px;
}

.placed-image.over-max {
    outline: 2px solid rgba(200, 100, 100, 0.6);
    outline-offset: 0px;
}

.placed-image.selected.over-max {
    outline: 2px solid #333;
}

.large-marker {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: rgba(100, 100, 100, 0.7);
    color: white;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    pointer-events: none;
}

.selection-rect {
    position: absolute;
    border: 1px dashed #333;
    background: rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.placed-image img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.image-info {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: white;
    padding: 6px 8px;
    font-size: 11px;
    color: #666;
    border: 1px solid #ddd;
    border-top: none;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.image-info-text {
    flex: 1;
}

.max-button {
    padding: 4px 8px;
    background: white;
    border: 1px solid #666;
    border-radius: 2px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    margin-left: 8px;
}

.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #333;
    border: 1px solid white;
    cursor: nwse-resize;
}

.resize-handle.bottom-right {
    bottom: -6px;
    right: -6px;
}

.resize-handle.bottom-left {
    bottom: -6px;
    left: -6px;
    cursor: nesw-resize;
}

.resize-handle.top-right {
    top: -6px;
    right: -6px;
    cursor: nesw-resize;
}

.resize-handle.top-left {
    top: -6px;
    left: -6px;
    cursor: nwse-resize;
}

