/*
 * The Power Radio - Styles Optimisés
 * Version: 2.0 Optimized
 * Remplace: Tailwind CDN + styles inline
 * Poids: ~15KB (vs 300KB+ avec Tailwind CDN)
 */

/* ==========================================
   FONTS & BASE
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex-grow: 1;
}

/* ==========================================
   UTILITY CLASSES (Tailwind Replacements)
   ========================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.gap-6 { gap: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-7xl { max-width: 80rem; }

.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }

.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.text-white { color: white; }
.text-yellow-400 { color: #f6e05e; }
.text-red-500 { color: #ef4444; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }

.bg-gradient-yellow-red {
    background: linear-gradient(to right, #f6e05e, #ef4444);
}

.bg-gradient-gray {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.bg-gradient-to-br {
    background: linear-gradient(to bottom right, #111827, #1f2937);
}

.transition { transition: all 0.2s ease; }

.overflow-y-auto { overflow-y: auto; }
.overflow-hidden { overflow: hidden; }

.hidden { display: none; }

/* Padding & Margin */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-8 { margin-top: 2rem; }
.mr-2 { margin-right: 0.5rem; }

/* ==========================================
   HEADER
   ========================================== */
header {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo-header {
    width: 280px;
    height: auto;
    max-width: 100%;
}

header nav a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

header nav a:hover,
header nav a:focus {
    color: #f6e05e;
    outline: none;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
main {
    padding: 2rem 1rem;
}

.main-content-section {
    width: 100%;
    max-width: 80rem;
    background: linear-gradient(to bottom right, #1f2937, #111827);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: #f6e05e;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #f6e05e;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ef4444;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ==========================================
   ALBUM ART & PLAYER
   ========================================== */
.album-art {
    width: 250px;
    height: 250px;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 0.75rem;
}

.album-art:hover {
    transform: scale(1.03);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
}

.player-btn {
    transition: all 0.2s ease;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #f6e05e, #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.player-btn:hover,
.player-btn:focus {
    transform: scale(1.1);
    outline: none;
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.2);
}

.player-btn i {
    font-size: 3.5rem;
}

/* ==========================================
   NOW PLAYING
   ========================================== */
#rbcloud_np_a296 {
    font-weight: bold;
    font-size: 2rem !important;
    color: white;
}

#rbcloud_np_t296 {
    font-size: 1.75rem !important;
    color: #cbd5e1;
}

.rbcloud_tracktimer {
    font-size: 2rem;
    color: #a0a7b3;
    font-weight: 600;
    margin-top: 0.5rem;
    text-align: center;
    min-width: 100px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.now-playing {
    animation: pulse 2s infinite;
}

/* ==========================================
   VOLUME CONTROL
   ========================================== */
.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #4a5568;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 2px;
}

.volume-slider:hover {
    opacity: 1;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(to right, #f6e05e, #ef4444);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(to right, #f6e05e, #ef4444);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: none;
}

#volume-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* ==========================================
   NEXT TRACK
   ========================================== */
.rbcloud_nexttrack {
    background-color: #2d3748;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.rbcloud_nexttrack img {
    border-radius: 0.375rem;
}

.rbcloud_nexttrack div:nth-child(2) > div:first-child {
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 0.25rem;
}

.rbcloud_nexttrack div:nth-child(2) > div:last-child {
    font-size: 1rem;
    color: #a0a7b3;
}

/* ==========================================
   SONG REQUEST
   ========================================== */
.rbcloud_songrequest {
    font-family: 'Poppins', sans-serif;
    color: white;
}

.rbcloud_songrequest .rbc_search {
    display: flex;
    gap: 10px;
}

.rbcloud_songrequest input,
.rbcloud_songrequest button {
    box-sizing: border-box;
    height: 48px;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.rbcloud_songrequest input {
    padding: 0.75rem 1rem;
    border: 1px solid #4a5568;
    flex: 1;
    background-color: #2d3748;
    color: white;
    outline: none;
}

.rbcloud_songrequest input:focus {
    border-color: #f6e05e;
}

.rbcloud_songrequest button {
    padding: 0.75rem 1.5rem;
    min-width: 120px;
    background: linear-gradient(to right, #f6e05e, #ef4444);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.rbcloud_songrequest button:hover {
    opacity: 0.9;
}

.rbcloud_songrequest .rbc_result {
    border: 1px solid #4a5568;
    display: none;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: rgba(45, 55, 72, 0.7);
    border-radius: 0.5rem;
}

.rbcloud_songrequest .rbc_result_item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.rbcloud_songrequest .rbc_result_item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.rbcloud_songrequest .rbc_result_item:not(:last-child) {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #4a5568;
}

.rbcloud_songrequest .rbc_result_item div:first-child {
    flex: 1;
    word-break: break-word;
    padding-right: 0.5rem;
}

/* ==========================================
   RECENT TRACKS
   ========================================== */
.history-item {
    transition: all 0.2s ease;
}

.history-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   SPOTIFY LINKS
   ========================================== */
.spotify-link {
    margin-left: 8px !important;
    display: inline-block !important;
    transition: opacity 0.2s ease !important;
    text-decoration: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 100 !important;
}

.spotify-link:hover {
    opacity: 0.7 !important;
}

.spotify-link img {
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle !important;
    display: inline-block !important;
}

/* ==========================================
   SEO CONTENT
   ========================================== */
.seo-content {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.seo-content h2 {
    color: #f6e05e;
    margin-bottom: 1rem;
}

.seo-content h3 {
    color: #ef4444;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.seo-content ul {
    margin-left: 1.5rem;
    list-style: disc;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.seo-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ==========================================
   MUSIC NEWS
   ========================================== */
#music-news-section {
    margin-top: 2rem;
}

#news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.news-card {
    display: block;
    background: rgba(31, 41, 55, 0.5);
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.news-card:hover {
    background: rgba(31, 41, 55, 0.75);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 2rem;
    margin-top: auto;
}

.logo-footer {
    height: 100px;
    width: auto;
}

footer a {
    color: #9ca3af;
    transition: color 0.2s ease;
    text-decoration: none;
}

footer a:hover,
footer a:focus {
    color: #f6e05e;
}

/* ==========================================
   SCROLLBAR
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */
@media (max-width: 767px) {
    .player-btn {
        width: 80px;
        height: 80px;
    }

    .player-btn i {
        font-size: 2.5rem;
    }

    .album-art {
        width: 200px;
        height: 200px;
    }

    .main-content-section {
        max-width: 90%;
        padding: 1.5rem;
    }

    .rbcloud_songrequest .rbc_search {
        flex-direction: column;
    }

    .rbcloud_songrequest button {
        width: 100%;
        min-width: unset;
    }

    .rbcloud_tracktimer {
        font-size: 1.5rem;
        margin-top: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    #rbcloud_np_a296 {
        font-size: 1.5rem !important;
    }

    #rbcloud_np_t296 {
        font-size: 1.25rem !important;
    }

    header nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    #news-container {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .logo-header {
        width: 400px;
    }

    .logo-footer {
        height: 120px;
    }

    header nav {
        display: flex;
    }

    .mobile-menu-btn {
        display: none;
    }

    main {
        padding: 2rem;
    }

    .px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ==========================================
   LOADING STATES
   ========================================== */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

button:focus,
a:focus {
    outline: 2px solid #f6e05e;
    outline-offset: 2px;
}

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================== */
img {
    content-visibility: auto;
}

.main-content-section {
    contain: layout style;
}
