/* RetroFly 2008 Style CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: white;
    text-decoration: none;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #1a1a1a url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAABCAYAAAASC7TOAAAAGklEQVQIHWPY9+8fAzYwirkTmwJYwCjmTmwKALb8Bh2Z1kzOAAAAAElFTkSuQmCC') repeat;
    color: #ffffff;
    line-height: 1.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    background: #2a2a2a;
    border-left: 2px solid #444;
    border-right: 2px solid #444;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Header Styles */
.header {
    background: linear-gradient(to bottom, #4a4a4a, #2a2a2a);
    border-bottom: 3px solid #666;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #ff6600;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: bold;
}

.tagline {
    color: #cccccc;
    font-size: 12px;
    font-style: italic;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #cccccc;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #555;
    background: linear-gradient(to bottom, #555, #333);
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: linear-gradient(to bottom, #666, #444);
    color: #ffffff;
}

.nav-link.active {
    background: linear-gradient(to bottom, #ff6600, #cc5500);
    border-color: #ff6600;
    color: #ffffff;
}

.logout-btn {
    color: #ff4444 !important;
    margin-left: 10px;
}

/* Main Content */
.main-content {
    padding: 20px;
    min-height: calc(100vh - 120px);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #444;
}

.content-header h2 {
    color: #ff6600;
    font-size: 24px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.search-box {
    display: flex;
    gap: 5px;
}

.search-box input {
    padding: 8px 12px;
    border: 2px solid #555;
    background: #333;
    color: #ffffff;
    border-radius: 3px;
    font-size: 13px;
    width: 200px;
}

.search-box input:focus {
    outline: none;
    border-color: #ff6600;
    background: #444;
}

.search-box button {
    padding: 8px 15px;
    background: linear-gradient(to bottom, #ff6600, #cc5500);
    border: 1px solid #ff6600;
    color: #ffffff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.search-box button:hover {
    background: linear-gradient(to bottom, #ff7700, #dd6600);
}

/* Music Grid - Updated for consistent sizing */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.music-item {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border: 2px solid #555;
    border-radius: 5px;
    padding: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.music-item:hover {
    border-color: #ff6600;
    background: linear-gradient(to bottom, #4a4a4a, #3a3a3a);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Updated music item layout to match player layout */
.music-item-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.music-cover {
    width: 100px;
    height: 100px;
    background: #555;
    border: 2px solid #666;
    border-radius: 3px;
    flex-shrink: 0;
    overflow: hidden;
    object-fit: cover;
}

.music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure placeholders match image sizing behavior */
.music-cover .no-cover-placeholder,
.player-cover .no-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #666;
    color: #999;
    font-size: 12px;
}

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

.music-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.3;
}

.music-artist {
    color: #cccccc;
    font-size: 13px;
    margin-bottom: 8px;
}

.music-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.stars {
    color: #ff6600;
    cursor: pointer;
}

.rating-text {
    color: #aaaaaa;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 12px;
    background: linear-gradient(to bottom, #555, #333);
    border: 1px solid #666;
    color: #cccccc;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.2s;
}

.page-btn:hover {
    background: linear-gradient(to bottom, #666, #444);
    color: #ffffff;
}

.page-btn.active {
    background: linear-gradient(to bottom, #ff6600, #cc5500);
    border-color: #ff6600;
    color: #ffffff;
}

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

/* Forms */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border: 2px solid #555;
    border-radius: 5px;
    padding: 30px;
}

.form-title {
    color: #ff6600;
    font-size: 24px;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #cccccc;
    margin-bottom: 5px;
    font-size: 13px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #555;
    background: #333;
    color: #ffffff;
    border-radius: 3px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6600;
    background: #444;
}

.btn {
    padding: 12px 25px;
    background: linear-gradient(to bottom, #ff6600, #cc5500);
    border: 1px solid #ff6600;
    color: #ffffff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn:hover {
    background: linear-gradient(to bottom, #ff7700, #dd6600);
}

.btn-secondary {
    background: linear-gradient(to bottom, #555, #333);
    border-color: #666;
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #666, #444);
}

/* Footer */
.footer {
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    border-top: 2px solid #444;
    padding: 15px 20px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

/* Music Player */
.music-player {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border: 2px solid #555;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.player-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.player-cover {
    width: 100px;
    height: 100px;
    background: #555;
    border: 2px solid #666;
    border-radius: 3px;
    overflow: hidden;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-details h3 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 5px;
}

.player-details p {
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 3px;
}

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

.play-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(to bottom, #ff6600, #cc5500);
    border: 2px solid #ff6600;
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #ff6600, #cc5500);
    width: 0%;
    transition: width 0.1s;
}

.time-display {
    color: #cccccc;
    font-size: 12px;
    min-width: 80px;
    text-align: right;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.volume-control input[type="range"] {
    width: 80px;
    height: 4px;
    background: #333;
    border: 1px solid #555;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #ff6600;
    border-radius: 50%;
    cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #ff6600;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Rating Section */
.rating-section {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(to bottom, #333, #2a2a2a);
    border: 1px solid #444;
    border-radius: 4px;
    text-align: center;
}

.rating-section h4 {
    color: #ff6600;
    margin-bottom: 10px;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.rating-star {
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-star:hover {
    color: #ff6600;
}

/* Related Music */
.related-music {
    margin-top: 30px;
}

.related-title {
    color: #ff6600;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.related-item {
    background: linear-gradient(to bottom, #333, #222);
    border: 1px solid #444;
    border-radius: 3px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.related-item:hover {
    border-color: #ff6600;
    background: linear-gradient(to bottom, #444, #333);
}

/* Playlist Styles */
.playlist-container {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border: 2px solid #555;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.playlist-title {
    color: #ff6600;
    font-size: 20px;
}

.add-music-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-music-form input {
    flex: 1;
    padding: 8px;
    border: 2px solid #555;
    background: #333;
    color: #ffffff;
    border-radius: 3px;
}

.playlist-items {
    list-style: none;
}

.playlist-item {
    background: #333;
    border: 1px solid #444;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-item:hover {
    background: #444;
    border-color: #555;
}

/* Error Messages */
.error-message {
    background: #660000;
    border: 2px solid #aa0000;
    color: #ffffff;
    padding: 10px;
    border-radius: 3px;
    margin-bottom: 15px;
    text-align: center;
}

.success-message {
    background: #006600;
    border: 2px solid #00aa00;
    color: #ffffff;
    padding: 10px;
    border-radius: 3px;
    margin-bottom: 15px;
    text-align: center;
}

/* Message System */
.message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid;
}

.message.success {
    background: #006600;
    border-color: #00aa00;
    color: #ffffff;
}

.message.error {
    background: #660000;
    border-color: #aa0000;
    color: #ffffff;
}

.message.info {
    background: #003366;
    border-color: #0066aa;
    color: #ffffff;
}

/* Loading States */
.loading {
    text-align: center;
    color: #cccccc;
    padding: 40px;
    font-style: italic;
}

.loading:before {
    content: "Loading...";
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .music-grid {
        grid-template-columns: 1fr;
    }
    
    .music-item-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .music-cover {
        align-self: center;
    }
    
    .player-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .volume-control {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

/* Playlist Styles - 2008 Aesthetic */
.playlist-list {
    margin: 20px 0;
}

.playlist-item {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border: 1px solid #555;
    border-radius: 4px;
    margin: 10px 0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 3px rgba(0,0,0,0.3);
}

.playlist-item:hover {
    background: linear-gradient(to bottom, #4a4a4a, #3a3a3a);
    border-color: #666;
}

.playlist-info {
    flex: 1;
}

.playlist-rating-stars {
    display: inline-block;
    font-size: 24px;
    color: #666;
    margin: 0 10px;
    cursor: pointer;
}

.playlist-title {
    color: #ff6600;
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 5px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.playlist-date {
    color: #cccccc;
    font-size: 12px;
    margin: 0;
    font-style: italic;
}

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

.playlist-actions .btn {
    min-width: 80px;
    padding: 8px 15px;
    font-size: 12px;
}

.btn-primary {
    background: linear-gradient(to bottom, #0066cc, #004499);
    border-color: #004499;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #0077dd, #0055aa);
}

.btn-danger {
    background: linear-gradient(to bottom, #cc4444, #aa2222);
    border-color: #992222;
}

.btn-danger:hover {
    background: linear-gradient(to bottom, #dd5555, #bb3333);
    border-color: #aa3333;
}

.playlist-sidebar {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border: 1px solid #555;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 3px rgba(0,0,0,0.3);
}

.playlist-sidebar h3 {
    color: #ff6600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.playlist-songs {
    max-height: 400px;
    overflow-y: auto;
}

.playlist-song {
    background: linear-gradient(to bottom, #333, #2a2a2a);
    border: 1px solid #444;
    border-radius: 3px;
    margin: 4px 0;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.playlist-song:hover {
    background: linear-gradient(to bottom, #444, #333);
    border-color: #555;
}

.playlist-song.current-song {
    background: linear-gradient(to bottom, #ff6600, #cc5500);
    border-color: #aa4400;
    color: #000;
    font-weight: bold;
}

.playlist-song.current-song:hover {
    background: linear-gradient(to bottom, #ff7700, #dd5500);
}

.playlist-song-container {
    position: relative;
}

.song-title {
    cursor: pointer;
    display: inline-block;
    width: 60%;
}

.song-controls {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 3px 8px;
    font-size: 11px;
    background: linear-gradient(to bottom, #555, #333);
    border: 1px solid #444;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
    min-width: 25px;
    text-align: center;
}

.btn-small:hover {
    background: linear-gradient(to bottom, #666, #444);
    border-color: #555;
}

.btn-small.btn-move-up,
.btn-small.btn-move-down {
    background: linear-gradient(to bottom, #4a7c4a, #2a5a2a);
    border-color: #3a6a3a;
}

.btn-small.btn-move-up:hover,
.btn-small.btn-move-down:hover {
    background: linear-gradient(to bottom, #5a8c5a, #3a6a3a);
}

.btn-small.btn-remove {
    background: linear-gradient(to bottom, #aa4444, #882222);
    border-color: #772222;
    font-weight: bold;
}

.btn-small.btn-remove:hover {
    background: linear-gradient(to bottom, #bb5555, #993333);
}
