:root {
    --mai-primary: #0073aa;
    --mai-success: #28a745;
    --mai-bg-light: #f8f9fa;
    --mai-border: #e9ecef;
}

.mai-saas-container {
    max-width: 900px; margin: 0 auto; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; position: relative;
    box-sizing: border-box;
}
.mai-saas-container * { box-sizing: border-box; }

/* --- HEADER & BALANCE --- */
.mai-header-bar {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; padding: 15px; border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); margin-bottom: 20px;
}
.mai-balance-info {
    font-size: 15px; color: #555; background: #f8f9fa; padding: 8px 16px;
    border-radius: 50px; border: 1px solid #e9ecef; display: inline-flex; align-items: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}
.mai-balance-info strong {
    color: #ff3b30; font-weight: 800; margin-left: 6px; font-size: 16px; letter-spacing: 0.5px;
}
.mai-btn-topup {
    background: #ffc107; color: #333; padding: 10px 20px; border-radius: 50px;
    text-decoration: none !important; font-weight: 800; font-size: 14px; transition: 0.3s;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}
.mai-btn-topup:hover { background: #ffca2c; transform: translateY(-2px); }

/* --- CREATOR BOX --- */
.mai-creator-box {
    background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); padding: 25px; margin-bottom: 30px;
}
.mai-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.mai-tab {
    background: transparent; border: none; padding: 10px 15px;
    font-size: 16px; font-weight: 600; color: #666; cursor: pointer;
    border-bottom: 3px solid transparent; transition: 0.3s;
}
.mai-tab.active { color: var(--mai-primary); border-bottom-color: var(--mai-primary); }
.mai-tab-content { display: none; }
.mai-tab-content.active { display: block; animation: fadeIn 0.3s; }

.mai-input-area, .mai-input-text {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; transition: 0.3s;
}
.mai-input-area:focus, .mai-input-text:focus { border-color: var(--mai-primary); outline: none; }
.mai-row { display: flex; gap: 15px; margin-bottom: 15px; }
.mai-col-half { width: 50%; }

.mai-section-title {
    font-size: 14px; font-weight: 700; color: #333; margin-bottom: 8px; 
    display: flex !important; align-items: center; white-space: nowrap;
}
.mai-char-count { font-size: 11px; color: #999; text-align: right; margin-top: 2px; }

.mai-lyrics-header-row {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.mai-btn-magic {
    background: linear-gradient(135deg, #c432ce, #ee3d7b);
    color: #fff; border: none; padding: 5px 12px;
    font-size: 12px; font-weight: 600; border-radius: 15px;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    box-shadow: 0 2px 8px rgba(196, 50, 206, 0.25); transition: 0.2s;
    white-space: nowrap; flex-shrink: 0;
}
.mai-btn-magic:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196, 50, 206, 0.4); }
.mai-btn-magic .dashicons { font-size: 14px; width: 14px; height: 14px; line-height: 14px; }

/* --- TAGS & CHIPS --- */
.mai-tag-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; margin-bottom: 15px; }
.mai-tag-option {
    padding: 6px 14px; border: 1px solid #ddd; border-radius: 20px; font-size: 13px; color: #555; background: #f9f9f9; cursor: pointer; transition: 0.2s; user-select: none;
}
.mai-tag-option:hover { background: #eee; }
.mai-tag-option.selected {
    background: var(--mai-primary); color: #fff; border-color: var(--mai-primary); font-weight: 600; box-shadow: 0 2px 5px rgba(0,115,170,0.3);
}

.mai-style-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mai-refresh-btn { background: none; border: none; color: var(--mai-primary); cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.mai-style-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.mai-style-chip {
    background: #f0f2f5; color: #333; padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer; border: 1px solid transparent; transition: 0.2s; user-select: none;
}
.mai-style-chip:hover { background: #e4e6eb; }
.mai-style-chip.selected { background: #e7f5ff; color: #0073aa; border-color: #0073aa; font-weight: 600; }

.mai-tone-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.mai-tone-chip {
    background: #fff; border: 1px solid #ced4da; color: #495057;
    padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: 0.2s; user-select: none; display: inline-flex; align-items: center; gap: 6px;
}
.mai-tone-chip:hover { background: #e9ecef; border-color: #adb5bd; }
.mai-tone-chip.selected {
    background: #fff3cd; color: #856404; border-color: #ffeeba; font-weight: 700; box-shadow: 0 2px 5px rgba(255, 193, 7, 0.3);
}

/* --- UPLOAD ZONE --- */
.mai-upload-zone {
    border: 2px dashed #ced4da; border-radius: 12px; padding: 30px 20px;
    text-align: center; background: #f8f9fa; cursor: pointer; transition: 0.3s;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mai-upload-zone:hover { background: #fff; border-color: var(--mai-primary); }
.mai-upload-zone.highlight { border-color: var(--mai-success); background: #e6fffa; }
.mai-upload-icon { font-size: 40px; color: #adb5bd; margin-bottom: 15px; display: block; }
.mai-upload-text { font-size: 14px; color: #666; font-weight: 600; }
.mai-upload-hint { font-size: 12px; color: #999; margin-top: 5px; }
#mai-upload-preview { margin-top: 15px; width: 100%; }

/* --- MAIN ACTIONS --- */
.mai-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 15px; margin-top: 20px; padding-top: 15px; border-top: 1px dashed #eee;
    flex-wrap: wrap;
}
.mai-btn-primary {
    flex: 1 1 auto;
    background: linear-gradient(90deg, #00a8ff, #0097e6);
    color: white; border: none; padding: 12px 25px;
    font-size: 15px; font-weight: 700; border-radius: 50px;
    cursor: pointer; transition: 0.3s; box-shadow: 0 4px 10px rgba(0, 168, 255, 0.3);
    display: flex; align-items: center; justify-content: center; gap: 8px; text-transform: uppercase;
    min-width: 150px;
}
.mai-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0, 168, 255, 0.5); background: linear-gradient(90deg, #0097e6, #00a8ff); }
.mai-btn-primary:disabled { background: #bdc3c7; box-shadow: none; cursor: not-allowed; transform: none; }

.mai-cost-display { font-size: 14px; color: #555; text-align: right; font-style: italic; white-space: nowrap; margin-left: auto; }
.mai-cost-display strong {
    color: #e74c3c; font-weight: 800; font-size: 16px; font-style: normal;
    background: #fff0f0; padding: 2px 6px; border-radius: 4px; border: 1px solid #ffdcdc;
}

/* --- HISTORY & FILTER --- */
.mai-history-section h3 { margin-bottom: 20px; border-left: 5px solid var(--mai-primary); padding-left: 10px; }

/* Filter Bar (ĐÃ FIX LỖI HIỂN THỊ) */
.mai-filter-bar { 
    display: flex; gap: 10px; margin-bottom: 20px; background: #f1f1f1; padding: 15px; 
    border-radius: 8px; align-items: center; width: 100%; 
}
.mai-search-input { 
    flex: 1 1 auto !important; 
    width: 100% !important; /* Fix lỗi input bé tí */
    padding: 10px 10px 10px 35px !important; /* Chừa chỗ cho icon */
    border: 1px solid #ccc !important; 
    border-radius: 4px !important; 
    font-size: 14px !important; 
    height: 42px !important;
    background-color: #fff !important;
    /* Icon kính lúp SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23999' d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center; 
}
.mai-filter-select { 
    flex: 0 0 180px; /* Chiều rộng cố định cho select */
    padding: 0 30px 0 10px !important; 
    border: 1px solid #ccc !important; 
    border-radius: 4px !important; 
    font-size: 14px !important; 
    background-color: #fff !important; 
    cursor: pointer; 
    height: 42px !important;
    -webkit-appearance: none; -moz-appearance: none; appearance: none; 
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); 
    background-repeat: no-repeat; background-position: right .7em top 50%; background-size: .65em auto; 
}

/* History Items */
.mai-song-item { display: flex; background: #fff; border: 1px solid var(--mai-border); border-radius: 10px; padding: 15px; margin-bottom: 15px; align-items: flex-start; transition: 0.3s; }
.mai-song-item:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-color: #d1d1d1; }
.mai-img-wrapper { position: relative; width: 120px; height: 120px; flex-shrink: 0; margin-right: 20px; border-radius: 8px; overflow: hidden; }
.mai-song-img { width: 100%; height: 100%; object-fit: cover; }
.mai-brand-badge { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, #000 80%, rgba(0,0,0,0)); color: #00e676; font-size: 10px; text-align: center; padding: 8px 0 4px 0; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; z-index: 2; }
.mai-song-info { flex-grow: 1; }
.mai-song-header { display: flex; justify-content: space-between; margin-bottom: 10px; align-items: center; }
.mai-song-title { font-size: 18px; font-weight: bold; color: #222; margin: 0; display: flex; align-items: center; }
.mai-song-date { font-size: 12px; color: #999; margin-left: 10px; white-space: nowrap; }
.mai-song-tags { font-size: 13px; color: #666; font-style: italic; margin-bottom: 10px; }
.mai-audio-player { width: 100%; margin-bottom: 10px; border-radius: 8px; }

/* Badges */
.mai-badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; margin-right: 8px; vertical-align: middle; letter-spacing: 0.5px; }
.mai-badge-simple { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.mai-badge-custom { background: #cce5ff; color: #004085; border: 1px solid #b8daff; }
.mai-badge-cover { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.mai-badge-extend { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.mai-badge-video { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.mai-badge-separate { background: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }

/* Actions */
.mai-song-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mai-btn-action { padding: 6px 12px; border-radius: 4px; font-size: 12px; text-decoration: none; font-weight: 600; cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 5px; background: #f0f0f0; color: #333; }
.mai-btn-action:hover { filter: brightness(0.95); }
.mai-btn-dl { background: #e7f5ff; color: #0073aa; border-color: #cce5ff; }
.mai-btn-share { background: #fff3cd; color: #856404; border-color: #ffeeba; }
.mai-btn-lyrics { background: #e2e3e5; color: #383d41; border-color: #d6d8db; }

/* Pagination & Helper */
#mai-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 25px; flex-wrap: wrap; }
#mai-pagination .mai-page-btn { padding: 6px 12px; border: 1px solid #dcdcdc !important; background-color: #fff !important; color: #333 !important; cursor: pointer; border-radius: 4px; font-size: 14px; font-weight: 700; min-width: 35px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
#mai-pagination .mai-page-btn:hover { background-color: #f0f0f0 !important; color: #000 !important; }
#mai-pagination .mai-page-btn.active { background-color: #0073aa !important; color: #fff !important; border-color: #0073aa !important; pointer-events: none; opacity: 1 !important; }

.mai-info-icon { display: inline-block; width: 16px; height: 16px; background: #e9ecef; color: #666; border: 1px solid #ced4da; border-radius: 50%; text-align: center; line-height: 14px; font-size: 11px; font-weight: bold; font-family: serif; cursor: help; margin-left: 6px; position: relative; vertical-align: middle; top: -1px; }
.mai-info-icon:hover { background: #0073aa; color: #fff; border-color: #0073aa; }
.mai-info-icon::after { content: attr(data-tooltip); position: absolute; bottom: 135%; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: normal; font-family: sans-serif; width: max-content; max-width: 220px; text-align: center; visibility: hidden; opacity: 0; transition: 0.2s; z-index: 100; box-shadow: 0 4px 15px rgba(0,0,0,0.2); pointer-events: none; }
.mai-info-icon::before { content: ""; position: absolute; bottom: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #333 transparent transparent transparent; visibility: hidden; opacity: 0; transition: 0.2s; z-index: 100; }
.mai-info-icon:hover::after, .mai-info-icon:hover::before { visibility: visible; opacity: 1; }

.mai-lyrics-container { display: none; margin-top: 15px; padding: 45px 20px 20px 20px; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; position: relative; max-height: 200px; overflow-y: auto; }
.mai-lyrics-container.open { display: block; animation: slideDown 0.3s; }
.mai-copy-lyrics-btn { position: absolute; top: 10px; right: 10px; font-size: 11px; padding: 3px 8px; border: 1px solid #ddd; background: #fff; cursor: pointer; }

.mai-progress-wrapper { display: none; width: 100%; margin: 20px 0; text-align: center; }
.mai-progress-container { width: 100%; background: #f1f1f1; border-radius: 20px; height: 12px; overflow: hidden; }
.mai-progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, #0073aa, #00a0d2); transition: width 0.5s; }
.mai-progress-text { font-size: 14px; font-weight: 600; color: #0073aa; margin-top: 5px; }
#mai-status-msg { display: none; }

.mai-modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); z-index:9999; display:none; }
.mai-modal-box { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background:#fff; width:90%; max-width:400px; border-radius:12px; overflow:hidden; box-shadow:0 10px 25px rgba(0,0,0,0.2); }
.mai-modal-header { padding:12px 15px; background:#f8f9fa; display:flex; justify-content:space-between; border-bottom:1px solid #eee; font-weight:bold; }
.mai-modal-close { border:none; background:none; font-size:20px; cursor:pointer; }
.mai-modal-body { padding:20px; text-align:center; font-size:15px; color:#444; }
.mai-modal-footer { padding:15px; border-top:1px solid #eee; text-align:center; }
.mai-modal-btn-ok { background:#0073aa; color:#fff; border:none; padding:8px 20px; border-radius:20px; cursor:pointer; font-weight:600; }
#mai-toast { visibility: hidden; min-width: 250px; background-color: #333; color: #fff; text-align: center; border-radius: 50px; padding: 12px 20px; position: fixed; z-index: 9999; left: 50%; bottom: 30px; transform: translateX(-50%); box-shadow: 0 5px 15px rgba(0,0,0,0.3); opacity: 0; transition: all 0.3s ease; }
#mai-toast.show { visibility: visible; opacity: 1; bottom: 50px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* MOBILE */
@media (max-width: 600px) {
    .mai-header-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 20px 15px; }
    .mai-balance-info { justify-content: center; width: 100%; box-sizing: border-box; }
    .mai-btn-topup { width: 100%; text-align: center; padding: 12px; }
    .mai-tabs { gap: 5px; }
    .mai-tab { flex: 1; font-size: 13px; padding: 10px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mai-section-title { font-size: 13px; max-width: 60%; }
    .mai-row { flex-direction: column; gap: 0; }
    .mai-col-half { width: 100%; }
    .mai-tag-group, .mai-style-container { display: flex; flex-wrap: wrap; gap: 6px; }
    .mai-tag-option, .mai-style-chip { flex: 1 0 45%; justify-content: center; text-align: center; padding: 10px 5px; margin: 0; max-width: 100%; font-size: 13px; }
    .mai-tone-container { display: grid; grid-template-columns: 1fr; gap: 8px; }
    .mai-tone-chip { width: 100%; justify-content: flex-start; padding: 10px 15px; text-align: left; }
    .mai-tone-chip.toggle-btn { justify-content: center; text-align: center; }
    .mai-actions { flex-direction: row; gap: 10px; align-items: center; justify-content: space-between; }
    .mai-btn-primary { width: auto !important; font-size: 14px; padding: 10px 15px; white-space: nowrap; min-width: 140px; }
    .mai-cost-display { text-align: right; width: auto; font-size: 12px; }
    .mai-song-item { flex-direction: column; padding: 15px; }
    .mai-img-wrapper { width: 100%; height: 200px; margin-right: 0; margin-bottom: 15px; }
    .mai-song-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .mai-btn-action { width: 100%; justify-content: center; padding: 8px 5px; font-size: 12px; }
    .mai-info-icon { display: none; }
    
    /* FIX MOBILE FILTER BAR */
    .mai-filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    .mai-search-input { width: 100% !important; margin-bottom: 5px; }
    .mai-filter-select { width: 100% !important; flex: none; }
}
/* ==========================================================================
   SHOWCASE UI - PREMIUM DARK MODE (Spotify/Suno Style)
   ========================================================================== */

/* 1. Container chính */
.mai-sc-wrapper {
    background-color: #121212; /* Màu nền tối chuẩn */
    color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    font-family: 'Segoe UI', sans-serif;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.mai-sc-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.mai-sc-heading {
    color: #fff !important; /* Ép màu trắng */
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mai-sc-sub {
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

/* 2. Grid Layout (Lưới) */
.mai-sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

/* 3. Music Card (Thẻ bài hát) */
.mai-sc-card {
    background-color: #181818;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #282828;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.mai-sc-card:hover {
    background-color: #282828;
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    border-color: #444;
}

/* 4. Hình ảnh & Overlay nút Play */
.mai-sc-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Tạo khung vuông 1:1 */
    overflow: hidden;
}

.mai-sc-image-container img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mai-sc-card:hover .mai-sc-image-container img {
    transform: scale(1.1); /* Zoom nhẹ khi hover */
}

.mai-sc-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mai-sc-card:hover .mai-sc-overlay {
    opacity: 1;
}

.mai-sc-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1db954; /* Màu xanh Spotify */
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.6);
    transform: scale(0.8);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mai-sc-card:hover .mai-sc-play-btn {
    transform: scale(1);
}

.mai-sc-type-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* 5. Thông tin bài hát */
.mai-sc-content {
    padding: 15px;
}

.mai-sc-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mai-sc-title a {
    color: #fff !important;
    text-decoration: none;
    transition: color 0.2s;
}

.mai-sc-title a:hover {
    color: #1db954;
}

.mai-sc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mai-sc-author-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mai-sc-author-box img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #444;
}

.mai-sc-author-box span {
    font-size: 13px;
    color: #b3b3b3;
}

.mai-sc-tags-list span {
    display: inline-block;
    font-size: 11px;
    color: #1db954;
    background: rgba(29, 185, 84, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
}

/* 6. Sticky Player (Thanh phát nhạc ghim dưới) */
.mai-sticky-player {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 800px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 99999;
    animation: slideUp 0.3s ease-out;
}

.mai-sp-details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 200px; /* Chiều rộng cố định cho tên bài */
}

.mai-sp-icon {
    width: 40px; height: 40px;
    background: #1db954;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #000;
}

.mai-sp-text {
    display: flex; flex-direction: column;
    overflow: hidden;
}

.mai-sp-label { font-size: 10px; color: #aaa; text-transform: uppercase; }
.mai-sp-name { font-size: 14px; font-weight: bold; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#mai-global-audio {
    flex: 1;
    height: 36px;
}

.mai-sp-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
}
.mai-sp-close:hover { color: #fff; }

@keyframes slideUp { from { bottom: -100px; opacity: 0; } to { bottom: 20px; opacity: 1; } }

/* Mobile Responsive */
@media (max-width: 600px) {
    .mai-sc-wrapper { padding: 20px; border-radius: 0; margin-top: 0; }
    .mai-sc-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } /* 2 cột trên mobile */
    .mai-sc-play-btn { width: 40px; height: 40px; font-size: 20px; }
    .mai-sc-title { font-size: 14px; }
    .mai-sticky-player { width: 100%; bottom: 0; border-radius: 0; border-bottom: none; flex-direction: column; gap: 10px; padding: 15px; }
    .mai-sp-details { width: 100%; flex: none; }
    #mai-global-audio { width: 100%; }
}
/* --- CTA & HEADER FIX --- */
.mai-sc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.mai-sc-cta-btn {
    background: linear-gradient(135deg, #00e676, #00c853);
    color: #000 !important;
    font-weight: 800;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    white-space: nowrap;
}

.mai-sc-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.6);
    color: #000 !important;
}

/* Mobile fix cho header */
@media (max-width: 600px) {
    .mai-sc-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .mai-sc-cta-btn {
        width: 100%;
        justify-content: center;
    }
}
/* --- FIX SVG ICONS --- */
.mai-sc-play-btn svg {
    width: 32px;
    height: 32px;
    margin-left: 4px; /* Căn chỉnh nhẹ để icon tam giác trông cân đối */
}

.mai-sp-icon svg {
    width: 24px;
    height: 24px;
}

.mai-sc-play-btn {
    /* Đảm bảo flex center hoạt động tốt */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
/* --- HEADER LOGO --- */
.mai-sc-header-center {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.mai-sc-logo {
    max-height: 80px; /* Điều chỉnh kích thước logo */
    width: auto;
    object-fit: contain;
}

/* --- PAGINATION (PHÂN TRANG) --- */
.mai-sc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
}
.mai-sc-page-btn {
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}
.mai-sc-page-btn:hover {
    background: #00e676;
    color: #000;
}
.mai-sc-page-info {
    color: #aaa;
    font-size: 14px;
}

/* --- VIDEO MODAL --- */
.mai-video-box {
    background: #000;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative;
    border: 1px solid #333;
}
.mai-video-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}
.mai-video-close {
    background: none; border: none; color: #fff; font-size: 24px; cursor: pointer;
}
.mai-video-close:hover { color: #ff3b30; }
/* FIX ICON ALIGNMENT */
.mai-sc-play-btn svg {
    width: 32px; 
    height: 32px;
    margin: 0; /* Reset margin để icon cân giữa */
}
/* Riêng icon Tam giác (Play Music) cần dịch phải 1 chút cho cân thị giác */
.mai-sc-play-btn svg path[d^="M8"] { 
    transform: translateX(2px); 
}
/* --- STICKY PLAYER CONTROLS --- */
.mai-sp-controls-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.mai-sp-nav-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mai-sp-nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #00e676;
    transform: scale(1.1);
}

/* Mobile Player adjustment */
@media (max-width: 600px) {
    .mai-sp-controls-group {
        width: 100%;
        justify-content: space-between; /* Dãn đều trên mobile */
    }
    #mai-global-audio {
        width: 70%; /* Thu nhỏ thanh audio để nhường chỗ cho nút */
    }
}
/* --- FIX OVERLAP PLAYER --- */
.mai-sc-wrapper {
    padding-bottom: 100px !important; /* Tạo khoảng trống dưới cùng */
}

/* Căn chỉnh Controls Group ở giữa */
.mai-sp-controls-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    max-width: 60%; /* Giới hạn chiều rộng để không lấn info */
}

/* Fix hiển thị trên mobile */
@media (max-width: 600px) {
    .mai-sp-controls-group {
        width: 100%;
        max-width: 100%;
        order: 3; /* Đẩy xuống dòng nếu cần */
        margin-top: 10px;
    }
    #mai-global-audio {
        height: 40px;
    }
}
/* --- FIX MOBILE PLAYER LAYOUT --- */
@media (max-width: 600px) {
    /* Tăng chiều cao để chứa đủ nội dung */
    .mai-sticky-player {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        border-radius: 16px 16px 0 0; /* Bo tròn góc trên */
        bottom: 0;
        width: 100%;
        max-width: 100%;
        gap: 10px;
    }

    /* Phần thông tin bài hát */
    .mai-sp-details {
        width: 100%;
        flex: none;
        justify-content: flex-start;
        padding-right: 30px; /* Chừa chỗ cho nút X */
    }

    /* Phần điều khiển (Nút Next/Prev + Thanh nhạc) */
    .mai-sp-controls-group {
        width: 100%;
        max-width: 100%;
        justify-content: space-between;
        margin-top: 5px;
    }

    /* Thanh audio trên mobile */
    #mai-global-audio {
        flex: 1;
        width: auto; /* Để nó tự co giãn giữa 2 nút */
        height: 36px;
        margin: 0 5px;
    }

    /* Nút Đóng (X) - Đưa lên góc phải */
    .mai-sp-close {
        position: absolute;
        top: 10px;
        right: 10px;
        padding: 5px;
        background: rgba(255,255,255,0.1); /* Thêm nền nhẹ cho dễ thấy */
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }
}
/* --- SOCIAL LIKE BTN --- */
.mai-like-btn {
    transition: 0.2s;
}
.mai-like-btn:hover {
    color: #e74c3c;
}
.mai-like-btn.active {
    color: #e74c3c;
    font-weight: bold;
}
.mai-like-btn.active .dashicons {
    color: #e74c3c;
}
/* --- PROFILE PAGE --- */
.mai-profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}
.mai-profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #333;
    object-fit: cover;
}
.mai-profile-info {
    flex: 1;
}
.mai-profile-name {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #fff;
}
.mai-profile-stats {
    display: flex;
    gap: 20px;
}
.mai-stat-box {
    background: #222;
    padding: 15px 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #333;
    min-width: 100px;
}
.mai-stat-box strong {
    display: block;
    font-size: 24px;
    color: #00e676;
}
.mai-stat-box span {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
}
.mai-sc-divider {
    height: 1px;
    background: #333;
    margin: 30px 0;
}

/* Mobile Profile */
@media (max-width: 600px) {
    .mai-profile-header { flex-direction: column; text-align: center; }
    .mai-profile-stats { justify-content: center; }
    .mai-stat-box { padding: 10px 15px; min-width: 80px; }
}
/* --- PROFILE HEADER & ACTIONS --- */
.mai-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mai-profile-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.mai-profile-actions {
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .mai-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .mai-profile-left {
        flex-direction: column;
        width: 100%;
    }
    .mai-profile-actions {
        width: 100%;
    }
    .mai-profile-actions .mai-sc-cta-btn {
        width: 100%;
        justify-content: center;
    }
}
/* --- FIX GẠCH CHÂN & STYLE NÚT HƯỚNG DẪN --- */
.mai-btn-guide {
    text-decoration: none !important; /* Loại bỏ gạch chân */
    background: #333;
    color: #fff !important;
    padding: 10px 15px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.mai-btn-guide:hover {
    background: #555;
    color: #fff !important;
    text-decoration: none !important;
}

/* Mobile header adjustment (Đảm bảo hiển thị đẹp trên mobile) */
@media (max-width: 600px) {
    .mai-header-right {
        width: 100%;
        justify-content: space-between;
        display: flex;
        gap: 10px;
    }
    .mai-btn-guide, .mai-btn-topup {
        flex: 1;
        justify-content: center;
        text-align: center;
        font-size: 13px; /* Nhỏ lại chút cho vừa */
        padding: 10px 5px;
    }
}
/* --- BTN HƯỚNG DẪN --- */
.mai-header-right {
    display: flex;
    gap: 10px;
}

.mai-btn-guide {
    background: #333;
    color: #fff !important;
    padding: 10px 15px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.mai-btn-guide:hover {
    background: #555;
}

/* Mobile header adjustment */
@media (max-width: 600px) {
    .mai-header-right {
        width: 100%;
        justify-content: space-between;
    }
    .mai-btn-guide, .mai-btn-topup {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}
/* --- PROFILE HEADER & ACTIONS --- */
.mai-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mai-profile-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.mai-profile-actions {
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .mai-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .mai-profile-left {
        flex-direction: column;
        width: 100%;
    }
    .mai-profile-actions {
        width: 100%;
    }
    .mai-profile-actions .mai-sc-cta-btn {
        width: 100%;
        justify-content: center;
    }
}
/* === THÊM VÀO CUỐI FILE CSS === */
.mai-tooltip-btn { position: relative; }
.mai-tooltip-btn::after { content: attr(data-tooltip); position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background: rgba(30, 30, 30, 0.95); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 11px; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 100; pointer-events: none; box-shadow: 0 4px 10px rgba(0,0,0,0.2); font-weight: normal; }
.mai-tooltip-btn::before { content: ""; position: absolute; bottom: 115%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: rgba(30, 30, 30, 0.95) transparent transparent transparent; opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 100; pointer-events: none; }
.mai-tooltip-btn:hover::after, .mai-tooltip-btn:hover::before { opacity: 1; visibility: visible; bottom: 135%; }
@media (max-width: 600px) { .mai-tooltip-btn::after, .mai-tooltip-btn::before { display: none; } }
.mai-modal-desc-list { list-style: disc; padding-left: 20px; margin: 10px 0; color: #666; font-size: 13px; }
.mai-modal-desc-list li { margin-bottom: 5px; }
.mai-modal-body { text-align: left !important; }
/* === THÊM VÀO CUỐI FILE CSS: STYLE LỊCH SỬ GIAO DỊCH === */
.mai-trans-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; border-bottom: 1px solid #eee; transition: 0.2s; }
.mai-trans-item:hover { background: #f9f9f9; }
.mai-trans-item:last-child { border-bottom: none; }
.mai-trans-left { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.mai-trans-desc { font-weight: 600; color: #333; font-size: 14px; }
.mai-trans-date { font-size: 11px; color: #999; display: flex; align-items: center; gap: 4px; }
.mai-trans-amount { font-weight: 800; font-size: 15px; white-space: nowrap; }
.mai-amount-plus { color: #28a745; } /* Màu xanh lá (Cộng tiền) */
.mai-amount-minus { color: #e74c3c; } /* Màu đỏ (Trừ tiền) */