* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 75%;
}

body {
    background-color: #000;
    font-family: 'Courier New', monospace;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    /* Optional: scale everything for legacy browsers */
    /* transform: scale(0.75); transform-origin: top left; */
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    font-size: 1rem;
}

/* Central horizontal line */
.horizon-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #fff;
    z-index: 10;
}

/* Abstract background elements */
.abstract-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.colon {
    position: absolute;
    color: #333;
    font-size: 36px;
    font-weight: bold;
}

.dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #333;
    border-radius: 50%;
}

.circle {
    position: absolute;
    border: 2px solid #333;
    border-radius: 50%;
}

/* Content boxes anchored to the line */
.content-box {
    position: absolute;
    width: 90px;
    height: 90px;
    background-color: #222;
    border: 1px solid #444;
    z-index: 5;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.content-box:hover {
    border-color: #666;
    background-color: #333;
}

.content-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.2) brightness(0.9);
    border: none;
    font-size: 1rem;
}

.content-box.placeholder {
    background-color: #111;
    border: 2px dashed #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    text-align: center;
}

/* Boxes above the line - bottom edge touches the line */
.above-line {
    top: calc(50% - 122px); /* 120px box height + 2px line height */
}

/* Boxes below the line - top edge touches the line */
.below-line {
    top: calc(50% + 2px); /* Start right after the 2px line */
}

/* Text elements */
.text-element {
    position: absolute;
    color: #999;
    font-size: 10px;
    z-index: 5;
    transform: rotate(-5deg);
}

.title-text {
    position: absolute;
    color: #fff;
    font-size: 18px;
    z-index: 15;
    left: 50px;
    top: 45%;
    transform: translateY(-50%);
    letter-spacing: 3px;
}

/* Horizontal positioning for boxes */
.box-1 { left: 15%; }
.box-2 { left: 35%; }
.box-3 { left: 55%; }
.box-4 { left: 75%; }

/* Abstract element positioning */
.colon-1 { top: 20%; left: 25%; }
.colon-2 { bottom: 20%; right: 30%; }

.dot-1 { top: 25%; left: 60%; }
.dot-2 { top: 65%; left: 20%; }
.dot-3 { bottom: 30%; left: 70%; }

.circle-1 { 
    top: 30%; 
    right: 20%; 
    width: 30px; 
    height: 30px; 
}

.circle-2 { 
    bottom: 35%; 
    left: 40%; 
    width: 20px; 
    height: 20px; 
}

.text-1 { top: 70%; left: 10%; }
.text-2 { top: 25%; right: 10%; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-box {
        width: 60px;
        height: 60px;
    }
    .center-bg-image {
        width: 120px;
        max-width: 30vw;
    }
    .title-text {
        font-size: 12px;
    }
}

/* Tooltip styles */
.tooltip {
    position: fixed;
    pointer-events: none;
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    padding: 4px 10px;
    font-family: 'Dogica', monospace;
    font-size: 10px;
    letter-spacing: 0;
    /* Remove all smoothing/aliasing */
    font-smooth: auto;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    text-rendering: auto;
    z-index: 1000;
    border-radius: 2px;
}

.center-bg-image {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
    opacity: 1;
    width: 225px;
    max-width: 45vw;
    height: auto;
}

.center-bg-image.center-bg-image-front {
    z-index: 20;
    pointer-events: none;
}

.content-box.above-line {
    top: calc(50% - 90px); /* 90px box height */
}

.content-box.below-line {
    top: 50%;
}

.boxes-track {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(.4,1.6,.6,1);
    z-index: 5;
    pointer-events: none;
}

