/* ========================================
   Design Tokens — Gjelsten Bolig Theme
   ======================================== */
:root {
    /* Color Palette — Warm neutral premium */
    --bg-primary: #EDEBE6;
    --bg-secondary: #E3E0D9;
    --bg-elevated: #ffffff;
    --bg-glass: rgba(237, 235, 230, 0.85);
    --bg-glass-hover: rgba(255, 255, 255, 0.95);
    --bg-dark: #1a1a18;

    /* Accent Colors */
    --accent-primary: #222222;
    --accent-primary-light: #575756;
    --accent-secondary: #8B7355;
    --accent-gradient: linear-gradient(135deg, #222222, #575756);
    --accent-glow: rgba(34, 34, 34, 0.15);

    /* Text Colors */
    --text-primary: #222222;
    --text-secondary: #575756;
    --text-tertiary: #8a8a80;
    --text-accent: #222222;
    --text-light: #ffffff;

    /* Borders */
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.12);
    --border-accent: rgba(34, 34, 34, 0.25);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 50px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-display: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

.hidden {
    display: none !important;
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    max-width: 320px;
}

.loading-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-lg);
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoSpin 3s linear infinite;
}

.logo-icon {
    font-size: 32px;
    color: white;
}

@keyframes logoSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: var(--space-xs);
}

.loading-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: var(--space-xl);
}

.loading-bar-container {
    width: 100%;
    height: 2px;
    background: var(--border-light);
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.loading-progress {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

/* ========================================
   App Layout
   ======================================== */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* ========================================
   Header
   ======================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    position: relative;
}

.header-left,
.header-right {
    flex: 1;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

.header-center {
    flex: 2;
    text-align: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.brand-icon {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.brand-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.brand-badge {
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    background: transparent;
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
}

.location-info {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.icon-pin {
    color: var(--text-secondary);
}

.separator {
    color: var(--text-tertiary);
}

.developer-tag {
    color: var(--text-primary);
    font-weight: 500;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-light);
    background: transparent;
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ========================================
   Viewer
   ======================================== */
.viewer-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}

.viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.viewer-container:active {
    cursor: grabbing;
}

#viewer-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ========================================
   Marker Overlay
   ======================================== */
.marker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.marker-circle {
    pointer-events: none;
    transition: fill-opacity 200ms ease, stroke-width 200ms ease, filter 200ms ease;
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.3));
}

.marker-circle.hovered {
    fill-opacity: 0.35 !important;
    stroke-width: 3.5 !important;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.4));
}

.marker-glow {
    pointer-events: none;
    animation: markerPulse 2.5s ease-in-out infinite;
}

.marker-glow.hovered {
    animation: none;
    opacity: 0.7 !important;
    stroke-width: 3 !important;
}

.marker-hitarea {
    pointer-events: all;
    cursor: pointer;
}

@keyframes markerPulse {
    0%, 100% { opacity: 0.3; transform-origin: center; }
    50% { opacity: 0.12; }
}

/* Marker Tooltip */
.marker-tooltip {
    position: absolute;
    z-index: 50;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    transition: opacity 150ms ease;
    min-width: 140px;
}

.marker-tooltip.hidden {
    opacity: 0;
    pointer-events: none;
}

.tooltip-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(0,0,0,0.08);
}

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

.tooltip-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tooltip-hex {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 0.03em;
}

/* Drag Hint */
.drag-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    z-index: 10;
    animation: hintFadeIn 0.5s ease;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.drag-hint.fade-out {
    opacity: 0;
}

.drag-hint-content {
    text-align: center;
    color: white;
    animation: hintPulse 2s ease-in-out infinite;
}

.drag-hint-content svg {
    margin-bottom: var(--space-sm);
    opacity: 0.8;
}

.drag-hint-content p {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.9;
}

@keyframes hintFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hintPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
}

/* ========================================
   Rotation Indicator / Compass
   ======================================== */
.rotation-indicator {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    z-index: 20;
}

.compass {
    width: 64px;
    height: 64px;
    position: relative;
}

