/* =============================================
   AUDIO LIBRARY — Frontend Styles
   audio-library.css
============================================= */

/* WRAP */
.al-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 1100px; margin: 0 auto; }

/* FILTER BAR */
.al-filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; align-items: center; }
.al-search { flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; transition: border .2s; }
.al-search:focus { border-color: #4f8eff; }
.al-cat-select { padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; background: #fff; cursor: pointer; }

/* BUTTONS */
.al-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid #ddd; background: #fff; transition: all .2s; text-decoration: none; }
.al-btn:hover { background: #f5f5f5; }
.al-btn-primary { background: #4f8eff; color: #fff; border-color: #4f8eff; }
.al-btn-primary:hover { background: #3a7aee; }
.al-btn-download { background: #f0f7ff; color: #4f8eff; border-color: #c8dfff; font-size: 13px; padding: 7px 14px; }
.al-btn-download:hover { background: #4f8eff; color: #fff; }
.al-btn-search { background: #4f8eff; color: #fff; border-color: #4f8eff; }
.al-btn-clear { background: #fff5f5; color: #e24b4a; border-color: #fcc; }
.al-btn-toggle { background: #4f8eff; color: #fff; border-color: #4f8eff; margin-bottom: 20px; }
.al-btn-cancel { background: #f5f5f5; color: #666; }

/* COUNT */
.al-count { font-size: 14px; color: #888; margin-bottom: 16px; }
.al-count strong { color: #333; }

/* GRID */
.al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

/* CARD */
.al-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 20px; transition: box-shadow .2s, transform .2s; }
.al-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }

/* CARD HEADER */
.al-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.al-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #4f8eff, #00e5c0); color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.al-card-meta { flex: 1; min-width: 0; }
.al-title { font-size: 16px; font-weight: 600; margin: 0 0 3px; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-uploader { font-size: 12px; color: #888; }
.al-badge { font-size: 11px; background: #eef4ff; color: #4f8eff; padding: 3px 10px; border-radius: 100px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }

/* DESCRIPTION */
.al-desc { font-size: 13px; color: #666; margin: 0 0 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* AUDIO PLAYER */
.al-player { display: flex; align-items: center; gap: 10px; background: #f8f9ff; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.al-play-btn { width: 36px; height: 36px; border-radius: 50%; background: #4f8eff; color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .2s; }
.al-play-btn:hover { background: #3a7aee; transform: scale(1.05); }
.al-play-btn svg { width: 14px; height: 14px; fill: white; }
.al-play-btn.playing { background: #e24b4a; }

.al-progress-wrap { flex: 1; min-width: 0; }
.al-progress-bar { height: 4px; background: #dce3f5; border-radius: 4px; cursor: pointer; margin-bottom: 4px; position: relative; }
.al-progress-fill { height: 100%; background: #4f8eff; border-radius: 4px; width: 0%; transition: width .1s; pointer-events: none; }
.al-time { font-size: 11px; color: #888; }

.al-volume-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.al-volume-wrap svg { color: #aaa; flex-shrink: 0; }
.al-volume { width: 60px; height: 3px; accent-color: #4f8eff; cursor: pointer; }

/* TAGS */
.al-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.al-tag { font-size: 11px; background: #f5f5f5; color: #666; padding: 3px 10px; border-radius: 100px; border: 1px solid #eee; }

/* CARD FOOTER */
.al-card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f0f0f0; padding-top: 12px; }
.al-date { font-size: 12px; color: #aaa; }

/* EMPTY STATE */
.al-empty { text-align: center; padding: 60px 20px; color: #aaa; }
.al-empty span { font-size: 48px; display: block; margin-bottom: 12px; }
.al-empty p { font-size: 15px; }

/* LOGIN NOTICE */
.al-login-notice { background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px; padding: 14px 18px; font-size: 14px; color: #795548; margin-bottom: 20px; }
.al-login-notice a { color: #4f8eff; }

/* UPLOAD WRAP */
.al-upload-wrap { margin-bottom: 32px; }
.al-upload-form { background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 28px; margin-top: 4px; }
.al-upload-form h3 { font-size: 18px; font-weight: 600; margin: 0 0 20px; color: #1a1a1a; }

/* FORM ROWS */
.al-form-row { margin-bottom: 16px; }
.al-form-half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.al-form-row label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
.al-form-row label small { font-weight: 400; color: #999; font-size: 11px; }
.al-form-row input[type="text"],
.al-form-row textarea { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; transition: border .2s; box-sizing: border-box; }
.al-form-row input:focus,
.al-form-row textarea:focus { border-color: #4f8eff; }
.req { color: #e24b4a; }

/* FILE DROP */
.al-file-drop { border: 2px dashed #d0d9f0; border-radius: 10px; padding: 30px; text-align: center; cursor: pointer; transition: all .2s; position: relative; background: #fafbff; }
.al-file-drop:hover,
.al-file-drop.drag-over { border-color: #4f8eff; background: #f0f7ff; }
.al-file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.al-drop-label span { font-size: 32px; display: block; margin-bottom: 8px; }
.al-drop-label p { font-size: 14px; color: #888; margin: 4px 0; }
.al-drop-label strong { color: #4f8eff; }
.al-file-name { font-weight: 600 !important; color: #4f8eff !important; font-size: 13px !important; }

/* UPLOAD PROGRESS */
.al-progress-upload { margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.al-progress-upload .al-progress-bar { flex: 1; height: 6px; border-radius: 6px; background: #e8e8e8; }
.al-progress-upload .al-progress-fill { background: #4f8eff; transition: width .3s; }

/* FORM ACTIONS */
.al-form-actions { display: flex; gap: 12px; margin-top: 20px; }

/* NOTICE */
.al-notice { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.al-notice.success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.al-notice.error { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }

/* RESPONSIVE */
@media (max-width: 640px) {
    .al-grid { grid-template-columns: 1fr; }
    .al-form-half { grid-template-columns: 1fr; }
    .al-filter-bar { flex-direction: column; }
    .al-search, .al-cat-select, .al-btn-search { width: 100%; }
    .al-volume-wrap { display: none; }
}
