:root {
    --bg-color: #ffffff;
    --text-main: #000000;
    --text-muted: #888888;
    --border-color: #e5e5e5;
    --hover-bg: #f9f9f9;
    --font-serif: 'Inter', sans-serif; /* Simplified to sans-serif */
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.search-panel {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

header {
    margin-bottom: 40px;
}

header h1 {
    font-weight: 600;
    font-size: 2.5rem;
    margin: 0 0 8px 0;
    letter-spacing: -0.03em;
}

header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.search-box {
    margin-bottom: 30px;
}

input[type="text"] {
    width: 100%;
    padding: 16px 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease;
}

input[type="text"]::placeholder {
    color: #cccccc;
}

input[type="text"]:focus {
    border-bottom-color: var(--text-main);
}

.results-grid {
    display: flex;
    flex-direction: column;
}

.result-card {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.result-card:hover, .result-card.selected {
    background-color: var(--hover-bg);
}

.song-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.song-title {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.lyrics-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    min-width: 400px;
    height: 100vh;
    background: var(--bg-color);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.lyrics-panel.open {
    transform: translateX(0);
}

.lyrics-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-header {
    padding: 30px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-header h2 {
    font-weight: 600;
    margin: 0;
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 16px;
}

.header-actions {
    display: flex;
    gap: 16px;
}

.btn-action {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-action:hover {
    color: var(--text-main);
}

.lyrics-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
}

.lyrics-text {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-main);
    margin: 0;
    white-space: pre-wrap;
}

.lrc-timestamp {
    color: #cccccc;
    font-size: 0.8em;
    margin-right: 24px;
    user-select: none;
    display: inline-block;
    width: 60px;
}

.lrc-line {
    display: block;
    padding: 4px 0;
}

.lrc-line:hover {
    background-color: var(--hover-bg);
}

/* Scrollbar minimale */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #e5e5e5;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}

@media (max-width: 800px) {
    .app-layout {
        flex-direction: column;
    }
    
    .search-panel {
        width: 100%;
        padding: 40px 20px;
    }
    
    .lyrics-panel {
        width: 100%;
        min-width: 100%;
        border-left: none;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    }
    
    .panel-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .lyrics-container {
        padding: 20px;
    }
    
    .lrc-timestamp {
        display: none;
    }
}

/* Thème sombre automatique */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-main: #eaeaea;
        --text-muted: #a0a0a0;
        --border-color: #333333;
        --hover-bg: #1e1e1e;
    }
    
    /* Assombrir le placeholder en mode sombre */
    input[type="text"]::placeholder {
        color: #555555;
    }
    
    /* Ajuster la scrollbar pour le mode sombre */
    ::-webkit-scrollbar-thumb {
        background: #444444;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #666666;
    }
}