@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --bg-paper: #FAF9F6;
    --bg-white: #FFFFFF;
    --text-ink: #1A1A1A;
    --text-muted: #666666;
    --border-ink: #1A1A1A;
    --border-light: #E0DCD5;
    --accent-red: #C93B2B;
    --accent-glow: rgba(201, 59, 43, 0.15);
    
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.12);
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-paper);
    color: var(--text-ink);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
}

/* Header */
.site-header {
    background-color: var(--bg-paper);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.5rem 2rem;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo-img {
    height: 55px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-ink);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--text-ink);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Footer */
.site-footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 3rem 2rem;
    margin-top: auto;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.instagram-section {
    margin-bottom: 2.5rem;
}

.instagram-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.instagram-title a {
    border-bottom: 1px dashed var(--text-ink);
    padding-bottom: 2px;
    transition: var(--transition-smooth);
}

.instagram-title a:hover {
    color: var(--text-muted);
    border-bottom-color: var(--text-muted);
}

.instagram-widget {
    background-color: var(--bg-paper);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 1.5rem 2rem;
    max-width: 580px;
    margin: 1.5rem auto 2.5rem auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: var(--shadow-subtle);
}

.instagram-widget-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.instagram-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-ink);
    background-color: var(--bg-white);
}

.instagram-info {
    display: flex;
    flex-direction: column;
}

.instagram-username {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-ink);
    text-align: left;
}

.instagram-handle {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: left;
}

.social-buttons-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.instagram-btn, .facebook-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    background-color: var(--text-ink);
    color: var(--bg-paper);
    border: 1.5px solid var(--text-ink);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.instagram-btn:hover, .facebook-btn:hover {
    background-color: transparent;
    color: var(--text-ink);
}

@media (max-width: 600px) {
    .instagram-widget {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1.2rem;
    }
    .instagram-widget-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .instagram-username, .instagram-handle {
        text-align: center;
    }
    .social-buttons-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
    }
    .instagram-btn, .facebook-btn {
        width: 100%;
        justify-content: center;
    }
}

.footer-credits {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Home Page Hero */
.hero-banner {
    width: 100%;
    background-color: #FAF5EE; /* slightly warmer paper tone */
    padding: 6rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("../assets/handwritten_background.png");
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
}

.admin-columns-grid {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.admin-col {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2.5rem;
    box-shadow: var(--shadow-subtle);
    min-height: auto;
}

.admin-col-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border-bottom: 1.5px solid var(--text-ink);
    padding-bottom: 0.5rem;
}

/* Drag and Drop List - converted to a 3-column card grid */
.drag-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2.5rem;
    min-height: 250px;
}

.drag-item {
    cursor: grab;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.drag-item:active {
    cursor: grabbing;
}

.drag-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    box-shadow: none;
    border-style: dashed;
}

#rinka {
    font-family: 'EB Garamond', serif;
    font-weight: 700;
}

#intro, #intro p {
    font-family: 'EB Garamond', serif;
    font-style: italic !important;
    line-height: 1.45;
    text-align: justify;
    text-align-last: left;
}

.hero-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-ink);
    margin-bottom: 3rem;
    text-align: justify;
    text-align-last: center;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--text-ink);
    color: var(--bg-paper);
    border: 1.5px solid var(--text-ink);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-ink);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-ink);
    border: 1.5px solid var(--border-light);
    box-shadow: var(--shadow-subtle);
}

.btn-secondary:hover {
    border-color: var(--text-ink);
    box-shadow: var(--shadow-card);
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Public Book Grid */
.books-container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.grid-section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border-bottom: 1.5px solid var(--text-ink);
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2.5rem;
    margin-bottom: 5rem;
}

.books-grid.centered-grid-1 {
    grid-template-columns: minmax(auto, 350px);
    justify-content: center;
}

.books-grid.centered-grid-2 {
    grid-template-columns: repeat(2, minmax(auto, 350px));
    justify-content: center;
}

@media (max-width: 768px) {
    .books-grid.centered-grid-2 {
        grid-template-columns: 1fr;
    }
}


/* Card Zoom and Blur Logic */
.books-grid:hover .book-card:not(:hover) {
    opacity: 0.75;
}

