.audio-info,.top-row{
  display: flex;
  align-items: center;
}

.top-row{
  border-radius: 4px;
  margin: 1px 20px;
  padding: 8px;
  justify-content: space-between;
  background: #f1f3ff;
  min-width: 50%;
}
.file-name{
  font-size: 15px;
  opacity: .8;
}
.remove-btn{
  border: none;
  color: red;
  background: white;
  font-size: 22px;
  border-radius: 8px;
  cursor: pointer;
}
#audiocardx{
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
#file{
  display: none;
}
.audio-icon{
  font-size:28px;
  margin-right:10px;
}
.fnamesize{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.file-size{
  font-size:14px;
  opacity: .8;
  font-weight: bold;
  color: #ff5722;
}

.looper-controls{
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px;
}
.ctrl-row{
  margin-bottom: 18px;
}
.ctrl-label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.mode-toggle{
  display: flex;
  background: #f1f3ff;
  border-radius: 4px;
  padding: 3px;
  gap: 3px;
}
.mode-toggle label{
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 3px;
  font-weight: 600;
  color: var(--muted);
}
.mode-toggle input[type="radio"]{
  display: none;
}
.mode-toggle input[type="radio"]:checked + span{
  background: #fff;
  color: var(--pcolor);
  box-shadow: 0 1px 2px rgba(68, 73, 166, 0.15);
  display: block;
  padding: 6px 8px;
  border-radius: 3px;
  margin: -6px -8px;
}
.input-row{
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e7f0;
  border-radius: 3px;
  padding: 9px 14px;
}
.input-row input[type="number"],
.input-row input[type="text"]{
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  color: #262626;
  background: transparent;
  width: 90px;
}
.input-row .unit{
  font-size: 14px;
  color: var(--muted);
}
.range-row{
  display: flex;
  align-items: center;
  gap: 12px;
}
.range-row input[type="range"]{
  flex: 1;
  accent-color: var(--pcolor);
}
.range-row .range-val{
  min-width: 52px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--pcolor);
}
select.fmt-select{
  width: 100%;
  padding: 9px 14px;
  font-size: 14px;
  border: 1px solid #e5e7f0;
  border-radius: 3px;
  background: #fff;
  outline: none;
  cursor: pointer;
}
.advanced{
  border: 1px solid #e5e7f0;
  border-radius: 3px;
  padding: 0;
  margin-bottom: 18px;
  background: #fff;
}
.advanced summary{
  cursor: pointer;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pcolor);
  user-select: none;
}
.advanced summary::-webkit-details-marker{
  color: var(--pcolor);
}
.advanced[open] summary{
  border-bottom: 1px solid #eef0fa;
}
.adv-body{
  padding: 14px;
}
.adv-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.adv-field{
  flex: 1 1 140px;
  min-width: 0;
}
.adv-field .ctrl-label{
  margin-bottom: 4px;
  font-size: 11px;
}
.adv-field .input-row{
  padding: 7px 12px;
}
.adv-field input{
  width: 100% !important;
  font-size: 14px !important;
}
.create-btn{
  background: var(--pcolor);
  color: white;
  border: none;
  padding: 12px 26px;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  margin: 24px auto 0;
  min-width: 200px;
  transition: background 0.15s, box-shadow 0.15s;
}
.create-btn:hover:not(:disabled){
  background: #373c8f;
  box-shadow: 0 4px 12px rgba(68, 73, 166, 0.25);
}
.create-btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

.processing{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  color: var(--pcolor);
  font-size: 15px;
}
.spinner{
  width:18px;
  height:18px;
  border:3px solid var(--pcolor);
  border-top:3px solid rgba(255,255,255,0.3);
  border-radius:50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin{
  to { transform: rotate(360deg); }
}

#resultcrd{
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.result-card{
  background: #fff;
  border-radius: 7px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.size-grid{
  display: flex;
  align-items: center;
  background: #f6f7ff;
  padding: 7px 16px;
  border-radius: 6px;
  gap: 12px;
}
.size-box{
  text-align: center;
}
.label{
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}
.value{
  font-size: 16px;
  font-weight: 700;
  color: #222;
}
.size-box.highlight .value{
  color: var(--pcolor);
}
.arrow{
  font-size: 20px;
  padding: 0 6px;
  color: #999;
}
.download-btn{
  display: block;
  text-align: center;
  background: var(--pcolor);
  color: #fff;
  padding: 8px 14px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
}
.download-btn:hover{
  background: #373c8f;
}
.innerdownwrap{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media screen and (max-width: 600px){
  .result-card{
    flex-direction: column;
    width: 100%;
  }
  audio{
    width: 100%;
  }
  .innerdownwrap{
    width: 100%;
  }
}