@font-face {
    font-family: 'Dogica';
    src: url('../font/dogica.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.bit-symbol {
    position: absolute;
    font-family: 'Dogica', monospace;
    font-size: 10px;
    color: #888;
    opacity: 0.35;
    pointer-events: none;
    z-index: 2;
    user-select: none;
}

.box-number {
    position: absolute;
    width: 13px;
    height: 13px;
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    font-family: 'Dogica', monospace;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    user-select: none;
    box-sizing: border-box;
}


.box-description {
    position: absolute;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-family: 'Dogica', monospace;
    font-size: 8px;
    padding: 3px 12px;
    border-radius: 3px;
    max-width: 220px;
    min-width: 120px;
    white-space: normal;
    word-break: break-word;
    pointer-events: none;
    z-index: 12;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.15s;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

.content-box:hover .box-description {
    opacity: 0.95;
}

/* === MOBILE LAYOUT === */
/* Hide mobile container by default (desktop) */
.mobile-container {
    display: none;
}

/* Mobile-only styles */
@media (max-width: 768px) {
    /* Hide desktop layout on mobile */
    .container {
        display: none !important;
    }
    
    /* Show and style mobile layout */
    .mobile-container {
        display: flex !important;
        flex-direction: column;
        width: 100vw;
        height: 100vh;
        background: #000;
        position: relative;
        overflow: hidden;
    }
      .mobile-horizon-vertical-full {
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: #fff;
        z-index: 5;
        transform: translateX(-50%);
    }
    
    .mobile-header {
        text-align: center;
        padding: 30px 20px;
        z-index: 15;
        position: relative;
    }
    
    .mobile-name-image {
        height: 50px;
        width: auto;
        max-width: 250px;
        opacity: 1;
    }
    
    .mobile-content {
        flex: 1;
        position: relative;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 20px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer 10+ */
    }
    
    .mobile-content::-webkit-scrollbar {
        display: none; /* WebKit */
    }
      .mobile-boxes-container {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding-bottom: 60px;
        z-index: 10; /* Above the line */
    }
    
    .mobile-content-box {
        position: relative !important;
        width: 70px;
        height: 70px;
        background-color: #222;
        border: 1px solid #444;
        transition: all 0.3s ease;
        cursor: pointer;
        touch-action: manipulation;
        left: auto !important;
        top: auto !important;
        z-index: 15; /* Above the line and container */
    }
    
    .mobile-content-box:active {
        transform: scale(0.95);
        border-color: #666;
        background-color: #333;
    }
    
    .mobile-content-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: contrast(1.2) brightness(0.9);
    }
    
    .mobile-content-box.placeholder {
        background-color: #111;
        border: 2px dashed #333;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666;
        font-size: 9px;
        text-align: center;
    }
    
    .mobile-box-number {
        position: absolute;
        width: 15px;
        height: 15px;
        background: #000;
        color: #fff;
        border: 1px solid #fff;
        font-family: 'Dogica', monospace;
        font-size: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        pointer-events: none;
        user-select: none;
        box-sizing: border-box;
        top: -7px;
        left: -7px;
    }
    
    .mobile-detail-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.9);
        z-index: 100;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .mobile-detail-content {
        background: #111;
        border: 1px solid #444;
        border-radius: 8px;
        padding: 25px;
        max-width: 90%;
        position: relative;
        text-align: center;
    }
    
    .mobile-detail-name {
        color: #fff;
        font-family: 'Dogica', monospace;
        font-size: 16px;
        margin-bottom: 15px;
        cursor: pointer;
        text-decoration: underline;
        text-decoration-color: #666;
        transition: color 0.3s;
    }
    
    .mobile-detail-name:hover {
        color: #ccc;
    }
    
    .mobile-detail-description {
        color: #aaa;
        font-family: 'Dogica', monospace;
        font-size: 11px;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    .mobile-detail-close {
        position: absolute;
        top: 15px;
        right: 15px;
        color: #666;
        font-size: 18px;
        cursor: pointer;
        width: 25px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.3s;
    }
    
    .mobile-detail-close:hover {
        color: #fff;
    }
    
    .mobile-bit-symbol {
        position: absolute;
        font-family: 'Dogica', monospace;
        font-size: 8px;
        color: #666;
        opacity: 0.4;
        pointer-events: none;
        user-select: none;
    }
    
    .mobile-touch-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0,0,0,0.8);
        padding: 10px;
        z-index: 20;
        text-align: center;
    }
    
    .mobile-scroll-indicator {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .mobile-scroll-text {
        color: #666;
        font-family: 'Dogica', monospace;
        font-size: 8px;
    }
    
    .mobile-scroll-arrow {
        color: #666;
        font-size: 12px;
        animation: bounce 2s infinite;
    }
    
    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-3px);
        }
        60% {
            transform: translateY(-2px);
        }
    }
}
