/* ─── Glowkeys Keyring Builder v1.4 — Accurate 3D Preview ──────────────────── */

.gk-builder-wrap {
    font-family: inherit;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 0;
}

/* ─── Two-column layout ──────────────────────────────────────────────────── */

.gk-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* ─── Preview panel ──────────────────────────────────────────────────────── */

.gk-preview-panel {
    flex: 1 1 300px;
    min-width: 280px;
}

.gk-preview-container {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
    max-width: 100%;
}

/* ─── 3D Canvas container ────────────────────────────────────────────────── */

#gk-canvas-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #1a1a1e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    border-radius: 14px;
}

#gk-canvas-container:active {
    cursor: grabbing;
}

#gk-canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border-radius: 14px;
}

/* ─── Loading message ────────────────────────────────────────────────────── */

.gk-3d-loading {
    color: #666;
    font-size: 0.88em;
    letter-spacing: 0.04em;
    animation: gk-pulse 1.5s ease-in-out infinite;
}

@keyframes gk-pulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* ─── Interaction hint ───────────────────────────────────────────────────── */

.gk-interact-hint {
    text-align: center;
    font-size: 0.72em;
    color: #888;
    margin: 8px 0 0;
    letter-spacing: 0.03em;
}

/* ─── Carousel navigation arrows ─────────────────────────────────────────── */

.gk-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
    padding: 0;
}

.gk-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gk-nav-prev { left: 10px; }
.gk-nav-next { right: 10px; }

/* ─── Dot indicators ─────────────────────────────────────────────────────── */

.gk-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.gk-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s, border-color 0.15s, opacity 0.15s;
    opacity: 0.55;
    flex-shrink: 0;
}

.gk-dot:hover {
    opacity: 0.85;
    transform: scale(1.2);
}

.gk-dot.active {
    opacity: 1;
    transform: scale(1.3);
    border-color: #fff;
}

/* ─── Colour label under dots ────────────────────────────────────────────── */

.gk-slide-label {
    text-align: center;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 10px 0 0;
    transition: color 0.3s, text-shadow 0.3s;
}

/* ─── Controls panel ─────────────────────────────────────────────────────── */

.gk-controls-panel {
    flex: 1 1 260px;
    min-width: 240px;
}

.gk-heading {
    margin: 0 0 24px;
    font-size: 1.35em;
    font-weight: 700;
    color: #111;
}

/* ─── Field groups ───────────────────────────────────────────────────────── */

.gk-field-group {
    margin-bottom: 28px;
}

.gk-field-group > label {
    display: block;
    font-weight: 600;
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #333;
    margin-bottom: 10px;
}

.gk-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #888;
    font-size: 0.9em;
}

/* ─── Text inputs ────────────────────────────────────────────────────────── */

.gk-text-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    color: #111;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.gk-text-input:focus {
    border-color: #555;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
    outline: none;
}

.gk-text-input::placeholder {
    color: #bbb;
}

/* ─── Font picker ────────────────────────────────────────────────────────── */

.gk-font-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gk-font-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    background: #f7f7f7;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.15em;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    line-height: 1.2;
    color: #111;
}

.gk-font-btn:hover {
    background: #efefef;
    border-color: #bbb;
}

.gk-font-btn.active {
    background: #111;
    border-color: #111;
    color: #fff;
    transform: translateX(4px);
}

/* Preview each button label in its own font */
.gk-font-btn[data-font="VT323"]          { font-family: 'VT323', monospace;          font-size: 1.35em; }
.gk-font-btn[data-font="Orbitron"]       { font-family: 'Orbitron', sans-serif;       font-size: 0.88em; font-weight: 700; }
.gk-font-btn[data-font="Audiowide"]      { font-family: 'Audiowide', sans-serif;      font-size: 0.92em; }
.gk-font-btn[data-font="Rajdhani"]       { font-family: 'Rajdhani', sans-serif;       font-size: 1.1em;  font-weight: 700; }
.gk-font-btn[data-font="Share Tech Mono"]{ font-family: 'Share Tech Mono', monospace; font-size: 0.95em; }

/* ─── Summary ────────────────────────────────────────────────────────────── */

.gk-summary {
    display: none;
    background: #f4f4f4;
    border-left: 3px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.88em;
    color: #333;
    line-height: 1.5;
    margin-top: 4px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .gk-layout {
        flex-direction: column;
        gap: 28px;
    }

    .gk-preview-panel,
    .gk-controls-panel {
        width: 100%;
        min-width: unset;
    }

    .gk-nav {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    #gk-canvas-container {
        aspect-ratio: 4 / 3;
    }
}
