/* SMK ASSALAAM E-LIBRARY FRONTEND STYLES */
/* Modern, Clean, and Professional Design */

/* ========================================
   1. COLOR THEME & VARIABLES
   ======================================== */
:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --primary-yellow: #fbbf24;
    --secondary-yellow: #f59e0b;
    --light-yellow: #fef3c7;
    --dark-blue: #1e293b;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --dark-gray: #334155;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;

    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--primary-yellow) 0%, var(--secondary-yellow) 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-yellow) 100%);
    --gradient-bg: linear-gradient(135deg, var(--light-blue) 0%, var(--light-yellow) 100%);

    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --hover-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ========================================
   2. GLOBAL STYLES
   ======================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ========================================
   3. ENHANCED NAVBAR
   ======================================== */
.navbar {
    background: rgba(30, 64, 175, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(30, 64, 175, 0.98);
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.3);
}

.navbar-brand {
    font-weight: 800;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--white) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-yellow) !important;
    transform: scale(1.05);
}

.navbar-brand::before {
    content: '📚';
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.navbar-toggler {
    border: none;
    background: var(--primary-yellow);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: var(--secondary-yellow);
    transform: scale(1.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830, 64, 175, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* NAV LINKS */
.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 0 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    transition: all 0.3s ease;
    z-index: -1;
    border-radius: 8px;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover {
    color: var(--primary-blue) !important;
    transform: translateY(-2px);
    font-weight: 600;
}

/* ACTIVE STATE */
.nav-link.active {
    color: var(--white) !important;
    background: var(--gradient-primary);
    font-weight: 700;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
}

.nav-link.active::before {
    left: 0;
    background: var(--gradient-primary);
}

.nav-link.active:hover {
    color: var(--white) !important;
    background: var(--gradient-secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.5);
}

/* DROPDOWN STYLES */
.dropdown-item.active-dropdown {
    background: var(--gradient-primary);
    color: white !important;
    font-weight: 600;
}

.dropdown-item.active-dropdown:hover {
    background: var(--gradient-secondary);
    color: var(--primary-blue) !important;
    transform: translateX(8px);
}

.nav-link.dropdown-toggle.active {
    color: var(--white) !important;
    background: var(--gradient-primary);
}

.dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.2);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 220px;
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: translateX(5px);
}

.dropdown-item form {
    width: 100%;
}

.dropdown-item button {
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: rgba(30, 64, 175, 0.1);
}

.dropdown-toggle::after {
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* ========================================
   4. BADGE STYLES
   ======================================== */
/* AI BADGE */
.nav-link .badge.ai-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: var(--primary-blue) !important;
    font-size: 0.6rem !important;
    font-weight: 800 !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 4px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: aiPulse 2s infinite;
    vertical-align: middle;
    line-height: 1;
}

@keyframes aiPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 16px rgba(251, 191, 36, 0.6);
        transform: scale(1.05);
    }
}

.nav-link:hover .badge.ai-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.6);
}

.nav-link.active .badge.ai-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #fde047 100%) !important;
    color: var(--primary-blue) !important;
    border-color: rgba(255, 255, 255, 0.5);
}

/* CART BADGE */
.nav-link .badge {
    background: var(--danger-color) !important;
    color: white !important;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.5rem;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounceIn 0.5s ease-out;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    border: 2px solid white;
    line-height: 1;
}

.nav-link .badge.cart-badge {
    position: absolute;
    top: 14px;
    right: 4px;
    z-index: 10;
    transform: scale(1);
    transition: all 0.3s ease;
}

.nav-link:hover .badge.cart-badge {
    transform: scale(1.1);
    animation: pulse 1s infinite;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cartPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.6);
    }
}

.nav-link.cart-link {
    position: relative;
    padding-right: 2rem !important;
}

.nav-link.cart-link .fa-shopping-cart {
    transition: all 0.3s ease;
}

.nav-link.cart-link:hover .fa-shopping-cart {
    transform: scale(1.1);
    color: var(--primary-yellow);
}

.nav-link.active .badge {
    background: var(--primary-yellow) !important;
    color: var(--primary-blue) !important;
    animation: pulse 2s infinite;
}

