/* Main styling */
:root {
    --tg-theme-bg-color: #111518;
    --tg-theme-text-color: #ffffff;
    --tg-theme-hint-color: #9cacba;
    --tg-theme-link-color: #2094f3;
    --tg-theme-button-color: #2094f3;
    --tg-theme-button-text-color: #ffffff;
    --primary-color: #2094f3;
    --secondary-color: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #9cacba;
    --success-color: #4caf50;
    --error-color: #f44336;
    --dark-bg: #111518;
    --card-bg: #1e2329;
    --border-color: #2c3235;
}

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

body {
    margin: 0;
    padding: 0;
    background-color: #111518;
    color: #fff;
    font-family: "Plus Jakarta Sans", "Noto Sans", sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    padding: 15px;
    margin: 0 auto;
    padding-bottom: 80px; /* Space for fixed navbar */
}

.mb-20 {
    margin-bottom: 5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    font-weight: 600;
}

p {
    margin-bottom: 10px;
}

a {
    color: var(--tg-theme-link-color, var(--primary-color));
    text-decoration: none;
}

/* Button styles */
button, .button {
    background-color: var(--tg-theme-button-color, var(--primary-color));
    color: var(--tg-theme-button-text-color, var(--text-color));
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

button:hover, .button:hover {
    opacity: 0.9;
}

button i, .button i {
    margin-right: 5px;
}

/* Card styles */
.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: rgba(30, 35, 41, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo img {
    height: 30px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
}

.login-button, .login-btn {
    padding: 8px 12px;
    font-size: 12px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-around;
    background-color: var(--card-bg);
    padding: 10px 0;
    width: 100%;
    border-top: 1px solid var(--border-color);
}

.navbar.fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
    text-decoration: none;
    padding: 5px 0;
    width: 20%;
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 4px;
}

.nav-item.active, .nav-item:hover {
    color: var(--primary-color);
}

/* Song grid */
.song-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.song-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.song-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.song-item .song-cover {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
}

.song-item .song-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-item .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.song-item:hover .play-overlay {
    opacity: 1;
}

.song-item .play-overlay i {
    font-size: 30px;
    color: white;
}

.song-item .song-details {
    padding: 10px;
}

.song-item .song-details h4 {
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-item .song-details p {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Section headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h3 {
    margin-bottom: 0;
}

.section-header .view-all {
    font-size: 12px;
    color: var(--primary-color);
}

/* Player styles */
.player-container {
    position: fixed;
    bottom: 60px; /* Above navbar */
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.player-song-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.player-song-info img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 10px;
    object-fit: cover;
}

.player-song-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-song-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.player-controls button {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-color);
    padding: 5px 10px;
    cursor: pointer;
}

.player-controls .play-btn {
    font-size: 24px;
    margin: 0 15px;
}

.progress-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.progress-bar-container {
    flex: 1;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin: 0 10px;
    position: relative;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 2px;
    width: 0;
}

.current-time, .duration {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Song details page */
.song-details-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.song-details-container .song-cover {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.song-details-container .song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.song-details-container .song-info {
    text-align: center;
    width: 100%;
}

.song-details-container h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.song-details-container h2 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.song-stats {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.song-stats span {
    margin: 0 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.song-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.song-actions button {
    margin: 0 5px 10px;
}

.favorite-btn.active {
    background-color: var(--error-color);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #1b2227;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #9cacba;
}

.playlist-list {
    margin: 20px 0;
}

.playlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

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

.playlist-info h4 {
    margin-bottom: 0;
}

.add-btn {
    background-color: transparent;
    color: var(--primary-color);
    font-size: 18px;
    padding: 5px;
}

.create-playlist {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.form-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.form-group input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color);
    color: var(--text-color);
}

/* Search form */
.search-form {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 14px;
}

/* Categories */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category:hover, .category.active {
    background-color: var(--primary-color);
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .song-details-container {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .song-details-container .song-cover {
        margin-right: 30px;
        margin-bottom: 0;
    }
    
    .song-details-container .song-info {
        text-align: left;
    }
    
    .song-stats {
        justify-content: flex-start;
    }
    
    .song-actions {
        justify-content: flex-start;
    }
}

/* Audio player styles */
.audio-player {
    position: fixed;
    bottom: 100px; /* Position above the navbar */
    left: 0;
    right: 0;
    background-color: #1b2227;
    padding: 12px 16px;
    border-top: 1px solid #283139;
    border-bottom: 1px solid #283139;
    z-index: 99; /* One below navbar z-index */
    display: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.audio-player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.song-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.song-info img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.song-text {
    flex: 1;
    overflow: hidden;
}

.song-title {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 12px;
    color: #9cacba;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-pause-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #2094f3;
}

.progress-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #283139;
}

.progress-bar {
    height: 100%;
    background-color: #2094f3;
    width: 0;
}

/* Fix for bottom navbar */
.mb-20 {
    margin-bottom: 5rem;
}

/* Fix for dark mode */
.dark {
    color-scheme: dark;
} 