/* --- Astra Header & Global Reset (Match Flashcard) --- */
body {
    overflow: hidden !important; /* Menghilangkan global scroll */
}

.ast-primary-header-bar,
.ast-primary-header,
.main-header-bar,
.site-primary-header-wrap,
.site-header-focus-item,
.ast-builder-grid-row-layout-default,
.ast-builder-grid-row-tablet-layout-default,
.ast-builder-grid-row-mobile-layout-default,
#ast-scroll-top {
    display: none !important;
}

.ast-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: #0f172a !important;
}

/* Fix area putih di site-content Astra */
#content,
.site-content,
#primary {
    padding: 0 !important;
    margin: 0 !important;
    background-color: #0f172a !important;
}

.ast-separate-container #content,
.ast-separate-container .site-content {
    background-color: #0f172a !important;
}

* {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 dan Edge */
    user-select: none; /* Standar (Chrome, Firefox, Opera) */
}

.listening-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 20px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f172a;
    min-height: 100vh; /* Changed to 100vh for full screen like flashcard */
    color: #ffffff;
}

.listening-container {
    text-align: center;
    background: #1e293b; /* Dark slate background like a card container */
    padding: 10px 30px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 320px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.listening-controls-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.shuffle-countdown {
    font-size: 20px;
    font-weight: bold;
    color: #a777e3;
    margin-bottom: 0;
    text-shadow: 0 0 10px rgba(167, 119, 227, 0.3);
    text-align: center;
}

.boxP {
    width: 40px;
    height: 40px;
    border: 2px solid white;
    border-radius: 50%;
    background-color: #20263b;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    padding: 0;
}

.boxP:hover {
    background-color: #334155;
    transform: scale(1.1);
}

.auto-shuffle-toggle.is-active,
.shufflePool-toggle.is-active,
.voice2-toggle.is-active,
.reverse-btn.is-active {
    background-color: #6e8efb;
    border-color: #a777e3;
    box-shadow: 0 0 10px rgba(110, 142, 251, 0.6);
}

.shuffle-button-container {
    margin-bottom: 20px;
    position: relative;
}

/* Flip Card Styles */
.flip-card-container {
    perspective: 1000px;
    margin: 0 auto 10px auto;
    width: 70px;
    height: 90px;
}

.flip-card {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.flip-card-inner.is-flipped {
    transform: rotateY(180deg);
}

.flip-card-inner.no-transition {
    transition: none !important;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    font-weight: bold;
    font-size: 20px;
    border: 2px solid #6e8efb;
}

.flip-card-front {
    background-color: #f8f9fa;
    color: #6e8efb;
}

.flip-card-back {
    background-color: #6e8efb;
    color: white;
    transform: rotateY(180deg);
}

.card-placeholder {
    font-size: 24px;
}

.round-shuffle-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #6e8efb, #a777e3);
    color: white;
    font-size: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px rgba(110, 142, 251, 0.4);
    outline: none;
    margin: 0 auto;
}

.round-shuffle-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 20px rgba(110, 142, 251, 0.5);
}

.round-shuffle-btn:active {
    transform: translateY(0) scale(0.95);
}

.round-shuffle-btn.is-playing {
    animation: pulse 1.5s infinite;
    background: linear-gradient(145deg, #a777e3, #6e8efb);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(110, 142, 251, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(110, 142, 251, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(110, 142, 251, 0);
    }
}

.listening-status {
    font-size: 14px;
    color: #cbd5e1; /* Light slate color for better readability on dark */
    margin-top: 10px;
    min-height: 1.5em;
    font-weight: 500;
}

.shuffle-icon {
    display: inline-block;
}

.repeat-btn {
    margin-top: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #6e8efb;
    background: transparent;
    color: #6e8efb;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none; /* Hidden by default until first play */
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.repeat-btn:hover {
    background: #6e8efb;
    color: white;
}

.repeat-icon {
    margin-right: 5px;
}
