/* Navigation - Mobile optimized */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 18, 51, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #FF6B35;
    z-index: 1000;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #00A8E8;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    padding: 0.5rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #FF6B35;
    border-color: #FF6B35;
    background: rgba(255, 107, 53, 0.1);
}

.nav-link.active {
    color: #FF6B35;
    border-color: #FF6B35;
    background: rgba(255, 107, 53, 0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #FF6B35;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Grid Container */
.grid-container {
    padding: 6rem 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    flex: 1;
}

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

.logo-small {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 3s infinite ease-in-out;
    filter: drop-shadow(0 0 20px #FF6B35);
}

.grid-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.neural {
    color: #FF6B35;
    text-shadow: 0 0 20px #FF6B35;
}

.beats {
    color: #00A8E8;
    text-shadow: 0 0 20px #00A8E8;
}

.grid-subtitle {
    display: block;
    font-size: 1rem;
    color: #00A8E8;
    margin-top: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
}

/* Grid Controls */
.grid-controls {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.search-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex-grow: 1;
    max-width: 400px;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 18, 51, 0.8);
    border: 2px solid #004E89;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

/* Genre Filters */
.genre-filters {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.genre-btn {
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 2px solid #004E89;
    color: #00A8E8;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.genre-btn:hover {
    background: rgba(0, 78, 137, 0.3);
    border-color: #00A8E8;
    transform: translateY(-2px);
}

.genre-btn.active {
    background: #FF6B35;
    border-color: #FF6B35;
    color: white;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}


/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 2rem;
    background: rgba(0, 78, 137, 0.2);
    border: 2px solid #004E89;
    color: #00A8E8;
    border-radius: 25px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.1em;
}

.filter-btn:hover {
    background: rgba(0, 78, 137, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 168, 232, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #FF6B35 0%, #004E89 100%);
    border-color: #FF6B35;
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.5);
}

/* CTA Upload Button */
.cta-btn-upload {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    color: white;
    border: 2px solid #FF6B35;
    border-radius: 25px;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.cta-btn-upload:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.6);
}

/* Songs Grid */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.songs-grid.loaded {
    opacity: 1;
}

/* Song Card */
.song-card {
    background: rgba(0, 18, 51, 0.7);
    border: 2px solid #004E89;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B35 0%, #00A8E8 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.song-card:hover::before {
    transform: scaleX(1);
}

.song-card:hover {
    border-color: #FF6B35;
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.3);
}

.song-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.song-info {
    flex: 1;
}

.song-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FF6B35;
    margin-bottom: 0.3rem;
}

.song-artist {
    font-size: 0.9rem;
    color: #00A8E8;
    font-weight: 600;
}

.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.vote-btn {
    background: rgba(255, 107, 53, 0.2);
    border: 2px solid #FF6B35;
    color: #FF6B35;
    width: 35px;
    height: 35px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-btn:hover {
    background: rgba(255, 107, 53, 0.4);
    transform: scale(1.1);
}

.vote-btn:active {
    transform: scale(0.95);
}

.vote-btn.upvote.voted {
    background: #FF6B35;
    color: white;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.8);
}

.vote-btn.downvote {
    border-color: #004E89;
    color: #00A8E8;
    background: rgba(0, 78, 137, 0.2);
}

.vote-btn.downvote:hover {
    background: rgba(0, 78, 137, 0.4);
}

.vote-btn.downvote.voted {
    background: #004E89;
    color: white;
    box-shadow: 0 0 15px rgba(0, 78, 137, 0.8);
}

.vote-count {
    font-weight: 700;
    color: #FF6B35;
    font-size: 1.1rem;
}

/* Share Button */
.share-btn {
    background: rgba(0, 168, 232, 0.2);
    border: 2px solid #00A8E8;
    color: #00A8E8;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: rgba(0, 168, 232, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 168, 232, 0.3);
}

/* Share Menu */
.share-menu {
    position: absolute;
    background: rgba(0, 30, 70, 0.95);
    border: 1px solid #004E89;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    top: 20px; /* Position relative to song-card */
    right: 20px; /* Position relative to song-card */
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 150px;
}

