@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Quicksand:wght@700&display=swap');

body {
    background: linear-gradient(135deg, #f3e6ff 0%, #e6d6ff 100%);
    color: #7c2fa0;
    font-family: 'Quicksand', 'Comic Sans MS', 'Brush Script MT', cursive, sans-serif;
    min-height: 100vh;
    position: relative;
}

.container {
    max-width: 1200px;
    background: rgba(243, 230, 255, 0.97);
    border-radius: 28px;
    box-shadow: 0 8px 32px #d1a4ff55, 0 0 40px #e75480a0;
    padding: 36px 28px;
}

h1, h3, h5 {
    font-family: 'Dancing Script', 'Brush Script MT', cursive, sans-serif;
    color: #b266ff;
    text-shadow: 0 2px 12px #fff, 0 0 8px #e0b3ff;
    background: linear-gradient(90deg, #b266ff, #e75480, #ffb6e6, #a64ca6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    letter-spacing: 1px;
}

a, .btn, .form-label {
    color: #b266ff !important;
    text-shadow: 0 1px 4px #fff0fa;
    font-weight: bold;
}

.btn-plex-orange {
    background: linear-gradient(90deg, #e0b3ff 0%, #b266ff 100%);
    border: none;
    color: #fff !important;
    font-weight: 700;
    border-radius: 24px;
    box-shadow: 0 2px 16px #b266ff55, 0 0 8px #e0b3ff;
    font-family: 'Dancing Script', cursive, sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #a64ca6;
}

.btn-plex-orange:hover {
    background: linear-gradient(90deg, #b266ff 0%, #e0b3ff 100%);
    box-shadow: 0 4px 24px #e0b3ff, 0 0 16px #b266ff;
}

.btn-danger {
    background: linear-gradient(90deg, #e75480 0%, #b266ff 100%);
    border: none;
    color: #fff !important;
    border-radius: 24px;
    font-family: 'Dancing Script', cursive, sans-serif;
    font-size: 1.1rem;
    text-shadow: 0 2px 8px #a64ca6;
}

.btn-secondary {
    background: #f3e6ff;
    color: #b266ff !important;
    border-radius: 24px;
    border: 1px solid #b266ff;
    font-weight: bold;
}

.btn.btn-secondary:hover {
    background: #d1a4ff !important;   /* Slightly darker pastel purple */
    color: #7c2fa0 !important;        /* Readable purple text */
    border: 1px solid #b266ff !important;
    box-shadow: none;
}

.bg-plex-input, .form-select, .form-control {
    background: #f3e6ff !important;
    color: #7c2fa0 !important;
    border: 2px solid #b266ff !important;
    border-radius: 16px !important;
    font-family: 'Quicksand', cursive, sans-serif;
    box-shadow: 0 0 8px #b266ff40;
    font-weight: bold;
}

.bg-plex-input::placeholder {
    color: #b266ff !important;
    opacity: 0.8;
    font-weight: bold;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 12px #b266ff, 0 0 4px #e0b3ff;
    border-color: #b266ff !important;
}

.book-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #f3e6ff 0%, #e0b3ff 100%);
    aspect-ratio: 2 / 3;
    width: 100%;
    height: 360px;
    box-shadow: 0 4px 32px #b266ff55, 0 0 24px #e0b3ff88;
    border: 2px solid #b266ff;
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 18px;
    border: 2px solid #b266ff;
    box-shadow: 0 2px 16px #e0b3ff88;
    background: #f3e6ff;
}

.book-card:hover {
    transform: scale(1.04) rotate(-2deg);
    box-shadow: 0 8px 48px #b266ff, 0 0 32px #e0b3ff;
}

.book-card:hover img {
    filter: brightness(95%) drop-shadow(0 0 16px #b266ff);
}

.book-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(178, 102, 255, 0.92);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    font-family: 'Dancing Script', cursive, sans-serif;
    font-size: 1.1rem;
    border-radius: 18px;
    box-shadow: 0 0 24px #e0b3ff;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-overlay h5 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #7c2fa0; /* solid, dark purple */
    text-shadow: 0 2px 12px #fff, 0 0 8px #fff;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
}

.book-overlay p {
    font-size: 1.1rem;
    margin: 5px 0;
    color: #fff0fa;
    text-shadow: 0 1px 4px #e0b3ff;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.skeleton-card {
    height: 360px;
    background: linear-gradient(135deg, #f3e6ff 0%, #e0b3ff 100%);
    border-radius: 18px;
    animation: pulse 1.5s infinite;
    border: 2px solid #b266ff;
    box-shadow: 0 0 24px #b266ff55;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.suggestions {
    position: absolute;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    width: 500px;
    max-width: 90vw;
    border-bottom: none !important;
    box-shadow: 0 2px 16px #b266ff55;
    background: #f3e6ff !important;
    border: 2px solid #b266ff;
    border-radius: 16px;
}

.suggestion {
    cursor: pointer;
    padding: 5px 10px;
    min-height: 67px;
    display: flex;
    align-items: center;
    color: #111 !important;
    font-family: 'Quicksand', cursive, sans-serif;
    font-weight: bold;
}

.suggestion:hover {
    background-color: #e0b3ff;
}

.suggestion img {
    object-fit: cover;
    margin-right: 10px;
    border-radius: 8px;
    border: 1px solid #b266ff;
}

.book-detail-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1000;
}

.book-detail-container .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(178, 102, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    overflow-y: auto;
}

.book-detail-container .container {
    position: relative;
    z-index: 1001;
    background: rgba(243,230,255,0.97);
    border-radius: 28px;
    box-shadow: 0 8px 32px #b266ff55, 0 0 40px #e0b3ff88;
    padding: 36px 28px;
}

.book-detail-container img {
    width: 200px;
    height: 400px;
    object-fit: cover;
    border-radius: 18px;
    border: 2px solid #b266ff;
    margin: 0 auto 1rem;
    display: block;
    background: #f3e6ff;
    box-shadow: 0 0 24px #b266ff55;
}

::-webkit-scrollbar {
    width: 10px;
    background: #e0b3ff;
}
::-webkit-scrollbar-thumb {
    background: #b266ff;
    border-radius: 8px;
}

.form-text, .text-muted {
    color: #b266ff !important;
    font-weight: bold;
}

input[type="text"], textarea {
    font-family: 'Quicksand', cursive, sans-serif;
    background: #f3e6ff !important;
    color: #7c2fa0 !important;
    font-weight: bold;
}

label {
    font-weight: 700;
    color: #b266ff;
    text-shadow: 0 1px 4px #fff0fa;
}

select, option {
    color: #b266ff;
    background: #f3e6ff;
    font-weight: bold;
}

hr {
    border-top: 1px solid #b266ff;
    opacity: 0.2;
}

input[type="text"]:focus, textarea:focus {
    outline: 2px solid #b266ff;
    box-shadow: 0 0 8px #b266ff;
}

#loader .spinner-border {
    color: #b266ff !important;
}

#loader span {
    color: #b266ff !important;
}

body::after {
    content: "✨💖🍒💜✨";
    position: fixed;
    bottom: 10px;
    right: 20px;
    left: auto;
    transform: none;
    font-size: 2.5rem;
    pointer-events: none;
    opacity: 0.95;
    z-index: 2000;
    text-shadow: 0 0 16px #e0b3ff, 0 0 8px #b266ff;
}

body::before {
    content: "👑";
    position: fixed;
    top: 10px;
    left: 20px;
    font-size: 2.5rem;
    pointer-events: none;
    opacity: 0.95;
    z-index: 2000;
    text-shadow: 0 0 16px #e0b3ff, 0 0 8px #b266ff;
}

#total-books {
    font-size: inherit;
    color: inherit;
    font-family: inherit;
    font-weight: inherit;
}

.suggestions.bg-plex-input {
    border: none !important;
}