/* Grid overlay styles - can be easily removed later */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.grid-line {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.3);
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
}

.grid-line.horizontal {
    height: 1px;
    width: 100%;
}

.grid-label {
    position: absolute;
    color: #ffff00;
    font-size: 12px;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 3px 6px;
    border-radius: 3px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.preview-popup {
    position: absolute;
    z-index: 50;
    background: rgba(12,12,12,0.95);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.6);
    display: none;
    max-width: 420px;
    max-height: 320px;
    overflow: auto; /* allow scrolling when image is zoomed */
    transform-origin: top center;
}

.preview-popup img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    background: #111;
    transition: transform 160ms ease;
    transform-origin: center top;
    cursor: zoom-in;
}

.preview-close {
    position: absolute;
    right: 6px;
    top: 6px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 0 6px;
    line-height: 18px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.license-badge {
    position: absolute;
    bottom: 12px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    z-index: 10001;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    transition: background 120ms ease, transform 120ms ease;
    z-index: 100000;
}

.license-badge:hover,
.license-badge:focus {
    background: rgba(255,255,255,0.06);
    transform: translateY(-2px);
    outline: none;
}