* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Disable transitions on page load to prevent flash */
.preload * {
    transition: none !important;
}

:root {
    --bg-color: #fff;
    --text-color: #000;
    --border-color: #000;
    --hover-bg: #f0f0f0;
    --active-bg: #000;
    --active-text: #fff;
}

:root.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --border-color: #333;
    --hover-bg: #2a2a2a;
    --active-bg: #fff;
    --active-text: #000;
}

body {
    font-family: 'Roboto Mono', monospace;
    font-size: 18px;
    line-height: 1.4;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow: hidden;
    height: 100vh;
    transition: background-color 0.05s ease, color 0.05s ease;
}

img {
    transition: filter 0.3s ease;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
    max-width: 1800px;
    margin: 0 auto;
    padding: 30px 0;
}

.left-sidebar {
    width: 300px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin: 30px 0;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.left-sidebar .bottom-links {
    margin-top: auto;
    flex-shrink: 0;
}

.left-sidebar-bottom {
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 30px;
}

.nav-tree {
    user-select: none;
}

.tree-root {
    list-style: none;
}

.tree-item {
    margin-bottom: 5px;
}

.tree-parent {
    font-weight: 500;
    color: var(--text-color);
    cursor: default;
}

.tree-children {
    list-style: none;
    margin-left: 0;
    margin-top: 3px;
}

.tree-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
    display: block;
    padding: 3px 0;
    transition: background-color 0.1s;
}

.tree-link.active,
.tree-children .tree-link.active,
ul .tree-link.active,
li .tree-link.active,
a.tree-link.active {
    background-color: #000 !important;
    color: #fff !important;
    font-weight: 500 !important;
    text-decoration: underline !important;
    display: block !important;
    font-size: inherit !important;
}

:root.dark-mode .tree-link.active,
:root.dark-mode .tree-children .tree-link.active,
:root.dark-mode ul .tree-link.active,
:root.dark-mode li .tree-link.active,
:root.dark-mode a.tree-link.active {
    background-color: #fff !important;
    color: #000 !important;
}

.tree-link:hover {
    background-color: var(--hover-bg);
}

.site-title-bar {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin-top: 4px;
    margin-bottom: 12px;
}

.main-content {
    flex: 1;
    padding: 0 30px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    margin: 30px 0;
    padding: 0;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    position: relative;
    box-sizing: border-box;
}

.content-wrapper::-webkit-scrollbar {
    width: 12px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: var(--bg-color);
    margin: 3px;
}

.content-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 6px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color);
}

.content-inner {
    padding: 30px;
    transition: opacity 0.15s ease;
    opacity: 0;
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.content-wrapper h1 {
    font-size: 27px;
    margin-bottom: 22px;
    font-weight: 700;
}

.content-wrapper h2 {
    font-size: 24px;
    margin-bottom: 18px;
    font-weight: 500;
}

.content-wrapper h3 {
    font-size: 21px;
    margin-bottom: 15px;
    font-weight: 500;
}

.content-wrapper p {
    margin-bottom: 15px;
    font-size: 18px;
}

.content-wrapper a {
    color: var(--text-color);
    text-decoration: underline;
}

.content-wrapper a:hover {
    background-color: var(--hover-bg);
}

.content-wrapper ul, .content-wrapper ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content-wrapper li {
    margin-bottom: 7px;
}

.content-wrapper code {
    background-color: var(--hover-bg);
    padding: 3px 6px;
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
}

.content-wrapper pre {
    background-color: var(--hover-bg);
    padding: 15px;
    overflow-x: auto;
    margin-bottom: 15px;
    font-size: 16px;
}

.content-wrapper blockquote {
    border-left: 3px solid var(--border-color);
    padding-left: 15px;
    margin-left: 15px;
    margin-bottom: 15px;
    font-style: italic;
}

.right-sidebar {
    width: 300px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: calc(100vh - 120px);
}

.dark-mode-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
    padding: 7px 15px;
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    margin-bottom: 30px;
}

.dark-mode-toggle:hover {
    background-color: var(--hover-bg);
}

.dark-mode-toggle:focus {
    background-color: var(--hover-bg);
    outline: none;
}

.dark-mode-toggle:active {
    background-color: var(--hover-bg);
}

.freeze-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
    padding: 7px 15px;
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    margin-bottom: 15px; /* Reduced from 30px to give more space to animation */
}

.freeze-toggle:hover {
    background-color: var(--hover-bg);
}

.freeze-toggle:focus {
    background-color: var(--hover-bg);
    outline: none;
}

.freeze-toggle:active {
    background-color: var(--hover-bg);
}

.status-info {
    margin-bottom: 30px;
}

.status-text {
    font-size: 18px;
    font-weight: 500;
}

#current-status {
    font-weight: 400;
    font-style: italic;
}

.time-info {
    margin-bottom: 30px;
}

.time-display {
    font-size: 18px;
    font-weight: 500;
}

#current-time {
    font-weight: 400;
}

