* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

h1 {
    color: #333;
    font-size: 2em;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
    width: 100%;
    margin-bottom: 10px;
}

.btn-back {
    background: #f0f0f0;
    color: #333;
}

/* Vinyl Grid */
.vinyl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.vinyl-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
}

.vinyl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

.vinyl-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.vinyl-info {
    padding: 15px;
}

.vinyl-info h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vinyl-info .artist {
    color: #666;
    font-size: 0.9em;
}

.vinyl-info .year {
    color: #999;
    font-size: 0.85em;
    margin-top: 5px;
}

.btn-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220,53,69,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h2 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}

/* Scanner */
.scanner-section {
    max-width: 600px;
    margin: 0 auto;
}

#scanner-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

#video {
    width: 100%;
    height: auto;
    display: block;
}

#scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-line {
    width: 80%;
    height: 2px;
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
    animation: scan 2s infinite;
}

@keyframes scan {
    0%, 100% { transform: translateY(-100px); }
    50% { transform: translateY(100px); }
}

.controls {
    text-align: center;
    margin: 20px 0;
}

.controls .btn {
    margin: 0 5px;
}

.manual-input {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.manual-input p {
    margin-bottom: 10px;
    color: #666;
}

.input-group {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Album Card */
.album-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.album-card img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin: 0 auto 20px;
    display: block;
}

.album-info {
    margin-bottom: 20px;
}

.album-info h2 {
    color: #333;
    margin-bottom: 15px;
}

.album-info p {
    color: #666;
    margin: 8px 0;
}

.album-actions .btn {
    width: 100%;
    margin-bottom: 10px;
}

/* Loading */
#loading {
    text-align: center;
    padding: 40px;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    h1 {
        font-size: 1.5em;
    }

    .vinyl-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .vinyl-card img {
        height: 150px;
    }
}

/* Vinyl Card Link */
.vinyl-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.vinyl-link:hover {
    text-decoration: none;
}

.vinyl-card {
    cursor: pointer;
}

/* Detail Page */
.detail-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.detail-cover {
    text-align: center;
}

.detail-cover img {
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.detail-info h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #333;
}

.info-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.info-section:last-child {
    border-bottom: none;
}

.info-section h3 {
    color: #999;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.info-section p {
    font-size: 1.2em;
    color: #333;
}

.info-section code {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-spotify {
    background: #1DB954;
    color: white;
    font-weight: 700;
}

.btn-spotify:hover {
    background: #1ed760;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(29, 185, 84, 0.3);
}

/* Tracklist */
.tracklist-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.tracklist-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.tracklist {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    transition: all 0.3s;
}

.track-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.track-position {
    font-weight: 600;
    color: #999;
    min-width: 30px;
}

.track-title {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.track-duration {
    color: #999;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .detail-page {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-info h1 {
        font-size: 1.8em;
    }

    .track-item {
        flex-wrap: wrap;
    }
}

/* ===================================
   COLLECTION GRID - MINIMALIST BLACK
   =================================== */

.collection-body {
    background: #000;
    padding: 0;
    margin: 0;
    opacity: 1 !important; /* Always visible */
}

.collection-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
    opacity: 1 !important; /* Always visible */
}

/* Ultra-thin Controls Bar */
.controls-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* Thin Search Input */
.controls-bar input[type="text"] {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 300px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    transition: background 0.2s, border-color 0.2s;
}

.controls-bar input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.controls-bar input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile: prevent search bar expansion */
@media (max-width: 768px) {
    .controls-bar input[type="text"] {
        flex: 0 1 auto;
        max-width: 100%;
        font-size: 16px;
        width: 200px;
    }
}

