/* 1. Các biến CSS (Điều chỉnh màu sắc theo 'crop-tool.css' nhưng với tông xanh dương nhẹ của code gốc) */
:root {
  --bg: #f0f4ff;
  --card: #fff;
  --primary: #059669; /* Xanh lá đậm (Success/Action) - Tông màu chính từ crop-tool.css */
  --secondary: #64748b; /* Xám xanh (Reset/Neutral) */
  --thirst: #0e7490; /* Xanh đậm hơn (Alternative) */
  --muted: #6b7280;
  --accent: #f59e0b; /* Màu nhấn phụ */
  --text: #111827;
}

/* Wrapper để tách biệt style */
.audio-converter-wrap {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    padding: 0;
}

.audio-converter-wrap .wrap {
  max-width: 1000px;
  margin:0 auto;
  padding: 14px;
}

.audio-converter-wrap header{
  margin-bottom:12px;
}
.audio-converter-wrap h1{
  font-size:24px;
  margin:0;
  color: var(--primary);
  font-weight: 700;
}
.audio-converter-wrap p.lead{
  font-size:15px;
  margin:4px 0 12px;
  color: var(--muted);
}

.audio-converter-wrap .panel{
  background: var(--card);
  border-radius:16px;
  padding:16px;
  box-shadow: 0 6px 20px rgba(16,24,40,0.08);
  display: flex;
  flex-direction: column; 
  gap: 16px;
}

.audio-converter-wrap .controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:12px;
  align-items:center;
}

/* === BUTTON STYLING (Tương phản cao) - Dựa trên crop-tool.css === */

/* Nút chính (Chuyển đổi / Tải về) - Màu Xanh lá đậm */
.audio-converter-wrap .btn{
  background: var(--primary); /* #059669 */
  color: #fff; 
  padding:10px 16px; /* Kích thước lớn hơn */
  border-radius:10px;
  border:none;
  cursor:pointer;
  font-size:16px; 
  font-weight: 600;
  transition: background 0.2s;
  text-decoration: none;
}
.audio-converter-wrap .btn:hover:not(:disabled){
  background: #047857; /* Hơi tối hơn khi hover */
}
/* Nút bị vô hiệu hóa */
.audio-converter-wrap .btn:disabled{
    background: #a5b4fc; /* Màu xám xanh nhẹ để phân biệt */
    cursor: not-allowed;
    opacity: 0.7;
}

/* Nút thứ cấp (Reset) - Màu Xám Xanh */
.audio-converter-wrap .btn.secondary{
  background: var(--secondary); /* #64748b */
  color: #fff; 
  padding:10px 16px;
}
.audio-converter-wrap .btn.secondary:hover:not(:disabled){
  background: #475569; /* Hơi tối hơn khi hover */
}

/* Nút thứ ba (Không dùng trong bản này, giữ lại cho đồng bộ) */
.audio-converter-wrap .btn.thirst{
  background: var(--thirst); 
  color: #fff; 
  padding:10px 16px;
}
.audio-converter-wrap .btn.thirst:hover:not(:disabled){
  background: #0f7690;
}

/* Nút chọn file (Chọn ảnh) - Thiết kế nổi bật */
.audio-converter-wrap .file-label{
  background: #fff; 
  border: 1px solid var(--primary); 
  padding:10px 16px;
  border-radius:10px;
  cursor:pointer;
  font-size:16px;
  font-weight: 600;
  color: var(--primary); 
  margin: 0;
  transition: background 0.2s, color 0.2s;
}
.audio-converter-wrap .file-label:hover{
    background: var(--primary); 
    color: #fff; 
}
/* === KẾT THÚC BUTTON STYLING === */

.audio-converter-wrap input[type="file"]{display:none;}

.audio-converter-wrap select.small, 
.audio-converter-wrap input[type="number"], 
.audio-converter-wrap input[type="text"]{
  padding:8px 10px;
  border-radius:8px; 
  border: 1px solid #d1d5db;
  font-size:15px;
  background: #fff;
}
.audio-converter-wrap select.small{
  appearance: none;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>') no-repeat right 8px center;
  background-size: 12px;
  padding-right: 28px;
}

/* CONTAINER AUDIO GỐC: */
.audio-converter-wrap .audio-wrap{
  max-width:100%;
  background:#e5e7eb; /* Màu nền sáng hơn */
  border-radius:12px;
  overflow:hidden;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px;
}

.audio-converter-wrap audio {
  width: 100%;
  display: none; 
}

.audio-converter-wrap .hint{
  background:rgba(0,0,0,0.6);
  color:#fff;
  padding:8px 16px;
  border-radius:8px;
  font-size:15px;
  white-space: nowrap;
}

/* PREVIEW AUDIO: */
.audio-converter-wrap .preview{
  display:flex;
  flex-direction:column;
  gap:10px;
  border-radius:12px;
  background:#fff;
  padding:15px;
  box-shadow:0 4px 18px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb; /* Border nhẹ */
  align-items: center;
  justify-content: center;
}

/* PROGRESS BAR STYLES */
.audio-converter-wrap .progress-container {
    width: 100%;
    margin-top: 10px;
    height: 30px; /* Chiều cao lớn hơn */
    background: #e0e7ff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.audio-converter-wrap .progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Animation cho trạng thái Đang Upload/Xử lý */
.audio-converter-wrap .progress-bar.loading {
    width: 100%;
    background: linear-gradient(90deg, var(--primary), #10b981, var(--primary)); /* Dùng màu từ biến */
    background-size: 200% 100%;
    animation: loading-bar 2s linear infinite;
}

@keyframes loading-bar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
/* END PROGRESS BAR STYLES */


.audio-converter-wrap .info{
  font-size:15px;
  color: var(--muted);
}
.audio-converter-wrap .info strong{
  color: var(--text);
}

.audio-converter-wrap footer{
  margin-top:16px;
  font-size:12px;
  color: var(--muted);
  text-align:center;
}

.audio-converter-wrap .action-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
  justify-content:center;
}

/* Thẻ tùy chỉnh chuyển đổi */
.audio-converter-wrap .convert-options {
  border: 1px solid #d1d5db;
  padding: 12px;
  border-radius: 8px;
  background: #f9faff;
}
.audio-converter-wrap .convert-options h3 {
  font-size: 18px;
  margin: 0 0 8px 0;
  color: var(--primary);
}
.audio-converter-wrap .convert-options .group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.audio-converter-wrap .convert-options label {
  font-size: 15px;
  font-weight: 600;
}
.audio-converter-wrap .hidden { display: none; }


@media(min-width:800px){
  .audio-converter-wrap .panel{
    flex-direction: row; 
    gap: 20px;
    padding: 20px;
  }
  .audio-converter-wrap .left-panel{
    flex:1;
  }
  .audio-converter-wrap .right-panel{
    flex:1;
  }
}

/* Minimal, SEO-friendly article styling */
.audio-converter-wrap .container{max-width:900px;padding:28px;margin:0 auto}
.audio-converter-wrap .container header{margin-bottom:18px}
.audio-converter-wrap .container h2{font-size:20px;margin:12px 0}
.audio-converter-wrap .container ul{margin-left:20px}
.audio-converter-wrap .container pre, 
.audio-converter-wrap .container code{background:#f3f4f6;padding:8px;border-radius:6px;overflow:auto}