/* 
 * ⚠️ CRITICAL PROTECTION - DO NOT MODIFY WITHOUT AUTHORIZATION
 * Owner: Petefrans01
 * Project: Christian Songs Search
 * 
 * RULES:
 * 1. DO NOT enable Format On Save
 * 2. DO NOT modify white-space properties
 * 3. DO NOT remove !important declarations
 * 4. DO NOT use auto-formatters (Prettier, Beautify, etc.)
 * 
 * See CODE-PROTECTION.md for details
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    min-height: 80vh;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Boutons de don */
.donation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem auto 1.5rem auto;
    flex-wrap: wrap;
    max-width: 600px;
}

.donate-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.paypal-btn {
    background: linear-gradient(135deg, #0070ba, #1546a0);
    color: white;
}

.paypal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,112,186,0.3);
}

.stripe-btn {
    background: linear-gradient(135deg, #635bff, #4d46d6);
    color: white;
}

.stripe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(99,91,255,0.3);
}

.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#searchInput {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#searchBtn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#searchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#searchBtn:active {
    transform: translateY(0);
}

.results-count {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.results-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.song-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.song-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.song-card .author {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.song-card .language {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.song-card .preview {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-detail {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.song-detail.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ff4757;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #ff3838;
    transform: scale(1.05);
}

#songTitle {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 2rem;
    padding-right: 80px;
}

.song-author {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.song-language {
    color: #888;
    font-size: 1rem;
    margin-bottom: 25px;
    font-style: italic;
}

/* DO NOT MODIFY — Required for lyrics formatting */
.song-lyrics {
    white-space: pre-line !important;
    line-height: 1.6;
    color: #333;
    font-size: 1.05rem;
    word-wrap: break-word;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    max-height: none;
    overflow-y: visible;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-stats {
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    opacity: 0.95;
}

.footer-support {
    font-size: 1.1rem;
    margin: 15px 0;
    font-weight: 500;
}

.footer-support a {
    color: #fff59d;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #fff59d;
    transition: all 0.3s ease;
}

.footer-support a:hover {
    color: white;
    border-bottom-color: white;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .search-section {
        flex-direction: column;
    }

    #searchInput, #searchBtn {
        width: 100%;
    }

    .results-section {
        grid-template-columns: 1fr;
    }

    .song-detail {
        width: 95%;
        padding: 20px;
        padding-top: 60px;
        max-height: 90vh;
        overflow-y: auto;
    }

    #songTitle {
        font-size: 1.5rem;
        padding-right: 60px;
    }
    
    .song-lyrics {
        white-space: pre-line !important;
        font-size: 1rem;
        padding: 15px;
        line-height: 1.6;
        max-height: none;
    }
    
    .close-btn {
        top: 15px;
        right: 15px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* ============================================
   MODE SOMBRE
   ============================================ */

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .container {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-mode header h1 {
    color: #8ab4f8;
}

body.dark-mode header p {
    color: #b8b8b8;
}

body.dark-mode .search-section input {
    background: #1a1a2e;
    color: #e0e0e0;
    border-color: #8ab4f8;
}

body.dark-mode .search-section input::placeholder {
    color: #888;
}

body.dark-mode .search-section button {
    background: linear-gradient(135deg, #8ab4f8 0%, #5f9df7 100%);
}

body.dark-mode .song-card {
    background: #1a1a2e;
    border-color: #8ab4f8;
    color: #e0e0e0;
}

body.dark-mode .song-card:hover {
    background: #16213e;
    box-shadow: 0 10px 30px rgba(138, 180, 248, 0.3);
}

body.dark-mode .song-card h3 {
    color: #8ab4f8;
}

body.dark-mode .song-detail {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-mode #songTitle {
    color: #8ab4f8;
}

body.dark-mode .results-count {
    color: #b8b8b8;
}

body.dark-mode .no-results {
    color: #b8b8b8;
}

body.dark-mode footer {
    background: #1a1a2e;
}

body.dark-mode select {
    background: #1a1a2e !important;
    color: #e0e0e0 !important;
    border-color: #8ab4f8 !important;
}

/* Améliorer les boutons en mode sombre */
body.dark-mode button {
    background: #1a1a2e;
    color: #e0e0e0;
    border-color: #8ab4f8;
}

body.dark-mode button:hover {
    background: #16213e;
}