.book-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                opacity 0.3s ease, 
                box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
    position: relative;
}

.book-card:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: var(--shadow-hover);
}

.card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    background-color: #EEE;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .card-img {
    transform: scale(1.03);
}

.saga-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    background-color: var(--bg-white);
    border: 1px solid var(--border-ink);
    padding: 0.3rem 1.2rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: var(--shadow-subtle);
}

.saga-card-badge {
    position: absolute;
    bottom: 15px;
    right: -32px;
    width: 110px;
    background-color: #444444; /* Dark gray */
    color: #ffffff; /* White text */
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0;
    transform: rotate(-45deg);
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.15);
}

.card-details {
    padding: 1.8rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.card-title-cz {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-ink);
}

.card-title-en {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.card-metadata {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.card-metadata div {
    margin-bottom: 0.2rem;
}

.card-badge-saga-red {
    color: var(--accent-red);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.card-badge-rec {
    color: var(--accent-red);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

/* Book Detail Page */
.book-detail-container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.book-detail-main {
    display: grid;
    grid-template-columns: 1.3fr 1.7fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: start;
}

.book-detail-cover {
    box-shadow: var(--shadow-card);
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 2/3;
    background-color: #EEE;
    position: relative;
}

.book-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-detail-cover .cover-primary {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 2;
}

.book-detail-cover:hover .cover-primary {
    opacity: 1;
}

.book-detail-cover .cover-secondary {
    position: relative;
    z-index: 1;
}

.book-info {
    display: flex;
    flex-direction: column;
}

.book-info-title-cz {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.book-info-title-en {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.book-info-table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 2.5rem;
}

.book-info-table tr {
    /* borders removed */
}

.book-info-table td {
    padding: 0.75rem 0;
    font-size: 0.95rem;
}

.book-info-table td.label {
    font-weight: 600;
    color: var(--text-muted);
    width: 35%;
}

.book-info-genre {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--text-ink);
    margin-bottom: 0.4rem;
}

.book-info-year {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 1.4rem;
    color: var(--text-ink);
    margin-bottom: 2rem;
}

.book-description {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-ink);
    margin-bottom: 2.5rem;
    text-align: justify;
}

.book-description p {
    margin-bottom: 1.2rem;
}

.book-description p:last-child {
    margin-bottom: 0;
}

.saga-description {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-ink);
    margin: 0 auto 1.5rem auto;
    max-width: 800px;
    text-align: justify;
    text-align-last: left;
}

.saga-description p {
    margin-bottom: 1.2rem;
}

.saga-description p:last-child {
    margin-bottom: 0;
}

.book-download-box {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: var(--shadow-subtle);
}

.not-downloadable {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: center;
}

.disclaimer-box {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
}

.disclaimer-title {
    font-weight: 700;
    color: var(--text-ink);
    margin-bottom: 0.5rem;
}

.disclaimer-list {
    list-style: none;
    margin-bottom: 1rem;
}

.disclaimer-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.3rem;
}

.disclaimer-list li::before {
    content: '–';
    position: absolute;
    left: 0;
}

/* Music Accordion Section */
.collapsible-container {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background-color: var(--bg-white);
    margin-bottom: 4rem;
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
}

.collapsible-header {
    width: 100%;
    padding: 1.5rem 2rem;
    background: none;
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-ink);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.collapsible-header:hover {
    background-color: var(--bg-paper);
}

.collapsible-icon {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.collapsible-container.active .collapsible-icon {
    transform: rotate(45deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    border-top: 0 solid var(--border-light);
}

.collapsible-container.active .collapsible-content {
    max-height: 2000px; /* high enough value for content */
    border-top-width: 1px;
}

.music-split-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    padding: 2.5rem;
}

.music-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.music-video-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-caption {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.music-description-box {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-ink);
    text-align: justify;
    white-space: pre-line;
}

/* Saga Portal */
.saga-portal-header {
    text-align: center;
    margin: 4rem auto 0.7rem auto;
    max-width: 800px;
    padding: 0 2rem;
}

.saga-portal-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0;
}

.saga-portal-tag {
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: block;
}

/* Administrative styling */
.admin-body {
    background-color: #F0EDE6; /* different warm background for admin */
}

.admin-login-container {
    max-width: 420px;
    margin: 8rem auto;
    padding: 0 1.5rem;
}

.admin-login-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.admin-login-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.login-options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.login-opt-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-paper);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.login-opt-btn:hover {
    border-color: var(--text-ink);
    background-color: var(--bg-white);
    box-shadow: var(--shadow-subtle);
}

