/* assets/css/style.css - NOWOCZESNE PIĘKNE STYLE z POPRAWIONYMI OKŁADKAMI */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Jasne, nowoczesne kolory */
    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;
    --secondary: #8B5CF6;
    --accent: #06D6A0;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    
    /* Neutralne jasne kolory */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Gradient backgrounds */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-light: linear-gradient(135deg, #f6f8ff 0%, #f0f4ff 100%);
    --card-gradient: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-2xl: 64px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--gray-800);
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* HEADER - Nowoczesny, elegancki */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: var(--spacing-md);
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.logo a {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-buttons {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
}

.welcome-text {
    color: var(--gray-600);
    font-weight: 500;
    margin-right: var(--spacing);
    font-size: 15px;
}

/* BUTTONS - Piękne, nowoczesne przyciski */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
    border: 2px solid var(--primary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #34D399 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #FBBF24 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #F87171 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
}

/* ALERTS - Eleganckie powiadomienia */
.alert {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    padding: var(--spacing) var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    animation: slideInDown 0.3s ease-out;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065F46;
    border-color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #991B1B;
    border-color: var(--error);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
    border-color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1E40AF;
    border-color: var(--primary);
}

/* CONTENT AREAS - Piękne karty */
.content-area {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.content-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.search-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

/* SEARCH BAR - Nowoczesne wyszukiwanie */
.search-bar {
    display: flex;
    gap: var(--spacing);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 280px;
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: white;
}

.search-input::placeholder {
    color: var(--gray-400);
}

/* CATEGORY FILTERS - Piękne filtry */
.category-filters {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.8);
    color: var(--gray-900);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

/* EBOOK GRID - Piękna siatka kart */
.ebook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.ebook-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.ebook-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ebook-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(59, 130, 246, 0.3);
}

.ebook-card:hover::before {
    transform: scaleX(1);
}

/* POPRAWIONE OKŁADKI E-BOOKÓW - Wyświetlają całą okładkę bez przycinania */
.ebook-cover-img {
    width: 180px;
    height: 200px;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    object-fit: contain; /* Wyświetla całą okładkę bez przycinania */
    object-position: center;
    background: var(--gray-100);
    display: block;
    transition: all 0.3s ease;
}

.ebook-cover-placeholder {
    width: 180px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    text-align: center;
    transition: all 0.3s ease;
}

.ebook-card:hover .ebook-cover-img,
.ebook-card:hover .ebook-cover-placeholder {
    transform: scale(1.05);
}

/* Stare style dla okładek (fallback) */
.ebook-cover {
    width: 180px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    text-align: center;
    background-size: contain; /* Zmieniono z cover na contain */
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ebook-cover.has-image {
    background-color: var(--gray-100);
}

.ebook-card:hover .ebook-cover {
    transform: scale(1.05);
}

/* Style dla okładek w modalu */
.modal-ebook-cover {
    width: 150px;
    height: 200px;
    border-radius: var(--radius-md);
    margin: 0 auto 20px;
    object-fit: contain;
    object-position: center;
    background: var(--gray-100);
    display: block;
}

.modal-ebook-cover-placeholder {
    width: 150px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    border-radius: var(--radius-md);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
}

.ebook-info h3 {
    color: var(--gray-800);
    margin-bottom: var(--spacing-sm);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.ebook-info p {
    color: var(--gray-600);
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
    line-height: 1.5;
}

.ebook-price {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: var(--spacing) 0;
}

/* FORMS - Piękne formularze */
.form-container {
    max-width: 480px;
    margin: var(--spacing-2xl) auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* FILE UPLOAD - Piękny upload plików */
.file-upload {
    position: relative;
    display: block;
    width: 100%;
}

.file-upload input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    text-align: center;
}

.file-upload-label:hover,
.file-upload.has-file .file-upload-label {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.file-upload.has-file .file-upload-label {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

/* MODALS - Piękne modale */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn {
    position: absolute;
    top: var(--spacing);
    right: var(--spacing);
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray-500);
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    color: var(--gray-800);
    transform: rotate(90deg);
}

/* ADMIN DASHBOARD - Piękne statystyki */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transition: all 0.3s ease;
    transform: scale(0);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.stat-card:hover::before {
    transform: scale(1);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* LISTS - Piękne listy */
.item-list {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-md);
}

.item-list h3 {
    margin-bottom: var(--spacing-md);
    color: var(--gray-800);
    font-weight: 700;
    font-size: 20px;
    padding-bottom: var(--spacing);
    border-bottom: 2px solid var(--gray-100);
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
    gap: var(--spacing);
    transition: all 0.2s ease;
    border-radius: var(--radius);
}

.list-item:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(4px);
}

.list-item:last-child {
    border-bottom: none;
}

.item-info strong {
    color: black;
    font-size: 16px;
    font-weight: 600;
}

.item-meta {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: var(--spacing-xs);
    line-height: 1.5;
}

.item-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* DASHBOARD GRID - Piękne karty dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-md);
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dashboard-card:hover::before {
    transform: scaleY(1);
}

.dashboard-card h3 {
    margin-bottom: var(--spacing);
    color: black;
    font-weight: 700;
    font-size: 18px;
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--gray-100);
}

/* PAYMENT STATUS - Piękne statusy */
.payment-status {
    padding: 6px 12px;
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.payment-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.payment-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.payment-status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* LOADING SPINNER - Piękny loader */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

/* ANIMATIONS - Płynne animacje */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* PAGINATION - Piękna paginacja */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
	color: white;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: var(--spacing-sm) var(--spacing);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    background:gray;
    backdrop-filter: blur(10px);
}

.pagination a:hover {
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}
h4{
	color:black;
}
p{
	color:black;
}
label{
	color:black;
}
/* RESPONSIVE DESIGN - Piękny na wszystkich urządzeniach */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing);
    }
    
    .nav {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .nav-buttons {
        justify-content: center;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-input {
        min-width: 100%;
    }
    
    .ebook-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: var(--spacing-md);
        max-height: 95vh;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .form-container {
        margin: var(--spacing-md) auto;
        padding: var(--spacing-md);
    }
    
    .content-area {
        padding: var(--spacing-md);
    }
    
    .header {
        position: relative;
        top: 0;
    }
    
    /* Mobile okładki */
    .ebook-cover-img,
    .ebook-cover,
    .ebook-cover-placeholder {
        height: 140px;
        font-size: 36px;
    }
    
    .modal-ebook-cover,
    .modal-ebook-cover-placeholder {
        width: 120px;
        height: 160px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 28px;
    }
    
    .welcome-text {
        display: none;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .category-btn {
        font-size: 12px;
        padding: 8px 16px;
    }
	.ebook-cover-img,
    .ebook-cover,
    .ebook-cover-placeholder {
        height: 120px; /* Najmniejsze na bardzo małych ekranach */
        font-size: 28px;
    }
    
    .modal-ebook-cover,
    .modal-ebook-cover-placeholder {
        width: 100px;
        height: 140px;
        font-size: 24px;
    }
}

/* UTILITY CLASSES - Pomocnicze klasy */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-10 { margin-bottom: var(--spacing-sm); }
.mb-20 { margin-bottom: var(--spacing); }
.mb-30 { margin-bottom: var(--spacing-md); }

.mt-10 { margin-top: var(--spacing-sm); }
.mt-20 { margin-top: var(--spacing); }
.mt-30 { margin-top: var(--spacing-md); }

.hidden { display: none; }
.visible { display: block; }

.float-right { float: right; }
.float-left { float: left; }

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* FIELD ERRORS - Piękne błędy */
.field-error {
    color: var(--error);
    font-size: 12px;
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 500;
}

/* IMAGE AND FILE PREVIEWS - Piękne podglądy */
.image-preview,
.file-info {
    margin-top: var(--spacing);
    padding: var(--spacing);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* TABLES - Piękne tabele */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.data-table th,
.data-table td {
    padding: var(--spacing) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.data-table th {
    background: rgba(59, 130, 246, 0.05);
    font-weight: 600;
    color: var(--gray-800);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: var(--radius-lg);
}

/* CUSTOM SCROLLBAR - Piękny scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* SELECTION STYLES - Piękne zaznaczanie */
::selection {
    background: rgba(59, 130, 246, 0.2);
    color: var(--gray-800);
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.2);
    color: var(--gray-800);
}

/* GLASSMORPHISM EFFECTS - Nowoczesne efekty szkła */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* HERO SECTION - Piękna sekcja główna */
.hero {
    text-align: center;
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing);
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    color: var(--gray-600);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* FEATURE CARDS - Piękne karty funkcji */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    color: var(--gray-800);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    font-size: 20px;
}

.feature-card p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* FLOATING ACTION BUTTON - Piękny FAB */
.fab {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    z-index: 999;
}

.fab:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
}

/* TOAST NOTIFICATIONS - Piękne powiadomienia */
.toast {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ACCESSIBILITY - Dostępność */
.btn:focus,
input:focus,
select:focus,
textarea:focus,
.category-btn:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* PRINT STYLES - Style do druku */
@media print {
    .header, .nav-buttons, .btn, .modal, .fab {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .content-area, .search-section {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .ebook-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* HIGH CONTRAST MODE - Wysoki kontrast */
@media (prefers-contrast: high) {
    :root {
        --primary: #000;
        --secondary: #000;
        --gray-600: #000;
        --gray-700: #000;
        --gray-800: #000;
    }
}

/* REDUCED MOTION - Ograniczone animacje */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .btn:hover,
    .ebook-card:hover,
    .stat-card:hover,
    .dashboard-card:hover,
    .feature-card:hover {
        transform: none !important;
    }
}

/* DARK MODE SUPPORT - Wsparcie trybu ciemnego */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        --gray-50: #0f0f23;
        --gray-100: #1a1a2e;
        --gray-800: #e2e8f0;
        --gray-700: #cbd5e0;
        --gray-600: #a0aec0;
    }
    
    .content-area,
    .search-section,
    .header,
    .modal-content,
    .form-container {
        background: rgba(26, 26, 46, 0.9);
        color: #e2e8f0;
    }
}

/* SPECIAL EFFECTS - Specjalne efekty */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.pulse-on-hover:hover {
    animation: pulse 0.5s ease-in-out;
}

/* MODERN CHECKBOX AND RADIO - Nowoczesne checkboxy */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* FINAL TOUCHES - Ostatnie szlify */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

.container {
    position: relative;
}

/* Efekt paralaksy dla tła */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    z-index: -1;
}

/* Dodatkowe dekoracje */
.decorative-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    z-index: -1;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.blob-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    top: 60%;
    right: 10%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* DODATKOWE STYLE DLA EBOOK CARDS */
.ebook-card .btn {
    margin-top: auto;
}

.ebook-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* FOCUS STYLES - Lepsze style focus */
.ebook-card:focus-within {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* LOADING STATES - Stany ładowania */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ERROR STATES - Stany błędów */
.error-state {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    padding: var(--spacing);
    text-align: center;
}

/* SUCCESS STATES - Stany sukcesu */
.success-state {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius);
    padding: var(--spacing);
    text-align: center;
}

/* EMPTY STATES - Stany puste */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--gray-500);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: var(--spacing);
    opacity: 0.5;
}

/* NOTIFICATION BADGES - Odznaki powiadomień */
.notification-badge {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

/* HOVER EFFECTS - Dodatkowe efekty hover */
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* TRANSITIONS - Uniwersalne przejścia */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.transition-transform {
    transition: transform 0.2s ease;
}

/* Z-INDEX MANAGEMENT - Zarządzanie warstwami */
.z-auto { z-index: auto; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }