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

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(180deg, #251853 0%, #1a0f3d 50%, #0f0828 100%);
    min-height: 100vh;
    color: #fff;
    padding: 2rem;
    position: relative;
}

.home-btn {
    position: absolute;
    top: 2rem;
    left: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(183, 148, 246, 0.15);
    border: 1px solid rgba(183, 148, 246, 0.3);
    border-radius: 8px;
    color: #b794f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.95rem;
    z-index: 100;
}

.home-btn:hover {
    background: rgba(183, 148, 246, 0.25);
    border-color: #b794f6;
    transform: translateY(-2px);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #b794f6, transparent);
}

.header p {
    color: #a3a3a3;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(183, 148, 246, 0.15);
    border: 1px solid rgba(183, 148, 246, 0.3);
    border-radius: 8px;
    color: #b794f6;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background: rgba(183, 148, 246, 0.25);
    border-color: #b794f6;
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff6ec7 0%, #b794f6 50%, #7c3aed 100%);
    border-color: #b794f6;
    color: #fff;
}

.edit-mode-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(183, 148, 246, 0.15);
    border: 1px solid rgba(183, 148, 246, 0.3);
    border-radius: 8px;
    color: #b794f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.95rem;
    white-space: nowrap;
}

.edit-mode-btn:hover {
    background: rgba(183, 148, 246, 0.25);
    border-color: #b794f6;
}

.add-vinyl {
    background: rgba(30, 20, 60, 0.6);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    border: 1px solid rgba(183, 148, 246, 0.2);
    backdrop-filter: blur(10px);
}

.add-vinyl h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #b794f6;
}

.scraper-section {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.scrape-input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(20, 15, 40, 0.8);
    border: 1px solid rgba(183, 148, 246, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
}

.scrape-input:focus {
    outline: none;
    border-color: #b794f6;
}

.scrape-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #7c3aed 0%, #b794f6 50%, #ff6ec7 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.scrape-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.scrape-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-vinyl input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(20, 15, 40, 0.8);
    border: 1px solid rgba(183, 148, 246, 0.3);
    border-radius: 8px;
    color: #fff;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.add-vinyl input:focus {
    outline: none;
    border-color: #b794f6;
}

.add-vinyl button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff6ec7 0%, #b794f6 50%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
}

.add-vinyl button:hover {
    opacity: 0.9;
}

.vinyl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.vinyl-card {
    background: rgba(30, 20, 60, 0.85);
    border: 1px solid rgba(183, 148, 246, 0.4);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(183, 148, 246, 0.1) inset;
    position: relative;
}

.vinyl-card.draggable {
    cursor: grab;
}

.vinyl-card.draggable:active {
    cursor: grabbing;
}

.vinyl-card.dragging * {
    pointer-events: none;
}

.vinyl-card.dragging {
    opacity: 0.8;
    transform: scale(1.1) rotate(4deg);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8),
                0 0 0 2px #b794f6,
                0 0 40px rgba(183, 148, 246, 0.8);
    border-color: #b794f6;
    z-index: 1000;
    transition: none;
}

.vinyl-card.drag-over {
    border: 2px solid #ff6ec7;
    background: rgba(50, 35, 80, 0.95);
    box-shadow: 0 0 0 2px #ff6ec7,
                0 0 40px rgba(255, 110, 199, 0.8),
                0 10px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(-10px) scale(1.03);
}

.favorite-corner-btn {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 40px;
    height: 40px;
    background: rgba(15, 10, 30, 0.85);
    border: 1px solid rgba(183, 148, 246, 0.3);
    border-radius: 8px;
    color: #ffd700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.favorite-corner-btn:hover {
    background: rgba(15, 10, 30, 0.95);
    border-color: #ffd700;
    transform: scale(1.1);
}

.favorite-corner-btn .fa-star {
    color: #ffd700;
}

.favorite-corner-btn .far.fa-star {
    color: rgba(255, 215, 0, 0.4);
}

.vinyl-card:hover {
    transform: translateY(-5px);
    border-color: rgba(183, 148, 246, 0.7);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7),
                0 0 30px rgba(183, 148, 246, 0.2),
                0 0 0 1px rgba(183, 148, 246, 0.2) inset;
}

.vinyl-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
    background: rgba(30, 20, 60, 0.4);
    display: block;
}

.vinyl-info {
    padding: 1.25rem;
    line-height: normal;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.badge.owned {
    background: rgba(22, 101, 52, 0.5);
    color: #86efac;
    border: 1px solid rgba(21, 128, 61, 0.6);
    backdrop-filter: blur(5px);
}

.badge.favorite {
    background: rgba(153, 27, 27, 0.5);
    color: #fca5a5;
    border: 1px solid rgba(185, 28, 28, 0.6);
    backdrop-filter: blur(5px);
}

.vinyl-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.vinyl-artist {
    color: #a3a3a3;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.vinyl-content-wrapper {
    flex: 1;
}

.vinyl-price-bar {
    margin-top: auto;
    padding: 1rem 1.25rem;
    background: rgba(15, 10, 30, 0.8);
    border-top: 1px solid rgba(183, 148, 246, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 -1.25rem -1.25rem;
}

.vinyl-price {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

.vinyl-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(183, 148, 246, 0.3);
    border-radius: 6px;
    background: rgba(20, 15, 40, 0.6);
    color: #b794f6;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.action-btn:hover {
    background: rgba(183, 148, 246, 0.2);
    border-color: #b794f6;
}

.action-btn.primary {
    background: linear-gradient(135deg, #ff6ec7 0%, #b794f6 50%, #7c3aed 100%);
    border-color: #b794f6;
    color: #fff;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
}

.action-btn.primary:hover {
    opacity: 0.9;
    background: linear-gradient(135deg, #ff6ec7 0%, #b794f6 50%, #7c3aed 100%);
}

.action-btn.danger {
    color: #ff6ec7;
    border-color: rgba(255, 110, 199, 0.3);
}

.action-btn.danger:hover {
    background: rgba(255, 110, 199, 0.2);
    border-color: #ff6ec7;
}

.action-btn.confirm-delete {
    background: rgba(255, 69, 0, 0.3);
    border-color: #ff4500;
    color: #ff6347;
    animation: pulse 0.5s ease-in-out;
}

.action-btn.confirm-delete:hover {
    background: rgba(255, 69, 0, 0.5);
    border-color: #ff6347;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
