
:root {
    --primary-color: #f6d365;
    --secondary-color: #fda085;
    --background-start: #1a2a6c;
    --background-end: #4facfe;
    --glass-bg: rgba(88, 168, 238, 0.1);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --text-color: #ffffff;
    --dark-text: #000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #56b0ff, #ffffff);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 30px 0;
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);

}

header p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;

}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.player-section,
.form-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--glass-shadow);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.player-container {
    text-align: center;
}

.book-cover {
    width: 250px;
    height: 250px;
    border-radius: 15px;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.book-cover:hover {
    transform: scale(1.03);
}

.book-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.book-author {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: rgb(255, 255, 255);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ✅ Tambahkan: efek visual untuk tombol Follow Along aktif */
.toggle-follow.active {
    background: var(--primary-color);
    color: var(--dark-text);
}

.toggle-follow i {
    transition: transform 0.3s ease;
}

.toggle-follow.active i {
    transform: rotate(180deg);
}

.text-display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    height: 300px;
    overflow-y: auto;
    margin-top: 20px;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.highlight {
    background: linear-gradient(120deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--dark-text);
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* --- Scroll Button --- */
.cards-section {
    overflow: hidden;
}

.audiobook-cards-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.scroll-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.scroll-btn:hover {
    opacity: 1;
}

#scroll-left {
    left: -15px;
}

#scroll-right {
    right: -15px;
}

.audiobook-cards {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    margin-top: 20px;
}

.audiobook-cards::-webkit-scrollbar {
    display: none;
}

.audiobook-cards {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.card {
    min-width: 250px;
    max-width: 250px;
    background: var(--glass-bg);
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.card-author {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

.card-duration {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.form-section {
    margin-top: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: rgb(241, 235, 235);
    font-size: 1rem;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(120deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--dark-text);
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
}

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    opacity: 0.7;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}
