/* sons/css/audio_style.css - VERSÃO FINAL OTIMIZADA */

/* --- 1. LAYOUT GERAL --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Verdana, sans-serif;
    background-color: #121212;
    background-image: url('../../settings/bg.jpg'); 
    background-size: cover;
    background-attachment: fixed;
    color: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Fixo */
header, nav, .header, .navbar, .top-bar, #header, .nav-bar {
    position: sticky !important;
    top: 0;
    z-index: 10000;
    flex-shrink: 0;
    width: 100%;
}

.main-content-area {
    flex: 1;
    width: 100%;
    padding-bottom: 50px;
    margin-top: 40px; 
}

.main-content-area *, .container, .container * {
    box-sizing: border-box;
}

/* --- 2. CONTAINER E COMPONENTES BÁSICOS --- */
.container {
    max-width: 1200px;
    margin: 40px auto 40px auto;
    background: linear-gradient(135deg, rgba(0,0,0, 0.9) 0%, rgba(0,0,0, 0.95) 100%);    
    border-radius: 20px;
    padding: 30px;
    border: 2px solid #ff5000;  
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: visible;
}

.section-header { 
    margin-bottom: 20px; 
    border-bottom: 1px solid #333; 
    padding-bottom: 10px; 
}
.section-header h2 { color: #ff5000; font-size: 24px; margin: 0 0 5px 0; }
.section-header p { color: #888; font-size: 12px; margin: 0; }

/* Botões */
.btn-play-row { 
    background: #ff5000; color: white; padding: 5px 10px; border-radius: 4px;
    font-weight: bold; font-size: 11px; cursor: pointer; border: none;
    transition: background 0.2s; display: inline-flex; align-items: center;
    justify-content: center; gap: 5px; min-width: 80px;
}
.btn-play-row:hover { background: #ff6520; }

.btn-download-row { 
    background: #1a1a1a; color: #aaa; border: 1px solid #444;
    padding: 5px 10px; border-radius: 4px; font-size: 11px; text-decoration: none;
    transition: all 0.2s; display: inline-flex; align-items: center;
    justify-content: center; gap: 5px;
}
.btn-download-row:hover { background: #2a2a2a; border-color: #ff5000; color: #fff; }

.btn-back-link {
    display: inline-block; color: #888; text-decoration: none;
    margin-bottom: 5px; font-size: 12px; transition: color 0.2s;
}
.btn-back-link:hover { color: #ff5000; }

/* --- 3. DATATABLES (LISTA PRINCIPAL) --- */
table.dataTable { width: 100% !important; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
table.dataTable.no-footer { border-bottom: none; }
.dataTables_filter { display: none !important; } /* Esconde busca nativa */

/* Header e Rows */
table.dataTable thead th {
    background-color: #2a1a10; padding: 18px 10px; font-size: 14px;
    text-transform: uppercase; color: #ff9045; border-bottom: 2px solid #ff5000;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.dataTable tbody tr.data-row { background-color: rgba(255, 255, 255, 0.03); transition: background 0.2s; }
table.dataTable tbody tr.data-row:hover { background-color: rgba(255, 80, 0, 0.15); }
table.dataTable td { padding: 15px 10px; vertical-align: middle; border-bottom: 1px solid #333; color: #ddd; font-size: 14px; overflow: hidden; }

/* Colunas Específicas */
.cmd-cell { min-width: 120px; }
.cmd-primary { font-size: 16px; font-weight: bold; color: #fff; margin-bottom: 6px; word-break: break-word; line-height: 1.3; }
.cmd-aliases { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.alias-tag { display: inline-block; font-size: 10px; background: #333; color: #ccc; padding: 2px 6px; border-radius: 3px; border: 1px solid #555; white-space: nowrap; }
.cmd-link { text-decoration: none; display: block; }
.cmd-link:hover .cmd-primary { color: #ff5000; }

/* Controles DataTables */
.dataTables_wrapper { overflow-x: auto; }
.dataTables_length select { background-color: #1a1a1a !important; color: #fff !important; border: 1px solid #ff5000 !important; border-radius: 4px; padding: 5px 10px; }
.dataTables_length label, .dataTables_info { color: #888 !important; }
.dataTables_paginate { margin-top: 15px; }
.dataTables_paginate .paginate_button {
    padding: 8px 12px !important; margin: 0 2px;
    background: #2a1a10 !important; border: 1px solid #ff5000 !important;
    color: #ff9045 !important; border-radius: 4px;
}
.dataTables_paginate .paginate_button:hover, .dataTables_paginate .paginate_button.current {
    background: #ff5000 !important; color: #fff !important;
}

/* --- 4. DASHBOARD (SOUNDINFO.PHP) --- */

/* Cards Gerais */
.info-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.card-title {
    color: #ff5000;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Grid Superior (3 Colunas) */
.info-top-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.title-card h1 { margin: 10px 0 5px 0; font-size: 32px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.rating-card { align-items: center; justify-content: center; text-align: center; }
.rating-card h3 { margin: 0 0 10px 0; font-size: 14px; color: #ff9045; }
.rating-box-large { font-size: 32px; margin-bottom: 10px; }
.rating-avg { font-size: 12px; color: #888; }

.fav-card { align-items: center; justify-content: center; text-align: center; }
.fav-big-wrapper {
    cursor: pointer;
    background: rgba(0,0,0,0.4);
    border: 1px solid #444; /* Borda normal 1px */
    padding: 8px 16px;      /* Padding normal */
    border-radius: 20px;
    transition: all 0.1s ease; /* Transição rápida */
    display: flex; align-items: center; gap: 8px;
    color: #fff;
}
.fav-big-wrapper:hover {
    border-color: #ff5000;
}

.fav-big-wrapper.active {
    /* Fundo solicitado: 255, 100, 100, 0.2 */
    background-color: rgba(255, 100, 100, 0.2) !important;
    
    /* Borda Branca 3px */
    border: 3px solid #fff !important;
    
    /* Texto Amarelo #fd0 */
    color: #fd0 !important;
    
    /* Ajuste de padding para compensar a borda mais grossa (3px vs 1px = 2px diferença) */
    padding: 6px 14px !important;
}

.fav-big-wrapper.active i, 
.fav-big-wrapper.active span {
    color: #fd0 !important;
    font-weight: bold;
}

.fav-big-wrapper i.active { color: #ff5000; }
.fav-big-wrapper span { font-size: 13px; font-weight: bold; }

.fav-names-list {
    display: block !important;
    min-height: 20px; /* Garante altura */
    color: #999;      /* Cor visível */
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    text-align: center;
    width: 100%;
	font-size: 10px;
}
.fav-names-list strong { color: #fff; font-weight: normal; }
.fav-names-list .more-link { color: #ff5000; font-weight: bold; cursor: help; text-decoration: none; border-bottom: 1px dotted #ff5000; }

/* Grid Inferior (2 Colunas) */
.info-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Esquerda: Descrição + Arquivos */
.body-left { display: flex; flex-direction: column; gap: 20px; }
.description-card { border-left: 4px solid #ff5000; min-height: 100px; justify-content: center; position: relative; }
.icon-quote { position: absolute; top: 10px; right: 15px; font-size: 24px; color: rgba(255,255,255,0.1); }
.description-card p { font-size: 15px; line-height: 1.6; color: #eee; margin: 0; }

.files-list-wrapper { display: flex; flex-direction: column; gap: 10px; }
.file-row-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(0,0,0,0.3); padding: 12px 15px;
    border-radius: 6px; border: 1px solid #222;
}
.file-name { font-weight: bold; color: #ccc; }
.file-actions { display: flex; gap: 10px; }

/* Direita: Comentários */
.body-right { height: 100%; }
.info-card.comments-card {
    background: rgba(255, 80, 0, 0.08) !important; 
    border: 1px solid rgba(255, 80, 0, 0.3) !important;
    height: 100%; min-height: 500px;
}

.comments-list-large {
    flex: 1; overflow-y: auto; max-height: 600px; margin-bottom: 20px; padding-right: 10px;
}
.comments-list-large::-webkit-scrollbar { width: 6px; }
.comments-list-large::-webkit-scrollbar-track { background: #111; }
.comments-list-large::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.comment-item {
    background: rgba(0, 80, 255, 0.1) !important;
    border: 1px solid rgba(255, 80, 0, 0.3) !important;
    border-radius: 6px; margin-bottom: 10px; padding: 12px;
    display: flex; flex-direction: column; gap: 10px;
}
.comment-header { display: flex; align-items: center; gap: 12px; }
.comment-avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author { color: #ff9045; font-weight: bold; font-size: 13px; }
.comment-date { color: #666; font-size: 10px; }
.comment-text { color: #ddd; font-size: 14px; line-height: 1.4; }
.comment-actions { margin-top: 5px; display: flex; gap: 15px; font-size: 11px; color: #666; }
.comment-actions span { cursor: pointer; font-weight: bold; }
.comment-actions span:hover { color: #ff5000; }

.replies-container { margin-left: 15px; margin-top: 15px; padding-left: 15px; border-left: 2px solid #333; }

/* Formulário de Comentário Fixo */
.comment-form-fixed {
    margin-top: auto; display: flex; flex-direction: column; gap: 10px;
    border-top: 1px solid #333; padding-top: 15px;
}
.comment-form-fixed textarea {
    background: #121212; border: 1px solid #444; color: #fff;
    padding: 10px; border-radius: 4px; resize: vertical; min-height: 60px;
}
.comment-form-fixed button {
    background: #ff5000; color: white; border: none; padding: 10px;
    border-radius: 4px; font-weight: bold; cursor: pointer;
}
.comment-form-fixed button:hover { background: #ff6520; }
.login-warn { text-align: center; padding: 15px; background: rgba(0,0,0,0.3); border-radius: 6px; color: #aaa; font-size: 12px; margin-top: auto; }

/* --- 5. COMPONENTES DE INTERAÇÃO --- */

/* Estrelas */
.stars-display { color: #ffc107; font-size: 14px; }
.rating-interactive { color: #444 !important; transition: all 0.2s; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.rating-interactive.selected, .rating-interactive.hovered { color: #ffc107 !important; transform: scale(1.1); }

/* Tooltips */
.like-wrapper { position: relative; display: inline-block; }
.custom-tooltip {
    position: absolute; bottom: 25px; left: 0;
    background-color: rgba(0, 0, 0, 0.95); color: #fff;
    padding: 8px 10px; border-radius: 4px; font-size: 11px; line-height: 1.5;
    border: 1px solid #333; white-space: nowrap; text-align: left; min-width: 100px;
    z-index: 9999; box-shadow: 0 4px 12px rgba(0,0,0,0.8); pointer-events: none;
    opacity: 0; animation: fadeInTooltip 0.2s forwards;
}
.custom-tooltip div { display: block; }
.custom-tooltip .more-count { color: #aaa; margin-top: 4px; padding-top: 4px; border-top: 1px solid #333; font-weight: bold; }
.custom-tooltip::after {
    content: ""; position: absolute; top: 100%; left: 10px; margin-left: -5px;
    border-width: 5px; border-style: solid; border-color: rgba(0,0,0,0.95) transparent transparent transparent;
}
@keyframes fadeInTooltip { to { opacity: 1; bottom: 30px; } }

/* Search Dropdown */
.search-container { position: relative; }
.quick-search-dropdown {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: #121212; border: 1px solid #333; border-radius: 8px; margin-top: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9); z-index: 10000;
    max-height: 400px; overflow-y: auto; display: none;
}
#qs-clear-btn {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    color: #666; cursor: pointer; z-index: 10001; font-size: 14px;
    display: none; transition: color 0.2s;
}
#qs-clear-btn:hover { color: #ff5000; }

.qs-item { display: flex; flex-direction: column; padding: 12px; border-bottom: 1px solid #222; transition: background 0.2s; }
.qs-item:hover { background: #1a1a1a; }
.qs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.qs-cmd-name { font-weight: bold; color: #ff5000; font-size: 14px; text-decoration: none; }
.qs-cmd-name:hover { text-decoration: underline; }
.qs-stats { font-size: 11px; color: #888; display: flex; gap: 10px; }
.qs-stats i { margin-right: 3px; } .qs-stats .fa-heart { color: #555; } .qs-stats .fa-star { color: #ffc107; }
.qs-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.qs-btn-play {
    background: #333; border: 1px solid #444; color: #ddd; padding: 4px 10px;
    font-size: 10px; border-radius: 3px; cursor: pointer; display: flex; align-items: center;
    gap: 5px; transition: all 0.2s;
}
.qs-btn-play:hover, .qs-btn-play.playing { background: #ff5000; color: #fff; border-color: #ff5000; }

/* Mini Player Sticky */
#mini-player-container {
    position: fixed; bottom: -100px; left: 0; width: 100%; height: 60px;
    background: rgba(18, 18, 18, 0.95); border-top: 2px solid #ff5000;
    display: flex; align-items: center; padding: 0 20px; z-index: 12000;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}
#mini-player-container.show { bottom: 0; }
.mp-controls { display: flex; align-items: center; gap: 15px; width: 100%; max-width: 1200px; margin: 0 auto; }
.mp-btn-play {
    background: none; border: none; color: #fff; font-size: 24px; cursor: pointer;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}
.mp-btn-play:hover { color: #ff5000; }
.mp-info { display: flex; flex-direction: column; width: 200px; white-space: nowrap; overflow: hidden; }
.mp-title { font-weight: bold; color: #ff5000; font-size: 14px; text-overflow: ellipsis; overflow: hidden; }
.mp-time-display { font-size: 11px; color: #aaa; font-family: monospace; }
.mp-progress-container { flex: 1; display: flex; align-items: center; margin: 0 20px; }
input[type=range].mp-slider { -webkit-appearance: none; width: 100%; height: 4px; background: #444; border-radius: 2px; outline: none; cursor: pointer; }
input[type=range].mp-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 12px; height: 12px; background: #ff5000;
    border-radius: 50%; cursor: pointer; transition: transform 0.1s;
}
input[type=range].mp-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }

/* --- 6. UTILITÁRIOS VISIBILIDADE --- */
.mobile-only { display: none !important; }
.desktop-only { display: table-cell !important; }
.mobile-stats-summary { display: none; margin-top: 8px; font-size: 11px; color: #aaa; padding-top: 6px; border-top: 1px solid #333; }

/* Responsividade Geral */
@media (max-width: 850px) {
    .container { padding: 15px; width: 95%; margin: 20px auto; }
    .info-top-grid { grid-template-columns: 1fr; gap: 15px; }
    .info-body-grid { grid-template-columns: 1fr; }
    .comments-card { min-height: auto; }
}

@media (max-width: 650px) {
    .container { padding: 10px !important; width: 98% !important; margin: 0 auto 20px auto !important; border: none; box-shadow: none; }
    .section-header h2 { font-size: 18px; text-align: center; }
    /* DataTables Mobile */
    table.dataTable thead { display: none !important; }
    table.dataTable tbody tr.data-row { display: flex !important; flex-direction: row; justify-content: space-between; align-items: center; border-bottom: 1px solid #333; padding: 10px 5px !important; gap: 10px; }
    table.dataTable tbody td.cmd-cell { display: block !important; width: auto !important; flex: 1; border: none !important; padding: 0 !important; }
    .cmd-primary { font-size: 15px !important; margin-bottom: 4px; }
    .mobile-stats-summary { display: block !important; }
    table.dataTable tbody td:nth-child(5) { display: flex !important; width: auto !important; flex: 0 0 auto; border: none !important; padding: 0 !important; justify-content: flex-end; }
    .file-list { justify-content: flex-end; flex-direction: column; align-items: flex-end; gap: 5px; width: auto; }
    .btn-play-row { padding: 8px 12px; font-size: 12px; width: auto; margin: 0; }
    table.dataTable tbody td:nth-child(2), table.dataTable tbody td:nth-child(3), table.dataTable tbody td:nth-child(4) { display: none !important; }
}