:root {
    --bg: #e0e5ec;
    --element: #e0e5ec;
    --highlight: #ffffff;
    --shadow: #bec5d1;
    --accent: #4facfe;
    --text: #2c3e50;
    --text-light: #5c728a;
    --radius: 28px;
    --shadow-out: 12px 12px 24px var(--shadow), -12px -12px 24px var(--highlight);
    --shadow-in: inset 8px 8px 16px var(--shadow), inset -8px -8px 16px var(--highlight);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
}
body {
    display: flex;
    flex-direction: column;
    padding: 12px 10px 0 10px;
}
.header {
    text-align: center;
    margin-bottom: 5px;
    flex-shrink: 0;
}
.branding {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(118, 75, 162, 0.2);
    line-height: 1.2;
}
.sub-brand {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 1.5px;
    margin-top: 2px;
}
.now-playing {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    margin: 5px 0 5px;
    padding: 8px 15px;
    border-radius: 40px;
    background: var(--element);
    box-shadow: var(--shadow-out);
    display: inline-block;
    max-width: 95%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
#player {
    width: 100%;
    max-width: 1080px;
    height: 56.25vw;
    max-height: 360px;
    margin: 0 auto 5px;
    border-radius: var(--radius);
    background: var(--element);
    box-shadow: var(--shadow-out);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--shadow);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
    display: none;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.search-wrapper {
    margin: 0 0 6px 0;
    flex-shrink: 0;
}
.neumo-input {
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 50px;
    background: var(--element);
    box-shadow: var(--shadow-in);
    font-size: 0.9rem;
    color: var(--text);
    outline: none;
    font-weight: 500;
}
.neumo-input::placeholder { color: var(--text-light); opacity: 0.8; }
.chip-box {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 0 5px;
    flex-shrink: 0;
    scrollbar-width: none;
}
.chip-3d {
    padding: 6px 16px;
    background: var(--element);
    border-radius: 40px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text);
    box-shadow: var(--shadow-out);
    transition: all 0.2s ease;
    border: none;
}
.chip-3d.active {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 16px rgba(102,126,234,0.3);
}
.grid-3d {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    padding: 6px 0 10px;
    min-height: 0;
    align-content: start;
}
.card-3d {
    background: var(--element);
    border-radius: 18px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-out);
    transition: transform 0.15s ease;
}
.card-3d:hover { transform: translateY(-2px); }
.card-3d img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    border-radius: 14px;
    margin-bottom: 4px;
    background: #f0f4fa;
}
.card-3d h4 {
    font-size: 0.7rem;
    font-weight: 700;
    margin: 3px 0 1px;
    color: var(--text);
}
.card-3d .category-badge {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(0,0,0,0.03);
    display: inline-block;
    padding: 2px 6px;
    border-radius: 20px;
    box-shadow: var(--shadow-in);
}
@media (max-width: 768px) {
    .grid-3d { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .card-3d { padding: 8px 3px; }
    .card-3d h4 { font-size: 0.65rem; }
    .branding { font-size: 1.5rem; }
    .now-playing { font-size: 1rem; }
}

.neumo-grid {
    display: flex;
    gap: 12px;
    margin: 8px 0 5px;
    flex-shrink: 0;
    position: relative;
}
.btn {
    flex: 1;
    padding: 12px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    color: white;
    transition: all 0.35s ease;
    box-shadow: var(--shadow-out);
    background: linear-gradient(145deg, #667eea, #764ba2);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(145deg, #764ba2, #667eea);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(102, 126, 234, 0.35); }
.btn:active { box-shadow: var(--shadow-in); transform: translateY(-1px); }

.dropdown {
    position: relative;
    flex: 1;
}
.dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--element);
    border-radius: var(--radius);
    box-shadow: var(--shadow-out);
    margin-bottom: 10px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    padding: 10px;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.2s;
    margin-bottom: 5px;
    background: var(--bg);
    box-shadow: var(--shadow-in);
}
.dropdown-item:hover {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
}

.footer-note {
    text-align: center;
    margin: 3px 0 12px;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 1px;
    flex-shrink: 0;
    transition: opacity 0.5s;
}
.footer-note strong { color: #667eea; }

/* Additional class for quality note */
.quality-note {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-light);
    margin: 2px 0 6px;
    flex-shrink: 0;
}

/* PWA INSTALL POPUP CSS */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    z-index: 350;
}
.popup-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    position: relative;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.3s ease;
    color: #2c3e50;
}
.popup-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f0f2f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #2c3e50;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.popup-close-btn:hover {
    background: #e0e5ec;
    transform: rotate(90deg);
}
.max-w-sm { max-width: 24rem; }
.text-center { text-align: center; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.rounded-2xl { border-radius: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.text-gray-500 { color: #6b7280; }
.btn-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 8px 15px rgba(102,126,234,0.3);
    transition: all 0.3s ease;
    margin-bottom: 12px;
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(102,126,234,0.4);
    background: linear-gradient(135deg, #764ba2, #667eea);
}
.not-now-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: underline;
    transition: all 0.3s ease;
    padding: 5px 10px;
    font-family: 'Inter', sans-serif;
}
.not-now-btn:hover {
    color: #2c3e50;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}