/* GravurePressGallery – Frontend Styles */

/* ── Wrapper ───────────────────────────────────────────────────────────── */
.gpg-wrapper {
    position: relative;
    width: 100%;
    font-family: 'Courier New', Courier, monospace;
    background: #1a1008;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,.8);
}

.gpg-scene-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    max-height: 60vh;
    overflow: hidden;
    cursor: grab;
}

.gpg-scene-wrapper:active { cursor: grabbing; }

.gpg-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #2a1505 0%, #0d0603 100%);
}

/* ── Loader ────────────────────────────────────────────────────────────── */
.gpg-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #1e0e04 0%, #080401 100%);
    z-index: 50;
    transition: opacity .5s;
}

.gpg-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.gpg-loader-cylinder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #b87333 0%,   /* copper */
        #cd7f32 25%,
        #8b5e3c 50%,
        #cd7f32 75%,
        #b87333 100%
    );
    box-shadow: 0 0 20px rgba(184,115,51,.5);
    animation: gpg-spin 1.5s linear infinite;
}

@keyframes gpg-spin {
    to { transform: rotate(360deg); }
}

.gpg-loader p {
    color: #cd7f32;
    margin-top: 16px;
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* ── HUD ───────────────────────────────────────────────────────────────── */
.gpg-hud {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 10;
}

.gpg-hud-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gpg-hud-label {
    font-size: 9px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(205,127,50,.6);
}

.gpg-hud-material {
    font-size: 13px;
    color: #cd7f32;
    text-shadow: 0 0 8px rgba(205,127,50,.8);
}

.gpg-hud-controls {
    display: flex;
    gap: 6px;
    pointer-events: all;
}

.gpg-hud-controls button {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(205,127,50,.4);
    background: rgba(10,5,2,.7);
    color: #cd7f32;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.gpg-hud-controls button:hover {
    background: rgba(205,127,50,.15);
    border-color: rgba(205,127,50,.8);
}

.gpg-hud-controls button.active {
    background: rgba(205,127,50,.25);
    border-color: #cd7f32;
    box-shadow: 0 0 8px rgba(205,127,50,.4);
}

/* ── Rakel Indicator ───────────────────────────────────────────────────── */
.gpg-blade-indicator {
    position: absolute;
    bottom: 40px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.gpg-blade-bar {
    width: 80px;
    height: 6px;
    background: rgba(255,255,255,.1);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(205,127,50,.3);
}

.gpg-blade-fill {
    height: 100%;
    width: 60%;
    background: linear-gradient(90deg, #cd7f32, #ffd700);
    border-radius: 3px;
    transition: width .3s;
}

.gpg-blade-label {
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(205,127,50,.6);
}

/* ── Seriennummer ──────────────────────────────────────────────────────── */
.gpg-serial {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 10;
}

.gpg-serial-code {
    font-size: 9px;
    letter-spacing: .2em;
    color: rgba(205,127,50,.4);
    font-family: 'Courier New', monospace;
}

/* ── Lightbox ──────────────────────────────────────────────────────────── */
.gpg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpg-lightbox[hidden] { display: none; }

.gpg-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(42,26,48,.94);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.gpg-lightbox-container {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: gpg-lb-in .3s cubic-bezier(.2,.8,.3,1);
}

@keyframes gpg-lb-in {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

.gpg-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(42,26,48,.8);
    border: 1px solid rgba(205,127,50,.4);
    color: #cd7f32;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.gpg-lightbox-close:hover { background: rgba(205,127,50,.2); }

.gpg-lightbox-image-wrap {
    position: relative;
    border: 1px solid rgba(205,127,50,.3);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(205,127,50,.15),
        0 20px 60px rgba(0,0,0,.8),
        inset 0 0 80px rgba(42,26,48,.3);
}

.gpg-lightbox-img {
    display: block;
    max-width: 80vw;
    max-height: 65vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Schimmer-Effekt */
.gpg-lightbox-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(205,127,50,.08) 50%,
        transparent 60%
    );
    background-size: 200% 200%;
    animation: gpg-sheen 3s linear infinite;
    pointer-events: none;
}

@keyframes gpg-sheen {
    0%   { background-position: -100% -100%; }
    100% { background-position: 200% 200%; }
}

/* Metadaten */
.gpg-lightbox-meta {
    background: rgba(10,5,2,.8);
    border: 1px solid rgba(205,127,50,.2);
    border-radius: 4px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}

.gpg-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.gpg-meta-key {
    color: rgba(205,127,50,.6);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gpg-meta-row span:last-child {
    color: #e8c57a;
    font-weight: bold;
}

/* Navigation */
.gpg-lightbox-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.gpg-lightbox-nav button {
    flex: 1;
    padding: 10px 16px;
    background: rgba(10,5,2,.8);
    border: 1px solid rgba(205,127,50,.4);
    color: #cd7f32;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: .08em;
    cursor: pointer;
    border-radius: 3px;
    transition: background .2s, border-color .2s, box-shadow .2s;
}

.gpg-lightbox-nav button:hover {
    background: rgba(205,127,50,.15);
    border-color: #cd7f32;
    box-shadow: 0 0 12px rgba(205,127,50,.3);
}

/* ── Micro-View Overlay ────────────────────────────────────────────────── */
.gpg-micro-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
}

.gpg-micro-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.gpg-micro-grid {
    display: grid;
    gap: 2px;
    padding: 20px;
}

.gpg-micro-cell {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    background: radial-gradient(ellipse at 40% 35%, #3a2a10, #1a0e04);
    border: 1px solid rgba(205,127,50,.2);
    transition: transform .2s, box-shadow .2s;
}

.gpg-micro-cell:hover {
    transform: scale(1.4);
    box-shadow: 0 0 8px rgba(205,127,50,.6);
    z-index: 1;
}

.gpg-micro-cell.filled {
    background: radial-gradient(ellipse at 40% 35%, #8b4513, #2a1a30);
    box-shadow: inset 0 2px 4px rgba(0,0,0,.6);
}

/* ── Tooltip ───────────────────────────────────────────────────────────── */
.gpg-tooltip {
    position: absolute;
    background: rgba(10,5,2,.9);
    border: 1px solid rgba(205,127,50,.5);
    color: #cd7f32;
    font-size: 10px;
    letter-spacing: .08em;
    padding: 4px 8px;
    border-radius: 3px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 30;
    opacity: 0;
    transition: opacity .2s;
}

.gpg-tooltip.visible { opacity: 1; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .gpg-scene-wrapper {
        height: 320px;
        max-height: 55vw;
    }

    .gpg-hud-controls button {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .gpg-lightbox-img {
        max-width: 95vw;
        max-height: 55vh;
    }

    .gpg-lightbox-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gpg-scene-wrapper { height: 260px; }
    .gpg-blade-indicator { display: none; }
}