.compass-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(237, 235, 230, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    box-shadow: var(--shadow-md);
}

.compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 24px;
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(0deg);
    transition: transform 0.15s ease-out;
}

.compass-needle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 10px solid var(--accent-primary);
}

.compass-needle::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.compass-label {
    position: absolute;
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

.compass-n { top: 4px; left: 50%; transform: translateX(-50%); color: var(--accent-primary); }
.compass-e { right: 6px; top: 50%; transform: translateY(-50%); }
.compass-s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.compass-w { left: 6px; top: 50%; transform: translateY(-50%); }

.angle-display {
    display: flex;
    align-items: baseline;
    gap: 1px;
    background: rgba(237, 235, 230, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-sm);
}

.angle-value {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    min-width: 2.5ch;
    text-align: right;
    color: var(--text-primary);
}

.angle-unit {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* ========================================
   Controls Panel
   ======================================== */
.controls-panel {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    z-index: 100;
}

/* Timeline */
.timeline-container {
    padding: 0 var(--space-sm);
    margin-bottom: var(--space-md);
}

.timeline {
    position: relative;
    padding: var(--space-sm) 0;
    cursor: pointer;
}

.timeline-track {
    height: 2px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    position: relative;
    overflow: visible;
}

.timeline-progress {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    position: relative;
    transition: width 0.1s ease;
}

.timeline-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--bg-primary);
    transition: left 0.1s ease, transform 0.15s ease;
    z-index: 2;
}

.timeline-thumb:hover,
.timeline.dragging .timeline-thumb {
    transform: translate(-50%, -50%) scale(1.4);
}

.timeline-ticks {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xs);
    padding: 0 1px;
}

.timeline-tick {
    width: 1px;
    height: 4px;
    background: var(--border-light);
    border-radius: 1px;
}

.timeline-tick.major {
    height: 8px;
    background: var(--text-tertiary);
}

/* Control Buttons */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls-left,
.controls-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.controls-right {
    justify-content: flex-end;
}

.controls-center {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-control {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    transition: all var(--transition-fast);
}

.btn-control:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-control.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-label {
    font-size: 0.75rem;
}

.btn-play {
    width: 48px;
    height: 48px;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-play:hover {
    transform: scale(1.05);
    background: var(--accent-primary-light);
    border-color: var(--accent-primary-light);
}

.btn-play:active {
    transform: scale(0.95);
}

.btn-play .play-icon {
    margin-left: 2px;
}

/* Speed Control */
.speed-control {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: transparent;
    border-radius: var(--radius-xl);
    padding: 2px;
    border: 1px solid var(--border-light);
    margin-left: var(--space-sm);
}

.btn-speed {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-speed:hover {
    background: var(--accent-primary);
    color: white;
}

.speed-value {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 2.5ch;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Frame Counter */
.frame-counter {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    background: transparent;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    letter-spacing: 0.02em;
}

.frame-sep {
    color: var(--text-tertiary);
    margin: 0 2px;
}

#frame-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================================
   Fullscreen Mode
   ======================================== */
body.fullscreen-mode .header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(237, 235, 230, 0.9), transparent);
    border-bottom: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

body.fullscreen-mode .controls-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(237, 235, 230, 0.9), transparent);
    border-top: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

body.fullscreen-mode:hover .header,
body.fullscreen-mode:hover .controls-panel {
    opacity: 1;
}

body.fullscreen-mode .viewer-wrapper {
    position: fixed;
    inset: 0;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .header {
        padding: var(--space-sm) var(--space-md);
    }

    .header-center {
        display: none;
    }

    .brand-title {
        font-size: 1rem;
    }

    .rotation-indicator {
        top: var(--space-md);
        right: var(--space-md);
    }

    .compass {
        width: 52px;
        height: 52px;
    }

    .compass-needle {
        height: 20px;
    }

    .controls-panel {
        padding: var(--space-sm) var(--space-md) var(--space-md);
    }

    .btn-play {
        width: 40px;
        height: 40px;
    }

    .speed-control {
        display: none;
    }

    .btn-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .controls-left .btn-control {
        padding: var(--space-xs) var(--space-sm);
    }

    .frame-counter {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
    }
}

/* ========================================
   Placeholder / No Images State
   ======================================== */
.placeholder-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    color: var(--text-secondary);
    z-index: 5;
}

.placeholder-state svg {
    opacity: 0.3;
}

.placeholder-state p {
    font-size: 0.9rem;
    max-width: 320px;
    text-align: center;
    line-height: 1.6;
}

.placeholder-state code {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-primary);
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========================================
   Admin Panel (Shift+A)
   ======================================== */
.admin-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: rgba(237, 235, 230, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-light);
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform: translateX(0);
    opacity: 1;
}