/* ========================================
   5. HERO SECTION
   ======================================== */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: clamp(3rem, 8vh, 5rem) 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="hero-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(251,191,36,0.3)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23hero-pattern)"/></svg>');
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, transparent 0%, var(--light-gray) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s both;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.search-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 0.75rem;
    box-shadow: var(--card-shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

.search-box:hover,
.search-box:focus-within {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: 500;
    background: transparent;
    min-width: 0;
}

.search-box input::placeholder {
    color: var(--gray);
    font-weight: 400;
}

.search-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    color: white;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.search-btn:hover {
    transform: scale(1.05);
    background: var(--gradient-secondary);
    color: var(--primary-blue);
}

/* ========================================
   6. STATS SECTION
   ======================================== */
.stats-section {
    background: white;
    border-radius: 20px;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    margin: -2rem 1rem 3rem;
    box-shadow: var(--card-shadow-lg);
    position: relative;
    z-index: 3;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
}

.stat-number {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    color: var(--dark-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

/* ========================================
   7. CONTAINER & SECTIONS
   ======================================== */
.container-custom {
    background: white;
    border-radius: 30px;
    margin: 0 1rem;
    padding: clamp(2rem, 5vw, 3.5rem);
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 2.5rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
    min-width: 50px;
}

/* ========================================
   8. BOOK CARDS
   ======================================== */
.book-card {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 20px;
    background: white;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
}

.book-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--hover-shadow);
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.book-card:hover::before {
    opacity: 0.05;
}

.book-image-container {
    position: relative;
    height: clamp(250px, 30vw, 300px);
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.book-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.book-image[src] {
    animation: none;
    background: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.book-card:hover .book-image {
    transform: scale(1.1);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(30, 64, 175, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-title {
    color: white;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.book-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    white-space: nowrap;
}

.badge-author {
    background: var(--primary-yellow);
    color: var(--primary-blue);
}

.badge-category {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-blue);
}

.status-available {
    background: var(--success-color);
    color: white;
}

.status-unavailable {
    background: var(--danger-color);
    color: white;
}

.book-info {
    padding: 1.5rem;
    background: white;
    position: relative;
    z-index: 2;
}

.book-info .book-title {
    color: var(--primary-blue);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* ========================================
   9. SIDEBAR
   ======================================== */
.sidebar {
    background: white;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--card-shadow);
    height: fit-content;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-title i {
    color: var(--primary-yellow);
    font-size: 1.2em;
}

.category-list,
.bookshelf-list {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.list-group-item {
    border: none;
    border-bottom: 1px solid rgba(30, 64, 175, 0.1);
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
}

.list-group-item:hover::before {
    width: 4px;
}

.list-group-item:hover {
    background: var(--light-blue);
    transform: translateX(8px);
    color: var(--primary-blue);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* ========================================
   10. BUTTONS
   ======================================== */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-info {
    border: 2px solid var(--primary-yellow);
    color: var(--secondary-yellow);
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-info:hover {
    background: var(--gradient-secondary);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* ========================================
   11. FLOATING ACTION BUTTON
   ======================================== */
.floating-action {
    position: fixed;
    bottom: clamp(20px, 5vw, 30px);
    right: clamp(20px, 5vw, 30px);
    width: clamp(50px, 12vw, 60px);
    height: clamp(50px, 12vw, 60px);
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    box-shadow: var(--card-shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
}

.floating-action:hover {
    transform: scale(1.15);
    box-shadow: var(--hover-shadow);
    color: var(--primary-blue);
    background: var(--gradient-primary);
    color: white;
}

/* ========================================
   12. EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: clamp(3rem, 8vw, 4rem) 2rem;
    color: var(--gray);
}

.empty-state i {
    font-size: clamp(3rem, 8vw, 4rem);
    color: var(--light-blue);
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ========================================
   13. ENHANCED CARDS
   ======================================== */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(30, 64, 175, 0.1);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
}

.card-title {
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ========================================
   14. FOOTER
   ======================================== */
.footer {
    background: var(--dark-blue);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-accent);
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-brand {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-yellow);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.social-icon {
    width: clamp(2.5rem, 6vw, 3rem);
    height: clamp(2.5rem, 6vw, 3rem);
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: clamp(1rem, 3vw, 1.2rem);
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--gradient-secondary);
    color: var(--primary-blue);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ========================================
   15. FLASH MESSAGES
   ======================================== */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 500;
    backdrop-filter: blur(20px);
    box-shadow: var(--card-shadow);
    margin: 1rem;
}

.alert-success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary-blue);
    border-left: 4px solid var(--secondary-blue);
}

/* ========================================
   16. GUEST BOOK MODAL
   ======================================== */
.modal-guestbook {
    backdrop-filter: blur(5px);
}

.modal-guestbook .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-guestbook .modal-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 2rem;
    position: relative;
}

.modal-guestbook .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.1;
}

.modal-guestbook .modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.modal-guestbook .modal-body {
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
}

.guestbook-icon-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.guestbook-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
    animation: bounceInModal 0.6s ease;
}

@keyframes bounceInModal {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.guestbook-message {
    text-align: center;
    margin-bottom: 2rem;
}

.guestbook-message h4 {
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.guestbook-message p {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

.guestbook-stats-modal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.guestbook-stat-card-modal {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.guestbook-stat-card-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.guestbook-stat-card-modal i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.guestbook-stat-card-modal.today {
    border-left: 4px solid #10b981;
}

.guestbook-stat-card-modal.today i {
    color: #10b981;
}

.guestbook-stat-card-modal.total {
    border-left: 4px solid #3b82f6;
}

.guestbook-stat-card-modal.total i {
    color: #3b82f6;
}

.guestbook-stat-card-modal strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.guestbook-stat-card-modal small {
    color: var(--gray);
    font-size: 0.875rem;
    font-weight: 600;
}

.guestbook-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-guestbook {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-guestbook-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-guestbook-primary:hover {
    background: var(--gradient-secondary);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
}

.btn-guestbook-secondary {
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary-blue);
}

.btn-guestbook-secondary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
}

.guestbook-footer-note {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(30, 64, 175, 0.2);
}

.guestbook-footer-note small {
    color: var(--gray);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.guestbook-footer-note i {
    color: var(--primary-blue);
}

/* ========================================
   17. ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ========================================
   18. CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* ========================================
   19. UTILITIES
   ======================================== */
.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--card-shadow);
}

.shadow-custom-lg {
    box-shadow: var(--card-shadow-lg);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   20. RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    .container-custom {
        margin: 0 0.5rem;
        padding: 2rem 1.5rem;
    }

    .stats-section {
        margin: -2rem 0.5rem 2rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-title::after {
        width: 100px;
        height: 3px;
    }

    .sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar-nav {
        background: rgba(30, 64, 175, 0.98);
        border-radius: 15px;
        margin-top: 1rem;
        padding: 1rem;
    }

    .nav-link.active {
        background: var(--gradient-secondary);
        color: var(--white) !important;
        border-radius: 10px;
        margin: 0.25rem 0;
    }

    .nav-link.active:hover {
        color: var(--white) !important;
        transform: translateY(-1px);
    }

    .dropdown-menu {
        background: rgba(255, 255, 255, 0.95);
        position: static !important;
        transform: none !important;
        width: 100%;
        border-radius: 10px;
        margin-top: 0.5rem;
    }

    .search-box {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        border-radius: 20px;
    }

    .search-box input {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        border-radius: 12px;
        padding: 1rem;
    }

    .stats-section {
        margin: -1.5rem 0.5rem 2rem;
        padding: 1.5rem 1rem;
    }

    .stat-item {
        padding: 1rem 0.5rem;
    }

    .container-custom {
        margin: 0 0.5rem;
        padding: 1.5rem 1rem;
    }

    .book-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .book-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links {
        text-align: center;
    }

    .guestbook-stats-modal {
        grid-template-columns: 1fr;
    }

    .guestbook-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .book-image-container {
        height: 200px;
    }

    .book-overlay {
        padding: 1rem;
    }

    .book-info {
        padding: 1rem;
    }

    .sidebar {
        padding: 1.5rem 1rem;
    }

    .modal-guestbook .modal-body {
        padding: 2rem 1.5rem;
    }

    .guestbook-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .guestbook-stat-card-modal strong {
        font-size: 1.75rem;
    }
}

/* ========================================
   21. VISITOR WIDGET (WELCOME PAGE)
   ======================================== */
.visitor-widget {
    background: linear-gradient(135deg, var(--light-blue), rgba(255, 255, 255, 0.8));
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(30, 64, 175, 0.1);
}

.visitor-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.visitor-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
}

.visitor-stat-item i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.visitor-stat-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.visitor-stat-item small {
    color: var(--gray);
    font-size: 0.75rem;
}

.btn-visitor-register {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-visitor-register:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
    color: white;
}

/* ========================================
   22. GUESTBOOK MODAL (WELCOME PAGE)
   ======================================== */
.modal-guestbook {
    backdrop-filter: blur(5px);
}

.modal-guestbook .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-guestbook .modal-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 2rem;
    position: relative;
}

.modal-guestbook .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.1;
}

.modal-guestbook .modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.modal-guestbook .modal-body {
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
}

.guestbook-icon-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.guestbook-icon {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
    animation: bounceIn 0.6s ease;
}

.guestbook-message {
    text-align: center;
    margin-bottom: 2rem;
}

.guestbook-message h4 {
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.guestbook-message p {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

.guestbook-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.guestbook-stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.guestbook-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.guestbook-stat-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.guestbook-stat-card.today {
    border-left: 4px solid #10b981;
}

.guestbook-stat-card.today i {
    color: #10b981;
}

.guestbook-stat-card.total {
    border-left: 4px solid #3b82f6;
}

.guestbook-stat-card.total i {
    color: #3b82f6;
}

.guestbook-stat-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.guestbook-stat-card small {
    color: var(--gray);
    font-size: 0.875rem;
    font-weight: 600;
}

.guestbook-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-guestbook {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-guestbook i {
    font-size: 1.2rem;
}

.btn-guestbook-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-guestbook-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
    color: white;
}

.btn-guestbook-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-guestbook-secondary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.2);
}

.guestbook-footer-note {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed rgba(30, 64, 175, 0.2);
}

.guestbook-footer-note small {
    color: var(--gray);
    font-size: 0.875rem;
}

.guestbook-footer-note i {
    color: var(--primary-yellow);
    margin-right: 0.25rem;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .guestbook-actions {
        grid-template-columns: 1fr;
    }

    .guestbook-stats {
        grid-template-columns: 1fr;
    }

    .modal-guestbook .modal-body {
        padding: 1.5rem 1rem;
    }
}
