/* ================================
   FONT IMPORTS
   ================================ */
   @font-face {
    font-family: "BureauGrotesque";
    src: url("../assets/fonts/BureauGrotesque/BureauGrotesque.eot");
    src: url("../assets/fonts/BureauGrotesque/BureauGrotesque.eot?#iefix") format("embedded-opentype"),
    url("../assets/fonts/BureauGrotesque/BureauGrotesque.woff2") format("woff2"),
    url("../assets/fonts/BureauGrotesque/BureauGrotesque.woff") format("woff"),
    url("../assets/fonts/BureauGrotesque/BureauGrotesque.ttf") format("truetype"),
    url("../assets/fonts/BureauGrotesque/BureauGrotesque.svg#BureauGrotesque") format("svg");
}

/* ================================
   GLOBAL RESET & BASE STYLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    /* Mobile optimizations */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Explorer pages - no scroll */
body:not(.homepage) {
    overflow: hidden;
}

/* ================================
   CONTAINER LAYOUTS
   ================================ */
#container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Homepage container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 120px;
}

/* ================================
   NAVIGATION
   ================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 23000;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Explorer pages navbar positioning */
#container .navbar {
    position: absolute;
    z-index: 33000;
}

.nav-brand {
    font-size: 1.5rem;
    color: #ffffff;
}

.nav-brand a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s;
    font-family: "BureauGrotesque", sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.05rem;
    font-weight: 500;
    z-index: 40000;
    position: relative;
}

.nav-brand a:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
}

.nav-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 8px 10px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-weight: 200;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: 0.2s;
    border-radius: 1px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-4px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-4px, -5px);
}

/* ================================
   3D SCENE
   ================================ */
#scene {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* ================================
   UI OVERLAY & COMPONENTS
   ================================ */
#ui {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
    pointer-events: none;
    z-index: 1500;
}

/* Headers */
.header {
    align-items: center;
    gap: 20px;
    pointer-events: auto;
    padding: 20px 20px;
}

.header h1 {
    font-size: 2rem;
    font-weight: 500;
    color: #ffffff;
    font-family: "BureauGrotesque", sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.05rem;
}

.header .subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: #cccccc;
    font-family: "Inter", sans-serif;
    margin-top: 4px;
    word-break: break-all;
}

/* Homepage header */
.container .header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.container .header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.container .header p {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Status Indicator */
.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #cccccc;
}

.dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ================================
   SIDEBAR & PANELS
   ================================ */
.sidebar {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    pointer-events: auto;
}

.panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 20px;
    margin-bottom: 20px;
    z-index: 2000;
    position: relative;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.panel-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 2px;
}

.panel-toggle:hover {
    color: #cccccc;
    background: rgba(255, 255, 255, 0.1);
}

.panel-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.panel-content.minimized {
    max-height: 0;
    opacity: 0;
}

.panel div {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #cccccc;
}

.panel span {
    color: #ffffff;
    font-weight: 500;
}

/* ================================
   BUTTONS & CONTROLS
   ================================ */
button {
    background: rgb(0 0 0 / 11%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

button:active {
    transform: translateY(1px);
}

.controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

/* Filter Controls */
.filter-controls {
    position: absolute;
    bottom: 80px;
    left: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 20;
    max-width: 300px;
}

.filter-controls h4 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-controls button {
    display: inline-block;
    width: auto;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    padding: 6px 10px;
    background: #333333;
    border-radius: 4px;
}

.filter-controls button:hover {
    background: #444444;
    border-color: rgba(255, 255, 255, 0.4);
}

.filter-controls button:active {
    background: #555555;
}

/* ================================
   HOMEPAGE SECTIONS
   ================================ */
.sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.section-card {
    background: #000000;
    border: 1px solid #111111;
    border-radius: 3px;
    padding: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
    display: block;
    position: relative;
}

.card-3d {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.section-card:hover {
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255 , 255, 255, 0.2);
}

.section-card h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-family: "BureauGrotesque", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.01rem;
}

.section-card p {
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: 0.05rem;
    line-height: 1.5;
    font-weight: 200;
}

.section-card .features {
    list-style: none;
    color: #fff;
    font-size: 0.9rem;

}

.section-card .features li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    color: #a4a4a4;
}

.section-card .features li:before {
    content: "•";
    color: #fff;
    position: absolute;
    left: 0;
}

/* About & Data Sources */
.about, .data-sources {

    border-radius: 8px;
    padding: 2rem 0;
    
    max-width: 600px;
    
}

.about {
    margin-bottom: 3rem;
}

.about h2, .data-sources h2 {
    color: #fff;
    margin-bottom: 1rem;
    font-family: "BureauGrotesque", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.01rem;
}

.about p {
    color: #fff;
    margin-bottom: 1rem;
}

.about a, .data-sources a {
    color: #fff;
    text-decoration: none;
}

.about a:hover, .data-sources a:hover {
    text-decoration: underline;
}

.data-sources ul {
    list-style: none;
    color: #fff;
}

.data-sources li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    color: #fff;
}

.data-sources li:before {
    content: "→";
    color: #fff;
    position: absolute;
    left: 0;
}

