
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #E0E9E9;
    color: #1C3F3A;
    min-height: 100vh;
}

/* Header Styles */
.header-bar {
    background-color: #1C3F3A;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 24px;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}

.logo-text p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    padding: 10px 20px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: #FFFFFF;
    color: #1C3F3A;
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.lang-select {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-select:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lang-select .flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
}

.lang-select span {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
}

.lang-select i {
    color: #FFFFFF;
    font-size: 12px;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    min-width: 160px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #1C3F3A;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.lang-dropdown li:hover {
    background-color: #E0E9E9;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 60px 80px;
}

.page-header {
    margin-bottom: 50px;
}

.page-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1C3F3A;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 16px;
    color: #1C3F3A;
    opacity: 0.7;
}

/* Library Cards */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 32px;
}

.library-card {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(28, 63, 58, 0.08);
    transition: all 0.3s ease;
}

.library-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(28, 63, 58, 0.12);
}

.card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.card-body {
    padding: 24px;
}

.card-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.badge-pdf {
    background-color: #E3F2FD;
    color: #1976D2;
}

.badge-book {
    background-color: #E8F5E9;
    color: #388E3C;
}

.badge-recipe {
    background-color: #FFF3E0;
    color: #F57C00;
}

.card-size {
    float: right;
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1C3F3A;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-description {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
    margin-bottom: 20px;
}

.card-pages {
    font-size: 14px;
    color: #6B7280;
}

.card-price {
    font-size: 14px;
    font-weight: 600;
    color: #10B981;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: #2563EB;
    color: #FFFFFF;
    flex: 1;
}

.btn-primary:hover {
    background-color: #1D4ED8;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #10B981;
    color: #FFFFFF;
    width: 48px;
    padding: 12px;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1C3F3A;
    flex: 1;
    line-height: 1.4;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #F3F4F6;
    color: #1C3F3A;
}

.modal-body {
    padding: 24px;
}

.modal-info {
    background-color: #F9FAFB;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.modal-info p {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 8px;
}

.modal-info p:last-child {
    margin-bottom: 0;
}

.modal-info strong {
    color: #1C3F3A;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1C3F3A;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
}

.btn-secondary {
    background-color: #F3F4F6;
    color: #1C3F3A;
    flex: 1;
}

.btn-secondary:hover {
    background-color: #E5E7EB;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #D1D5DB;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: #6B7280;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: #9CA3AF;
}

/* Responsive */
@media (max-width: 768px) {
    .header-bar {
        padding: 16px 24px;
        flex-direction: column;
        gap: 16px;
    }

    .header-right {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    main {
        padding: 40px 24px;
    }

    .library-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .page-header h2 {
        font-size: 28px;
    }
}
.success-modal {
    border-top: 5px solid #28a745;
    text-align: center;
}

.text-success {
    color: #28a745;
}

#successModal .modal-content {
    max-width: 400px;
}

#successModal .modal-body p {
    font-size: 1rem;
    color: #333;
    margin-top: 10px;
}