.share-menu.hidden {
    display: none;
}

.share-option {
    background: none;
    border: none;
    color: #00A8E8;
    padding: 0.7rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.share-option:hover {
    background: rgba(0, 78, 137, 0.3);
    color: #FF6B35;
}

.song-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 168, 232, 0.2);
    border: 1px solid #00A8E8;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #00A8E8;
    font-weight: 600;
    text-transform: uppercase;
}

.meta-tag.genre {
    background: rgba(255, 107, 53, 0.2);
    border-color: #FF6B35;
    color: #FF6B35;
}

.song-description {
    color: #e0e7ff;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.song-player {
    margin-top: 1rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.play-btn-small {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #FF6B35;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn-small:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
}

.waveform {
    flex: 1;
    height: 45px;
    background: transparent; /* Removed background to eliminate square */
    border: none; /* Removed border to eliminate square */
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Aligned content to the right */
    color: #00A8E8;
    font-size: 0.8rem;
}

.song-date {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.5rem;
    text-align: right;
}

/* Loading */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-top-color: #FF6B35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-text {
    color: #00A8E8;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        padding: 1rem 2rem;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(0, 18, 51, 0.98);
        padding: 1rem;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-bottom: 2px solid #FF6B35;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 107, 53, 0.2);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .songs-grid {
        grid-template-columns: 1fr;
    }

    .grid-title {
        font-size: 2.5rem;
    }
}

/* Site Footer */
.site-footer {
    background: rgba(0, 18, 51, 0.95);
    border-top: 2px solid #FF6B35;
    padding: 2rem;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

.site-footer p {
    color: #00A8E8;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.site-footer a {
    color: #FF6B35;
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-footer a:hover {
    color: #FF8C5A;
    text-decoration: underline;
}

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

.heart-pulse {
    display: inline-block; /* Essential for transform to work on an inline element */
    animation: heartbeat 1.5s infinite ease-in-out;
}

/* Admin Styles */
.admin-toggle-btn {
    padding: 0.8rem 2rem;
    background: rgba(139, 0, 139, 0.2);
    border: 2px solid #8B008B;
    color: #DA70D6;
    border-radius: 25px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.1em;
}

.admin-toggle-btn:hover {
    background: rgba(139, 0, 139, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(218, 112, 214, 0.3);
}

.admin-toggle-btn.admin-active {
    background: linear-gradient(135deg, #8B008B 0%, #DA70D6 100%);
    border-color: #DA70D6;
    color: white;
    box-shadow: 0 5px 20px rgba(218, 112, 214, 0.5);
}

/* Admin Modal */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.admin-modal.hidden {
    display: none;
}

.admin-modal-content {
    background: rgba(0, 18, 51, 0.95);
    border: 2px solid #8B008B;
    border-radius: 15px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(139, 0, 139, 0.5);
}

.admin-modal-content h2 {
    color: #DA70D6;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

.admin-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 18, 51, 0.8);
    border: 2px solid #8B008B;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.admin-input:focus {
    outline: none;
    border-color: #DA70D6;
    box-shadow: 0 0 15px rgba(218, 112, 214, 0.5);
}

.admin-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.admin-btn-confirm,
.admin-btn-cancel {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.admin-btn-confirm {
    background: linear-gradient(135deg, #8B008B 0%, #DA70D6 100%);
    border: 2px solid #DA70D6;
    color: white;
}

.admin-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(218, 112, 214, 0.6);
}

.admin-btn-cancel {
    background: transparent;
    border: 2px solid #666;
    color: #999;
}

.admin-btn-cancel:hover {
    background: rgba(102, 102, 102, 0.2);
    border-color: #999;
    color: white;
}

.admin-error {
    color: #FF6B35;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

.admin-error.hidden {
    display: none;
}

/* Delete Button */
.delete-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: rgba(220, 20, 60, 0.2);
    border: 2px solid #DC143C;
    color: #FF6B6B;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.delete-btn:hover {
    background: rgba(220, 20, 60, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 20, 60, 0.5);
    color: white;
}