.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #fff;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ================================
   STATUS & ANIMATIONS
   ================================ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.loading {
    opacity: 0.6;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

.status-up {
    color: #4CAF50;
}

.status-down {
    color: #f44336;
}

/* ================================
   IMPLEMENTATION ITEMS
   ================================ */
.implementation-item {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background-color 0.2s;
    margin: 2px 0;
}

.implementation-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.implementation-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.implementation-name {
    font-weight: bold;
    color: #4CAF50;
}

/* ================================
   DISCLAIMER
   ================================ */
.disclaimer {
    position: fixed;
    bottom: -2px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #cccccc;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: monospace;
    z-index: 34000;
    max-width: 300px;
    line-height: 1.3;
    pointer-events: none;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 768px) {
    /* Navigation */
    .navbar {
        padding: 0 10px;
    }
    
    #container .navbar {
        position: relative;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 60px;
        transition: 0.15s;
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 0;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 15px 20px;
        width: 100%;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Layout */
    .container {
        padding: 1rem;
        padding-top: 100px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .container .header h1 {
        font-size: 2rem;
    }
    
    .sections {
        grid-template-columns: 1fr;
    }
    
    /* Sidebar */
    .sidebar {
        width: 100%;
        right: 0;
        left: 0;
        bottom: 0;
        top: auto;
        border-radius: 0;
    }
    
    .panel {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    /* Controls */
    .controls {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .controls button {
        font-size: 0.8rem;
        padding: 8px 12px;
        flex: 1;
        min-width: 80px;
    }
    
    .filter-controls {
        bottom: 60px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .filter-controls button {
        font-size: 0.7rem;
        padding: 4px 8px;
        margin-right: 4px;
        margin-bottom: 4px;
    }
}

/* ================================
   MODAL STYLES
   ================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 15% auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 90%;
    max-width: 510px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 500;
}

.modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover,
.modal-close:focus {
    color: #ffffff;
}

.modal-body {
    padding: 25px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
}

.modal-body input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 14px;
    font-family: monospace;
    transition: border-color 0.2s, background-color 0.2s;
}

.modal-body input[type="text"]:focus {
    outline: none;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-body input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group input[type="text"] {
    flex: 1;
    margin-bottom: 0;
}

#paste-button {
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    min-width: 50px;
}

#paste-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

#paste-button:active {
    transform: translateY(1px);
}

.famous-addresses {
    margin-bottom: 20px;
}

.famous-addresses h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    opacity: 0.9;
}

.address-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.famous-address {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.famous-address:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.famous-address:active {
    transform: translateY(1px);
}

.address-name {
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 4px;
    color: #ffffff;
}

    .address-hash {
        font-family: monospace;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.7);
        word-break: break-all;
    }

    /* Transaction modal specific styles */
    .famous-transactions {
        margin-bottom: 20px;
    }

    .famous-transactions h4 {
        color: #ffffff;
        font-size: 14px;
        font-weight: 500;
        margin-bottom: 12px;
        opacity: 0.9;
    }

    .transaction-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .famous-transaction {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        background-color: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        color: #ffffff;
        cursor: pointer;
        transition: all 0.2s;
        text-align: left;
        width: 100%;
    }

    .famous-transaction:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .famous-transaction:active {
        transform: translateY(1px);
    }

    .transaction-name {
        font-weight: 500;
        font-size: 13px;
        margin-bottom: 4px;
        color: #ffffff;
    }

    .transaction-hash {
        font-family: monospace;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.7);
        word-break: break-all;
    }

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#modal-cancel {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#modal-cancel:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

#modal-submit {
    background-color: #ffffff;
    color: #000000;
}

#modal-submit:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons button {
        width: 100%;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #paste-button {
        width: 100%;
        margin-top: 8px;
    }
    
    .famous-address {
        padding: 10px;
    }
    
    .address-name {
        font-size: 12px;
    }
    
    .address-hash {
        font-size: 10px;
    }
    
    .famous-transaction {
        padding: 10px;
    }
    
    .transaction-name {
        font-size: 12px;
    }
    
    .transaction-hash {
        font-size: 10px;
    }
}

/* ================================
   MOBILE 3D NAVIGATION IMPROVEMENTS
   ================================ */

/* Canvas touch optimizations */
#scene canvas {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Navigation controls */
.navigation-controls {
    display: flex;
    gap: 12px;
    margin-left: 8px;
    align-items: flex-start;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.control-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.control-buttons {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
}

.control-buttons button {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.control-buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.control-buttons button:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

/* Zoom controls are smaller */
.control-group:last-child .control-buttons button {
    width: 33px;
    height: 33px;
    font-size: 12px;
}

/* Mobile controls improvements */
@media (max-width: 768px) {
    .controls {
        bottom: 80px;
        left: 20px;
        right: 20px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .controls button {
        padding: 12px 16px;
        font-size: 14px;
        min-width: 80px;
        flex: 1;
        min-width: 0;
    }
    
    .navigation-controls {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
        justify-content: center;
        gap: 16px;
    }
    
    .control-group {
        gap: 6px;
    }
    
    .control-label {
        font-size: 11px;
    }
    
    .control-buttons button {
        width: 34px;
        height: 34px;
        font-size: 12px;
        flex: none;
    }
    
    .control-group:last-child .control-buttons button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    /* Larger touch targets for mobile */
    .panel-toggle {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    /* Mobile sidebar adjustments */
    .sidebar {
        width: 100%;
        max-width: none;
        right: 0;
        left: 0;
        bottom: 0;
        top: auto;
        height: auto;
        max-height: 50vh;
    }
    
    .panel {
        margin: 0;
        border-radius: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Mobile header adjustments */
    .header {
        padding: 15px 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    /* Mobile tooltip improvements */
    .milestone-tooltip {
        font-size: 10px;
        padding: 6px 8px;
        max-width: 120px;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .controls {
        bottom: 30px;
        left: 30px;
        right: 30px;
    }
    
    .controls button {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* High DPI mobile devices */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #scene canvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        max-height: 40vh;
    }
    
    .header {
        padding: 10px 20px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .controls {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .controls button {
        padding: 8px 12px;
        font-size: 12px;
    }
}