.animation-container {
    flex: 1;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

#three-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.bottom-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, auto);
    gap: 4px; /* Increased from 3px */
    align-items: center;
    justify-items: center;
    margin-top: 30px; /* Increased from 20px */
    margin-left: -30px; /* Increased from -20px */
    margin-right: -30px; /* Increased from -20px */
    padding: 0 15px; /* Increased from 10px */
}

.link-image {
    width: 132px; /* Increased from 88px (88px * 1.5) */
    height: 46px; /* Increased from 31px (31px * 1.5) */
    border: 1px solid var(--border-color);
    display: block;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Increased from 200px */
    gap: 30px; /* Increased from 20px */
    margin: 30px 0; /* Increased from 20px */
}

.album {
    text-align: center;
}

.album-cover {
    width: 300px; /* Increased from 200px */
    height: 300px; /* Increased from 200px */
    object-fit: cover;
    border: 1px solid var(--border-color);
    margin-bottom: 15px; /* Increased from 10px */
    transition: filter 0.3s ease;
}

.album-info {
    font-size: 16px; /* Increased from 11px */
    line-height: 1.3;
}

.album-name {
    font-weight: 500;
    margin-bottom: 4px; /* Increased from 3px */
}

.album-details {
    color: var(--text-color);
    margin-bottom: 4px; /* Increased from 3px */
}

.album-genre {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.8;
}

.photo-gallery {
    margin: 30px 0; /* Increased from 20px */
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Increased from 10px */
}

.photo {
    height: 375px; /* Increased from 250px (250px * 1.5) */
    width: auto;
    object-fit: cover;
    border: 1px solid var(--border-color);
    transition: filter 0.3s ease;
}

.mobile-header {
    display: none;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        padding: 0;
    }
    
    .left-sidebar,
    .right-sidebar {
        display: none;
    }
    
    /* Add dark mode toggle to mobile header */
    .mobile-header .dark-mode-toggle {
        background: none;
        border: 1px solid var(--border-color);
        color: var(--text-color);
        font-family: 'Roboto Mono', monospace;
        font-size: 14px; /* Reduced from 16px to match menu buttons */
        padding: 5px 10px; /* Reduced from 7px 15px to make navbar more compact */
        cursor: pointer;
        transition: background-color 0.1s, color 0.1s;
        -webkit-tap-highlight-color: transparent;
        outline: none;
        margin-left: auto;
    }
    
    .mobile-header {
        display: block;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        padding: 10px; /* Reduced from 15px to make navbar more compact */
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .mobile-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        font-size: 18px; /* Reduced from 24px to make navbar more compact */
        font-weight: 700;
        color: var(--text-color);
        text-decoration: none;
    }
    
    .mobile-menu {
        display: flex;
        gap: 12px; /* Reduced from 22px to make navbar more compact */
    }
    
    .menu-btn {
        background: none;
        border: none;
        font-family: 'Roboto Mono', monospace;
        font-size: 14px; /* Reduced from 18px to make navbar more compact */
        color: var(--text-color);
        cursor: pointer;
        padding: 5px; /* Reduced from 7px to make navbar more compact */
        transition: background-color 0.1s;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }
    
    .menu-btn:hover {
        background-color: var(--hover-bg);
    }
    
    .menu-btn:focus {
        background-color: var(--hover-bg);
        outline: none;
    }
    
    .menu-btn:active {
        background-color: var(--active-bg);
        color: var(--active-text);
    }
    
    .menu-btn.active {
        background-color: var(--active-bg);
        color: var(--active-text);
    }
    
    .mobile-dropdown {
        display: none;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        padding: 10px; /* Reduced from 15px to make dropdowns more compact */
        flex-direction: column;
        gap: 5px; /* Reduced from 7px to make dropdowns more compact */
    }
    
    .mobile-dropdown.active {
        display: flex;
    }
    
    .mobile-dropdown a {
        color: var(--text-color);
        text-decoration: none;
        font-size: 14px; /* Reduced from 18px to make dropdowns more compact */
        padding: 5px; /* Reduced from 7px to make dropdowns more compact */
        transition: background-color 0.1s;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }
    
    .mobile-dropdown a:hover {
        background-color: var(--hover-bg);
    }
    
    .mobile-dropdown a:focus {
        background-color: var(--hover-bg);
        outline: none;
    }
    
    .mobile-dropdown a:active {
        background-color: var(--hover-bg);
    }
    
    .main-content {
        padding: 22px; /* Scaled up from 15px */
        overflow-y: visible;
    }
    
    .content-wrapper {
        max-width: none;
        height: auto;
        overflow-y: visible;
        margin: 22px 0; /* Scaled up from 15px */
    }
    
    .content-inner {
        opacity: 1;
    }
    
    body {
        overflow: visible;
        height: auto;
        font-size: 16px; /* Slightly smaller for mobile than desktop 18px */
    }
}

::-webkit-scrollbar {
    width: 12px; /* Increased from 8px */
}

::-webkit-scrollbar-track {
    background-color: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-color);
} 