.login-code-form {
    margin-top: 2rem;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--text-ink);
}

.timer-box {
    font-size: 0.85rem;
    color: var(--accent-red);
    font-weight: 600;
    margin-top: 0.5rem;
    text-align: center;
}

/* Admin Dashboard */
.admin-navbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-publish {
    position: relative;
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.btn-publish:hover {
    background-color: var(--accent-red);
    color: white;
}

.btn-publish.has-changes::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-red);
    border: 2px solid white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(201, 59, 43, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(201, 59, 43, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(201, 59, 43, 0); }
}

.admin-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.admin-columns-grid {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.admin-col {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2.5rem;
    box-shadow: var(--shadow-subtle);
    min-height: auto;
}

.admin-col-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border-bottom: 1.5px solid var(--text-ink);
    padding-bottom: 0.5rem;
}

/* Drag and Drop List - converted to a 3-column card grid */
.drag-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2.5rem;
    min-height: 250px;
}

.drag-item {
    cursor: grab;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.drag-item:active {
    cursor: grabbing;
}

.drag-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    box-shadow: none;
    border-style: dashed;
}

.action-btn {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-ink);
}

.action-btn:hover {
    border-color: var(--text-ink);
    background-color: #EEE;
}

.action-btn.btn-delete:hover {
    color: white;
    background-color: var(--accent-red);
    border-color: var(--accent-red);
}

/* Form Styles and Panels */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--text-ink);
}

.modal-body {
    padding: 2rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.playlist-manager {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    background-color: var(--bg-paper);
}

.playlist-manager-title {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.playlist-video-item {
    border: 1px solid var(--border-light);
    background-color: var(--bg-white);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.btn-remove-video {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Alert/Notifications */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #E2EED9;
    color: #437025;
    border-color: #D2E3C4;
}

.alert-danger {
    background-color: #F8D7DA;
    color: #721C24;
    border-color: #F5C6CB;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .drag-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .music-split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 868px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-text {
        font-size: 1.1rem;
        text-align: justify;
    }
    .book-detail-main {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .book-detail-cover {
        max-width: 420px;
        margin: 0 auto;
    }
    .admin-columns-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
    .drag-list {
        grid-template-columns: 1fr;
    }
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    .nav-menu {
        gap: 1.5rem;
    }
    .music-videos-grid {
        grid-template-columns: 1fr;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .instagram-widget {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem;
        gap: 1rem;
    }
    .instagram-widget-left {
        flex-direction: column;
        gap: 0.8rem;
    }
    .instagram-username, .instagram-handle {
        text-align: center;
    }
}

/* Admin Layout Sidebar Refactoring */
.admin-dashboard-layout {
    display: flex;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.admin-sidebar-menu {
    width: 280px;
    flex-shrink: 0;
}

.admin-main-panel {
    max-width: 1200px;
    width: 100%;
    flex-grow: 1;
    min-width: 0;
}

.sidebar-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-subtle);
    position: sticky;
    top: 90px;
}

.sidebar-menu-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.sidebar-btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

@media (max-width: 900px) {
    .admin-dashboard-layout {
        flex-direction: column;
        gap: 2rem;
    }
    .admin-sidebar-menu {
        width: 100%;
    }
    .sidebar-card {
        position: static;
    }
}

/* Large screen enhancement: menu on the far left, admin body centered */
@media (min-width: 1600px) {
    .admin-dashboard-layout {
        max-width: 100%;
        margin: 3rem 0;
        padding: 0;
    }
    
    .admin-sidebar-menu {
        position: fixed;
        left: 3rem;
        top: 120px;
        width: 280px;
        z-index: 10;
    }
    
    .admin-main-panel {
        margin: 0 auto;
        max-width: 1200px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}


