:root {
    --bg-dark: #020617;
    --glass: rgba(15, 23, 42, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-dark);
    color: #f1f5f9;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.glass-panel {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    transform: translateZ(0);
    will-change: transform;
}

@media (min-width: 768px) {
    .glass-panel {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

@media (max-width: 640px) {
    .glass-panel {
        background: rgba(15, 23, 42, 0.98);
    }

    .j-line {
        padding-left: 35px !important;
    }

    .j-num-col {
        width: 25px !important;
    }
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 99px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-enter {
    animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.blink-text {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: 0.5
    }
}

.copy-btn {
    cursor: pointer;
    transition: 0.2s;
    opacity: 0.6;
}

.copy-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    color: #38bdf8;
}

.viewer-btn {
    @apply w-10 h-10 rounded-full bg-black/40 hover:bg-sky-500 hover:text-white text-white/80 backdrop-blur-md border border-white/10 flex items-center justify-center transition-all active:scale-95 shadow-lg;
}

.stat-box {
    @apply bg-white/5 rounded-2xl p-4 border border-white/5 flex flex-col justify-between hover:bg-white/10 transition active:scale-95;
}

.stat-row {
    @apply text-sm flex justify-between items-center py-0.5;
}

.stat-label {
    @apply text-slate-400;
}

.stat-val {
    @apply text-white font-medium truncate ml-2;
}

.code-viewer {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #d4d4d4;
}

.j-line {
    display: block;
    position: relative;
    padding-left: 45px;
}

.j-line:hover {
    background: rgba(255, 255, 255, 0.05);
}

.j-num-col {
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    text-align: right;
    color: #6e7681;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    opacity: 0.5;
    font-size: 11px;
    height: 100%;
}

.j-content {
    white-space: pre-wrap;
    word-break: break-all;
}

.j-key {
    color: #9cdcfe;
}

.j-str {
    color: #ce9178;
}

.j-num {
    color: #b5cea8;
}

.j-bool {
    color: #569cd6;
}

.j-null {
    color: #569cd6;
}

.j-punc {
    color: #d4d4d4;
}

.l-key-brak {
    color: #ffd700;
    opacity: 0.7;
}

.l-key-val {
    color: #9cdcfe;
}

.l-key-num {
    color: #b5cea8;
}

.j-toggle {
    cursor: pointer;
    display: inline-block;
    width: 14px;
    text-align: center;
    color: #c5c5c5;
    margin-right: 2px;
    transition: 0.2s;
    user-select: none;
}

.j-toggle:hover {
    color: #fff;
}

.j-toggle.collapsed {
    transform: rotate(-90deg);
}

.j-collapsed-content {
    display: none;
    color: #808080;
    cursor: pointer;
    font-style: italic;
    padding: 0 4px;
}

.j-line.collapsed .j-collapsed-content {
    display: inline;
}

.j-line.collapsed .j-open-brace {
    display: inline;
}

.gallery-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.gallery-item {
    scroll-snap-align: start;
    flex-shrink: 0;
}

#v-img {
    will-change: transform;
    transform-origin: center center;
}

/* Zoom Indicator */
#zoom-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 50;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#zoom-indicator.show {
    opacity: 1;
}