@import url('https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400..700;1,400..700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
*{
    margin: 0;
    padding: 0;
    font-family:sans-serif;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
}
:root{
    --main-bg: #2F7AFF;
    --main2-bg: #6CDB91;
    --border-color: 1px solid #484848;
}
.btn, .del-btn{
    padding: 10px 30px;
    font-size: 17px;
    letter-spacing: 1px;
    border-radius: 5px;
    background: var(--main-bg);
    color: white;
    cursor: pointer;
}
.del-btn{
    background: rgb(250, 58, 58);
}
.btn a, .del-btn a{
    color: white;
}
body{
    width: 100%;
    height: 100%;
}
.account-header{
    position: relative;
    background: rgba(0, 0, 0, 0.711);
    height: 100vh;
}
.account-header video{
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: -1;
}
.account-header nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 100px;
}
.account-header nav .logo{
    font-size: 30px;
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}
.account-header  nav .btns{
    display: flex;
    align-items: center;
    gap: 20px;
}
.account-header  nav .btns ul li{
    display: inline;
    padding: 5px 21px;
}
.account-header  nav .btns ul li a{
    color: white;;
}
.account-header  .header-body{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height:80%;
}
.account-header  .header-body .left-container{
    max-width: 1000px;
    text-align: center;
    color: white;
}
.account-header  .header-body .left-container  p{
    letter-spacing: 1px;
    line-height: 21px;
    margin-bottom: 20px;
    color: rgb(225, 225, 225);
}
.header-body .form-container{
    background: rgb(255, 255, 255);
    text-align: center;
    padding: 30px;
    max-width: 500px;
    border-radius: 5px;
    margin-top: 140px;
}
.header-body .form-container .content{
    margin-bottom: 20px;
}
.header-body .form-container .content h1{
    margin-bottom: 5px;
}
.header-body .form-container .content p{
    color: rgb(77, 77, 77);
    font-size: 14px;
}
.header-body .form-container form .input-container{
    width: 100%;
    margin-bottom: 10px;
    overflow: hidden;
    text-align: left;
}
.header-body .form-container form .input-container label{
    font-size: 15px;
}
.header-body .form-container form .input-container label span{
    color: red;
}
.header-body .form-container form .input-container input, 
.header-body .form-container form .input-container select{
    padding: 10px;
    width: 100%;
    border: 1px solid rgb(195, 195, 195);
    border-radius: 3px;
    margin-top: 5px;
}
.header-body .form-container form .btn, .header-body .form-container form .del-btn{
    margin-bottom: 15px;
    width: 100%;
}
.header-body .form-container .link{
    font-size: 15px;
    color: #484848;
    margin-bottom: 5px;
}
.header-body .form-container .link a{
    color: var(--main-bg);
}
.alert{
    background: rgb(255, 255, 255);
    position: fixed;
    z-index: 100;
    top: 20px;
    right: 20px;
    padding: 10px 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
    border-radius: 3px;
    transition: .5s;
}
.alert.active{
    right: -900px;
}
.alert i{
    color: var(--main-bg);
    padding: 4px 6px;
    border-radius: 5px;
    border: 1px solid #cecece;
    cursor: pointer;
}
.alert a{
    color: var(--main-bg);
}










@media (max-width: 500px) {
    header nav{
        padding: 20px 20px;
    }
    header .header-body{
        padding: 10px;
    }
    header .header-body .left-container h1{
        /* margin-bottom: 10px; */
        font-size:35px;
    }
    header .header-body .left-container  p{
        letter-spacing: 1px;
        line-height: 18px;
        font-size: 15px;
    }
    .header-body .form-container{
        padding: 30px 15px;
        margin-top: 130px;
    }
}

/* ============================================
   BOOKS PAGE STYLES
   ============================================ */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--main-bg) 0%, #1e40af 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

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

.hero-title {
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: white;
    color: var(--main-bg);
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    text-decoration: none;
}

.hero-button:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Main Content */
.main-content {
    padding: 3rem 0;
}

/* Intro Section */
.intro-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.intro-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.intro-text {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* Library Controls */
.library-controls {
    margin-bottom: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-kicker {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--main-bg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
}

/* Filter Grid */
.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--main-bg);
    box-shadow: 0 0 0 3px rgba(47, 122, 255, 0.1);
}

.select-container {
    position: relative;
}

.filter-select {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--main-bg);
    box-shadow: 0 0 0 3px rgba(47, 122, 255, 0.1);
}

.select-container i.fa-chevron-down {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.reset-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #ef4444;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-filters:disabled {
    background: #991b1b;
    cursor: not-allowed;
    opacity: 0.7;
}

.reset-filters:hover:not(:disabled) {
    background: #dc2626;
}

.results-summary {
    text-align: center;
    margin-bottom: 2rem;
}

#result-count {
    font-size: 1rem;
    color: #6b7280;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Book Card */
.book-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.book-card:hover {
    border-color: var(--main-bg);
    box-shadow: 0 4px 12px rgba(47, 122, 255, 0.15);
    transform: translateY(-2px);
}

.book-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.book-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.grade-badge {
    background: #dbeafe;
    color: #1e40af;
}

.curriculum-badge {
    background: #dcfce7;
    color: #166534;
}

.curriculum-badge.old {
    background: #fee2e2;
    color: #991b1b;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.book-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.book-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.file-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.file-type-icon {
    color: #ef4444;
}

.book-actions {
    display: flex;
    gap: 0.75rem;
}

.book-action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.book-action-primary {
    background: var(--main-bg);
    color: white;
}

.book-action-primary:hover {
    background: #2563eb;
}

.book-action-secondary {
    background: #f3f4f6;
    color: #374151;
}

.book-action-secondary:hover {
    background: #e5e7eb;
}

.book-action i {
    font-size: 0.75rem;
}

/* Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-spinner {
    font-size: 2.5rem;
    color: var(--main-bg);
    margin-bottom: 1rem;
}

.loading-text {
    font-size: 1.125rem;
    color: #6b7280;
}

/* No Results */
.no-results {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    background: #f9fafb;
    border-radius: 0.75rem;
}

.no-results.display {
    display: flex;
}

.no-results-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.no-results-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.no-results-text {
    font-size: 1rem;
    color: #6b7280;
}

/* Load Error */
.load-error {
    padding: 2rem;
    text-align: center;
    color: #ef4444;
    font-size: 1.125rem;
}

/* ============================================
   RESPONSIVE STYLES FOR BOOKS PAGE
   ============================================ */

@media (max-width: 768px) {
    .hero {
        padding: 2.5rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-field-search {
        grid-column: 1 / -1;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .book-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .book-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1.5rem 0;
    }
    
    .intro-section {
        margin-bottom: 2rem;
    }
    
    .filter-grid {
        gap: 0.75rem;
    }
    
    .reset-filters {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-card {
        padding: 1.25rem;
    }
}