/* Bebop Puzzle Maker - Styles */

body {
    background-color: #f3f4f6;
    user-select: none;
    font-family: system-ui, -apple-system, sans-serif;
}

#canvas-container {
    aspect-ratio: 1 / 1;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    position: relative;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    touch-action: none;
    perspective: 1000px;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.control-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.handle {
    width: 18px;
    height: 18px;
    background: #2563eb;
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: move;
    z-index: 50;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.handle.active {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.3);
    transform: translate(-50%, -50%) scale(1.1);
}

.snap-marker {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

.tool-btn.active {
    border-color: #3b82f6;
    background-color: #eff6ff;
    box-shadow: 0 0 0 2px #dbeafe;
}

#marquee {
    position: absolute;
    border: 1px dashed #2563eb;
    background: rgba(37, 99, 235, 0.1);
    pointer-events: none;
    display: none;
    z-index: 40;
}

/* Flip Animations */
@keyframes flip-h {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(15deg); scale: 0.95; }
    100% { transform: rotateY(0deg); }
}

@keyframes flip-v {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(15deg); scale: 0.95; }
    100% { transform: rotateX(0deg); }
}

.animate-flip-h {
    animation: flip-h 0.4s ease-in-out;
}

.animate-flip-v {
    animation: flip-v 0.4s ease-in-out;
}

.library-item:hover .delete-item {
    opacity: 1;
}

/* Custom Scrollbar */
.custom-scroll::-webkit-scrollbar {
    width: 4px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

/* Interval Box Styling */
.interval-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.int-box {
    font-size: 13px;
    font-weight: 800;
    padding: 10px 4px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    color: #374151;
    background: white;
}

.int-box.selected {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    transform: scale(1.02);
}

.int-box:hover:not(.selected) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Color Picker Styling */
.color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #dbeafe;
}

/* Keyboard shortcut hints */
.shortcut-hint {
    font-size: 9px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
}