.admin-panel.hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
}

.admin-header h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.admin-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-light);
    background: transparent;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    line-height: 1;
}

.admin-close:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.admin-hint {
    padding: 12px 24px;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
    line-height: 1.5;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.admin-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}

.admin-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.admin-item:last-child {
    border-bottom: none;
}

.admin-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(0,0,0,0.06);
}

.admin-label-input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border-light);
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 6px 14px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.admin-label-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(34, 34, 34, 0.08);
}

.admin-label-input::placeholder {
    color: var(--text-tertiary);
    font-size: 0.72rem;
}

.admin-hex {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    font-family: 'SF Mono', 'Consolas', monospace;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

/* ========================================
   Punkt Image Popup
   ======================================== */
.punkt-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #000000;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.punkt-popup-overlay.hidden {
    display: none;
}

.punkt-popup-overlay.visible {
    opacity: 1;
}

.punkt-popup {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.punkt-popup-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 20;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    line-height: 1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
}

.punkt-popup-overlay.visible .punkt-popup-close {
    opacity: 1;
    transition-delay: 0.3s;
}

.punkt-popup-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

.punkt-popup-image-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #0a0a08;
}

.punkt-popup-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1.04);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.punkt-popup-overlay.visible .punkt-popup-img {
    transform: scale(1);
}

/* Info Panel — right-side frosted glass card */
.punkt-info-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 28px;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 80%, transparent 100%);
    transform: translateX(40px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    pointer-events: none;
}

.punkt-popup-overlay.visible .punkt-info-panel {
    transform: translateX(0);
    opacity: 1;
    transition-delay: 0.2s;
    pointer-events: auto;
}

.punkt-info-panel-inner {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.punkt-info-logo {
    margin-bottom: 4px;
}

.punkt-logo-img {
    height: 22px;
    width: auto;
    opacity: 0.85;
    filter: brightness(10);
}

.punkt-info-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

.punkt-info-subtitle {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.punkt-info-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 14px;
}

.punkt-info-body {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.65;
    margin-bottom: 16px;
}

.punkt-info-features {
    list-style: none;
    padding: 0;
    margin: 0 0 4px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.punkt-info-features li {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

.punkt-info-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    font-weight: 600;
}

.punkt-info-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    align-self: flex-start;
}

.punkt-info-cta:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(2px);
}

.punkt-info-cta svg {
    transition: transform 0.25s ease;
}

.punkt-info-cta:hover svg {
    transform: translateX(3px);
}

/* Close button positioning — top right above panel */
.punkt-popup-close {
    right: 394px;
}

@media (max-width: 900px) {
    .punkt-info-panel {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 55vh;
        padding: 24px 20px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 80%, transparent 100%);
        transform: translateY(30px);
    }

    .punkt-popup-overlay.visible .punkt-info-panel {
        transform: translateY(0);
    }

    .punkt-popup-close {
        right: 24px;
        top: 16px;
    }
}

@media (max-width: 600px) {
    .punkt-popup-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .punkt-info-panel-inner {
        padding: 20px 18px;
    }

    .punkt-info-title {
        font-size: 1.2rem;
    }

    .punkt-info-body {
        font-size: 0.78rem;
    }
}
