/* ==========================================================================
   EASY EDIT SECTION
   ========================================================================== */
:root {
    --bg-color: #ffffff;
    --surface-color: #dbdbdb;
    --text-primary: #000000;
    --text-secondary: #333333;
    
    --accent-color: #4a4949;
    --accent-hover: #2a2a2a;
    --btn-text-color: #ffffff;
    
    --card-hover: #cccccc;
    --border-color: #c7c7c7;
    
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    padding-bottom: 100px;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   HOME VIEW (Hero & Grid)
   ========================================================================== */
.hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 1s ease-in-out;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--btn-text-color);
    padding: 12px 24px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.library-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.library-section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.song-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, background-color 0.3s;
    cursor: pointer;
    position: relative;
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
}

.song-card:nth-child(1) { animation-delay: 0.1s; }
.song-card:nth-child(2) { animation-delay: 0.2s; }
.song-card:nth-child(3) { animation-delay: 0.3s; }
.song-card:nth-child(4) { animation-delay: 0.4s; }

.song-card:hover {
    transform: translateY(-10px);
    background-color: var(--card-hover);
}

.song-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.song-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.card-play-btn {
    background-color: var(--accent-color);
    color: var(--btn-text-color);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    margin-top: 15px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
    position: relative;
}

.card-play-btn:hover {
    background-color: var(--accent-hover);
}

.card-play-btn::after {
    content: "Play";
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000000;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.card-play-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* ==========================================================================
   DETAILS VIEW (The "New Page" Look)
   ========================================================================== */
.details-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 80vh;
    animation: fadeIn 0.4s ease-out;
}

.back-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 40px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.back-button:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.details-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.details-layout img {
    width: 400px;
    height: 400px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.details-info {
    flex-grow: 1;
    padding-top: 20px;
}

.details-title-row {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 30px;
}

.details-title-row h2 {
    font-size: 3.5rem;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -2px;
}

.variants-link {
    color: #0088cc;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.variants-link:hover {
    text-decoration: underline;
}

.details-player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.big-play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #888888;
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px; 
    transition: background-color 0.2s;
}

.big-play-btn:hover {
    background-color: #666666;
}

/* Custom Square Slider for the details view */
#details-progress {
    flex-grow: 1;
    height: 20px;
    -webkit-appearance: none;
    background: #cccccc;
    outline: none;
    border-radius: 0;
}

#details-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 35px;
    background: #000000;
    cursor: pointer;
}

#details-description {
    font-size: 1.2rem;
    line-height: 1.6;
    font-weight: bold;
    color: var(--text-secondary);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.site-footer {
    text-align: center;
    padding: 40px 20px 60px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-hover);
}

.site-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================================================
   BOTTOM AUDIO PLAYER
   ========================================================================== */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    z-index: 1000;
    transition: transform 0.4s ease-in-out;
}

.player-bar.hidden {
    transform: translateY(100%);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 20%;
}

.player-info img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.player-text h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.player-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.player-controls {
    display: flex;
    justify-content: center;
    width: 10%;
}

.control-btn {
    background-color: var(--accent-color);
    color: var(--btn-text-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background-color 0.2s;
}

.control-btn:hover {
    background-color: var(--accent-hover);
}

.control-btn:active {
    transform: scale(0.95);
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 45%;
}

.player-progress span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 40px;
}

#progress-bar {
    flex-grow: 1;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 15%;
}

.player-volume span {
    font-size: 1.2rem;
}

#volume-bar {
    flex-grow: 1;
    cursor: pointer;
    accent-color: var(--accent-color);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
    .player-bar {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    .player-info {
        width: 100%;
        justify-content: center;
    }
    .player-controls, .player-progress, .player-volume {
        width: 100%;
        justify-content: center;
    }
    body {
        padding-bottom: 250px;
    }
    
    .details-layout {
        flex-direction: column;
        text-align: center;
    }
    .details-layout img {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
    .details-title-row {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
}