/* =========================================
   AUDIO REVERSER (SOFT NEO-BRUTALISM)
========================================= */
.rev-soft-wrapper {
    /* Biến nội bộ - Không dùng :root */
    --neo-border: 3px solid #111111;
    --neo-shadow: 5px 5px 0px #111111;
    --neo-shadow-active: 0px 0px 0px #111111;
    
    --bg-main: #fcfcfc;
    --bg-card: #ffffff;
    --clr-peach: #ffdaaa;   /* Cam đào Pastel */
    --clr-lavender: #d4c4fb;/* Tím Pastel */
    --clr-mint: #a0e8af;    /* Xanh Mint Pastel */
    --clr-coral: #ffadad;   /* Đỏ nhạt Pastel */

    max-width: 700px; margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
    color: #111; background: var(--bg-main);
    padding: 25px; border: var(--neo-border); border-radius: 16px;
    box-shadow: var(--neo-shadow);
}
.rev-soft-wrapper * { box-sizing: border-box; }

.rev-soft-header {
    background: var(--clr-peach); padding: 20px;
    border: var(--neo-border); border-radius: 12px;
    text-align: center; margin-bottom: 25px; box-shadow: var(--neo-shadow);
}
.rev-soft-header h2 { margin: 0 0 10px 0; font-size: 1.8rem; font-weight: 900; text-transform: uppercase; color: #111;}
.rev-soft-header p { margin: 0; font-weight: 700; font-size: 0.95rem; color: #111;}

/* Khu vực Upload */
.rev-input-section { margin-bottom: 25px; text-align: center; }
.rev-btn-upload {
    width: 100%; padding: 18px; font-family: inherit; font-size: 1.15rem; font-weight: 900; text-transform: uppercase;
    background: var(--clr-lavender); border: var(--neo-border); border-radius: 12px; cursor: pointer;
    box-shadow: var(--neo-shadow); transition: all 0.15s; color: #111;
}
.rev-btn-upload:active { transform: translate(3px, 3px); box-shadow: var(--neo-shadow-active); }
.rev-filename-display { margin-top: 15px; font-weight: 700; background: #f0f0f0; padding: 10px; border-radius: 8px; border: 2px dashed #111; word-break: break-all; font-size: 0.9rem;}

/* Trạng thái Loading */
.rev-loading-box {
    background: var(--clr-coral); color: #111; font-weight: 800; font-size: 1rem;
    padding: 20px; border-radius: 12px; border: var(--neo-border); text-align: center;
    margin-bottom: 25px; box-shadow: var(--neo-shadow); display: flex; flex-direction: column; align-items: center; gap: 15px;
}
.rev-spinner {
    width: 40px; height: 40px; border: 5px solid #111; border-top-color: transparent;
    border-radius: 50%; animation: revSpin 1s linear infinite;
}
@keyframes revSpin { to { transform: rotate(360deg); } }

/* Controls Box */
.rev-controls-box {
    background: var(--bg-card); border: var(--neo-border); border-radius: 12px;
    padding: 25px; box-shadow: var(--neo-shadow); margin-bottom: 10px;
}

/* Hint Box */
.rev-hint-box { margin-bottom: 20px; font-weight: 700; font-size: 0.95rem; background: #f8f9fa; padding: 12px; border-radius: 8px; border: 2px dashed #111; text-align: center; }

/* Buttons */
.rev-action-bar { display: flex; gap: 15px; margin-bottom: 20px;}
.rev-action-bar button {
    padding: 16px; font-family: inherit; font-size: 1.05rem; font-weight: 900; text-transform: uppercase;
    border: var(--neo-border); border-radius: 12px; cursor: pointer;
    box-shadow: var(--neo-shadow); transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.rev-action-bar button:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: var(--neo-shadow-active); }
.rev-action-bar button:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(1); box-shadow: none; transform: none;}

.neo-btn-primary { flex: 2; background: var(--clr-mint); color: #111;}
.neo-btn-action { flex: 1; background: var(--clr-peach); color: #111;}

/* Animation Sóng âm thanh */
.rev-status-bar {
    background: #111; color: #fff; padding: 15px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 15px;
    font-weight: 700; font-size: 1rem; border: var(--neo-border);
}
.sound-wave { display: flex; gap: 4px; align-items: center; height: 20px; opacity: 0.3; transition: 0.3s;}
.sound-wave.playing { opacity: 1; }
.sound-wave span { display: block; width: 6px; height: 100%; background: var(--clr-mint); border-radius: 3px; animation: revBounce 1s infinite ease-in-out; transform-origin: bottom;}
.sound-wave span:nth-child(1) { animation-delay: 0.0s; }
.sound-wave span:nth-child(2) { animation-delay: 0.2s; }
.sound-wave span:nth-child(3) { animation-delay: 0.4s; }
.sound-wave span:nth-child(4) { animation-delay: 0.2s; }
.sound-wave span:nth-child(5) { animation-delay: 0.0s; }

@keyframes revBounce { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.sound-wave:not(.playing) span { animation: none; transform: scaleY(0.2); }

@media (max-width: 700px) {
    .rev-action-bar { flex-direction: column; }
}