/* Base styles and layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Top Navigation Styles */
.top-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding: 10px 20px;
    z-index: 1000;
}

.nav-back-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-back-button:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    color: #FFD700;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 80px;
    background: 
        /* Record shelves */
        linear-gradient(90deg, transparent 0%, rgba(139,69,19,0.3) 2%, rgba(139,69,19,0.6) 3%, transparent 5%),
        linear-gradient(90deg, transparent 20%, rgba(101,67,33,0.4) 22%, rgba(101,67,33,0.7) 23%, transparent 25%),
        linear-gradient(90deg, transparent 45%, rgba(160,82,45,0.3) 47%, rgba(160,82,45,0.6) 48%, transparent 50%),
        linear-gradient(90deg, transparent 70%, rgba(139,69,19,0.4) 72%, rgba(139,69,19,0.7) 73%, transparent 75%),
        /* Base library texture */
        linear-gradient(135deg, #1a0f0a, #2c1810, #8B4513);
    background-size: 
        100% 25%,
        100% 25%,
        100% 25%,
        100% 25%,
        100% 100%;
    background-position:
        0 20%,
        0 40%,
        0 60%,
        0 80%,
        0 0;
    min-height: 100vh;
    color: white;
    padding: 20px;
    position: relative;
}

/* Floating musical notes background */
body::before {
    content: "♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 24px;
    line-height: 40px;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: -1;
    word-spacing: 20px;
    letter-spacing: 15px;
    animation: float-notes 45s linear infinite;
    overflow: hidden;
    white-space: pre-wrap;
}

body::after {
    content: "♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢 ♪ ♫ ♩ ♬ ♭ ♮ ♯ 𝄞 𝄢";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 18px;
    line-height: 35px;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    z-index: -1;
    word-spacing: 25px;
    letter-spacing: 20px;
    animation: float-notes 60s linear infinite reverse;
    overflow: hidden;
    white-space: pre-wrap;
    transform: rotate(5deg);
}

@keyframes float-notes {
    0% { 
        transform: translateY(100vh) translateX(-50px);
    }
    100% { 
        transform: translateY(-100vh) translateX(50px);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 40px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: #FFD700;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    color: #F5DEB3;
}

.collection-info {
    text-align: center;
    margin-bottom: 20px;
    color: #F5DEB3;
    font-size: 1.1rem;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: #F5DEB3;
}

.loading-text {
    color: #1db954;
    font-weight: bold;
    animation: pulse 1.5s ease-in-out infinite;
}

.search-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    position: relative;
}

.search-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1db954, #1ed760, #1db954);
    background-size: 200% 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}

.search-progress-bar-fill.animated {
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% {
        width: 0%;
        background-position: 0% 50%;
    }
    50% {
        width: 70%;
        background-position: 100% 50%;
    }
    100% {
        width: 100%;
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.hidden {
    display: none !important;
}

/* Wood Grain Effect */
.wood-grain {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(90deg, 
            transparent 0px, 
            rgba(139, 69, 19, 0.1) 1px, 
            transparent 2px, 
            rgba(160, 82, 45, 0.1) 3px);
    border-radius: 15px;
    pointer-events: none;
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tab-button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 15px 25px;
    margin: 0 5px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-button:hover {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(45deg, #8B4513, #A0522D);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
    border: 1px solid #FFD700;
}

.tab-button.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #FFD700;
}

/* Tab Content Styles */
.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.placeholder-content {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.placeholder-content h3 {
    color: #FFD700;
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.placeholder-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Responsive Tab Design */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-button {
        margin: 0;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .placeholder-content {
        padding: 40px 15px;
    }
    
    .placeholder-content h3 {
        font-size: 1.5rem;
    }
    
    .placeholder-content p {
        font-size: 1rem;
    }
}

/* Archive Links Styling */
.archive-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-left: 4px solid #FFD700;
}

.archive-link {
    color: #FFD700;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.archive-link:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Footer Styles */
.app-footer {
    margin-top: 60px;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
}

.app-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 215, 0, 0.5) 20%, 
        rgba(255, 215, 0, 0.8) 50%, 
        rgba(255, 215, 0, 0.5) 80%, 
        transparent 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0 0 15px 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.gitlab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
}

.gitlab-link:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.gitlab-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .app-footer {
        margin-top: 40px;
        padding: 20px 15px;
    }
    
    .footer-content p {
        font-size: 0.85rem;
    }
}

/* Cratedigger 3D View Styles */
#cratedigger-view {
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Override cratedigger's overflow:hidden on body */
body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important; /* iOS momentum scrolling */
    touch-action: pan-y !important; /* Allow vertical scrolling on touch devices */
}

html {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important; /* iOS momentum scrolling */
    touch-action: pan-y !important; /* Allow vertical scrolling on touch devices */
}

#cratedigger {
    width: 100%;
    height: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch; /* iOS momentum scrolling */
    touch-action: manipulation; /* Allow default touch actions for cratedigger */
}

#cratedigger-canvas {
    width: 100%;
    height: 100%;
}

.cratedigger-play-button {
    /* margin-top removed */
    padding: 12px 30px;
    background: #1DB954;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cratedigger-play-button:hover {
    background: #1ed760;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.4);
}


#cratedigger-bottom-bar.closed {
    opacity: 0;
    pointer-events: none;
}

.info-container {
    display: table;
    width: 100%;
    height: 100%;
}

.vertical-center {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

.loading-label {
    color: #fefefe;
    font-size: 30px;
    line-height: 35px;
    font-weight: 700;
    text-transform: uppercase;
}