/* Subtle Sort Controls */
.sort-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.sort-btn {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.sort-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.filter-btn {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: capitalize;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Minimal Add Button */
.btn-add-minimal {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-add-minimal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Refresh Covers Button */
.btn-refresh-covers {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh-covers:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn-refresh-covers:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modern Vinyl Grid */
.vinyl-grid-modern {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 0;
    background: #000;
    opacity: 1 !important; /* Always full opacity, never dim */
}

.vinyl-item {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    opacity: 1 !important; /* Always full opacity */
}

.vinyl-cover {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.vinyl-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.vinyl-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.vinyl-overlay-content {
    width: 100%;
    color: white;
}

.vinyl-overlay-content h3 {
    font-size: 1em;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.vinyl-overlay-content p {
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.year-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.75em;
    backdrop-filter: blur(10px);
}

.vinyl-item:hover .vinyl-cover img {
    transform: scale(1.05);
}

.vinyl-item:hover .vinyl-overlay {
    opacity: 1;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.3);
}

.no-results h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .vinyl-overlay-content h3 {
        font-size: 0.8em;
    }

    .vinyl-overlay-content p {
        font-size: 0.7em;
    }
}

/* ===================================
   MOBILE HAMBURGER MENU
   =================================== */

/* Show/Hide Elements */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }
}

/* Hamburger Button */
.hamburger-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 5px;
}

.hamburger-btn span {
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s;
}

.hamburger-btn:hover span {
    background: #fff;
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    backdrop-filter: blur(10px);
}

.mobile-menu.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    max-width: 300px;
    width: 90%;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.mobile-menu-header h3 {
    color: #fff;
    font-size: 1.5em;
    margin: 0;
}

.close-menu {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 30px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.mobile-menu-section {
    margin-bottom: 30px;
}

.mobile-menu-section:last-child {
    margin-bottom: 0;
}

.mobile-menu-section h4 {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.sort-btn-mobile {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    text-align: left;
}

.sort-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sort-btn-mobile.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn-mobile {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    text-align: left;
    text-transform: capitalize;
}

.filter-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.filter-btn-mobile.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-add-mobile {
    display: block;
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-add-mobile:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.btn-refresh-mobile {
    display: block;
    width: 100%;
    padding: 15px;
    background: rgba(255, 200, 100, 0.1);
    border: 1px solid rgba(255, 200, 100, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.btn-refresh-mobile:hover:not(:disabled) {
    background: rgba(255, 200, 100, 0.2);
    transform: scale(1.02);
}

.btn-refresh-mobile:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Grid Size Selector */
.grid-size-selector {
    display: flex;
    gap: 3px;
    align-items: center;
}

.grid-size-btn {
    padding: 4px 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 28px;
}

.grid-size-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.grid-size-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===================================
   DETAIL PAGE - MINIMALIST BLACK
   =================================== */

.detail-body {
    background: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Top Bar */
.detail-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.btn-back-minimal {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.btn-back-minimal:hover {
    color: #fff;
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.btn-action-minimal {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-minimal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger-minimal {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
}

.btn-danger-minimal:hover {
    background: rgba(220, 53, 69, 0.4);
}

/* Main Container */
.detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 60px;
}

@media (max-width: 1024px) {
    .detail-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }
}

/* Cover Section */
.detail-cover-section {
    position: sticky;
    top: 80px;
    align-self: start;
}

.detail-cover-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

/* Cover Replace Section */
.cover-replace-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.cover-replace-section h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cover-url-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.cover-url-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.cover-url-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.cover-actions {
    display: flex;
    gap: 8px;
}

.btn-cover-action {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cover-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-save {
    background: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.4);
}

.btn-save:hover {
    background: rgba(40, 167, 69, 0.4);
}

/* Info Section */
.detail-info-section {
    min-width: 0;
}

.detail-title {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
}

.detail-artist {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 40px 0;
}

/* Meta Info */
.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-value {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* Spotify Player */
.spotify-player-minimal {
    display: none;
    position: relative;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.close-player {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.3);
    border: 1px solid rgba(220, 53, 69, 0.5);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-player:hover {
    background: rgba(220, 53, 69, 0.5);
}

/* Tracklist */
.detail-tracklist {
    margin-top: 40px;
}

.detail-tracklist h2 {
    font-size: 18px;
    margin: 0 0 20px 0;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.track-list {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.track {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.track:last-child {
    border-bottom: none;
}

.track:hover {
    background: rgba(255, 255, 255, 0.03);
}

.track-num {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    min-width: 30px;
}

.track-name {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.track-time {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .detail-title {
        font-size: 1.8em;
    }

    .detail-artist {
        font-size: 1.2em;
    }

    .detail-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .cover-replace-section {
        padding: 15px;
    }
}

/* ==========================================
   SCAN PAGE - MINIMALIST BLACK DESIGN
   ========================================== */

.scan-body {
    background: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

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

.scan-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.back-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #fff;
}

.scan-header h1 {
    font-size: 1.8em;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.scanner-section-minimal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.scanner-frame {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4/3;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.scanner-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-line {
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff00, transparent);
    animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
    0%, 100% {
        transform: translateY(-100px);
        opacity: 0;
    }
    50% {
        transform: translateY(0);
        opacity: 1;
    }
}

.scanner-controls {
    display: flex;
    gap: 15px;
}

.scan-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.scan-btn-primary {
    background: #fff;
    color: #000;
}

.scan-btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.scan-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scan-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.scan-btn-success {
    background: #00ff00;
    color: #000;
}

.scan-btn-success:hover {
    background: #00dd00;
    transform: translateY(-1px);
}

.scan-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scan-btn-ghost:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.manual-input-minimal {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.input-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.barcode-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    text-align: center;
    transition: all 0.2s;
}

.barcode-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.barcode-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.result-section {
    margin-top: 40px;
    animation: fadeIn 0.3s ease;
}

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

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.result-cover {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.result-info {
    text-align: center;
    width: 100%;
}

.result-title {
    font-size: 1.8em;
    font-weight: 300;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.result-artist {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
}

.result-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    margin-bottom: 10px;
}

.meta-sep {
    color: rgba(255, 255, 255, 0.2);
}

.result-barcode {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.type-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.type-dropdown {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.type-dropdown:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.type-dropdown:focus {
    outline: none;
    border-color: #fff;
}

.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-state p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

@media (max-width: 768px) {
    .scan-container {
        padding: 20px 15px;
    }

    .scan-header h1 {
        font-size: 1.4em;
    }

    .result-cover {
        width: 200px;
        height: 200px;
    }

    .result-title {
        font-size: 1.4em;
    }

    .result-artist {
        font-size: 1em;
    }

    .result-actions {
        flex-direction: column;
        width: 100%;
    }

    .scan-btn {
        width: 100%;
    }
}

/* PIN Authentication Modal */
.pin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.pin-modal {
    background: rgba(0, 0, 0, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
}

.pin-modal h2 {
    color: #fff;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.pin-modal p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.pin-input-container {
    margin-bottom: 25px;
}

.pin-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    text-align: center;
    letter-spacing: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.pin-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.pin-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: normal;
}

.pin-error {
    color: #ff4444;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

.pin-error.visible {
    display: block;
}

.pin-buttons {
    display: flex;
    gap: 10px;
}

.pin-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pin-btn-primary {
    background: #fff;
    color: #000;
}

.pin-btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.pin-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pin-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

/* Logout Buttons */
.btn-logout-desktop {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-logout-desktop:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-logout-mobile {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-logout-mobile:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-logout-mobile span {
    font-size: 16px;
}

/* Mobile fix for detail page - prevent sticky cover */
@media (max-width: 768px) {
    .detail-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .detail-cover-section {
        position: relative !important;
        top: 0 !important;
    }
}

/* Manual Search Section */
.search-input-section {
    margin-top: 20px;
}

.search-inputs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Search Results Dropdown */
.search-results {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-cover {
    width: 40px;
    height: 40px;
    min-width: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

@media (max-width: 768px) {
    .search-inputs {
        flex-direction: column;
    }
}
    }
}
