/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Ciemny motyw - Elegancka paleta */
    --primary-color: #00d4ff;
    --primary-hover: #00b8e6;
    --primary-glow: rgba(0, 212, 255, 0.3);
    --secondary-color: #6366f1;
    --secondary-hover: #4f46e5;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;

    /* Tło i powierzchnie */
    --bg-primary: #0a0e27;
    --bg-secondary: #131729;
    --bg-card: #1a1f3a;
    --bg-hover: #252b4a;
    --bg-input: #1e2442;

    /* Teksty */
    --text-primary: #e8eaed;
    --text-secondary: #a0a5b9;
    --text-muted: #6b7280;

    /* Akcenty i obramowania */
    --border-color: #2a3154;
    --border-hover: #3a4164;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #6366f1 100%);

    /* Cienie */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--primary-glow);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Strona logowania */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp 0.5s ease;
    position: relative;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(0, 212, 255, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.login-form {
    padding: 40px 30px;
}

.login-footer {
    padding: 20px 30px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.login-footer strong {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

/* Nawigacja */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 0;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0.3;
}

.nav-brand {
    padding: 20px 30px;
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
}

.nav-link {
    padding: 20px 25px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-hover);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Page header */
.page-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

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

.page-header h1 {
    font-size: 32px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.page-header p strong {
    color: var(--primary-color);
}

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    font-weight: 600;
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

/* Alerty */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--success-color);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger-color);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--warning-color);
    color: #fcd34d;
}

.alert-info {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--info-color);
    color: #67e8f9;
}

.alert h3 {
    color: inherit;
    margin-bottom: 8px;
}

/* Formularze */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    appearance: none;
}

.form-inline {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-inline input {
    flex: 1;
    min-width: 250px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.user-form,
.access-form,
.folder-form {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Fix dla input w form-inline (tworzenie folderu) */
.form-inline input[type="text"] {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-inline input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-glow);
}

.form-inline input[type="text"]::placeholder {
    color: var(--text-muted);
}

/* Przyciski */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-input);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* Foldery */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.folders-list h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 18px;
}

.folder-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    position: relative;
    overflow: hidden;
}

.folder-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.folder-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.folder-item:hover::before {
    opacity: 1;
}

.folder-item.active {
    border-color: var(--primary-color);
    background: var(--bg-hover);
    box-shadow: var(--shadow-md);
}

.folder-item.active::before {
    opacity: 1;
}

.folder-icon {
    font-size: 48px;
    margin-bottom: 10px;
    filter: grayscale(0.3);
}

.folder-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.folder-count {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.folder-header h2 {
    border-bottom: none;
    margin: 0;
    padding: 0;
}

/* Upload area */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
    box-shadow: var(--shadow-glow);
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.upload-text {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.file-list {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.file-list h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.file-list ul {
    list-style: none;
}

.file-list li {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.file-list li:hover {
    background: var(--bg-hover);
    border-radius: 6px;
    color: var(--text-primary);
}

.file-list li:last-child {
    border-bottom: none;
}

#uploadButtons {
    margin-top: 20px;
    gap: 15px;
}

#uploadButtons button {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
}

#uploadButtons button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#uploadButtons button:hover::before {
    width: 300px;
    height: 300px;
}

#uploadButtons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-progress {
    margin: 20px 0;
}

/* Zdjęcia */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.photo-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.photo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary-color);
}

.photo-item:hover::before {
    opacity: 1;
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.photo-item img:hover {
    transform: scale(1.05);
}

.photo-info {
    padding: 15px;
    background: var(--bg-card);
}

.photo-name {
    font-weight: 600;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.photo-folder {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.photo-size {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

/* Tabela */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
}

.users-table thead {
    background: var(--bg-input);
}

.users-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.users-table td strong {
    color: var(--text-primary);
}

.users-table tbody tr {
    transition: all 0.2s ease;
}

.users-table tbody tr:hover {
    background: var(--bg-hover);
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

/* Access summary */
.access-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-access-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.user-access-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.user-access-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.folder-list {
    list-style: none;
}

.folder-list li {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.folder-list li:hover {
    background: var(--bg-hover);
    border-radius: 6px;
    color: var(--text-primary);
}

.folder-list li:last-child {
    border-bottom: none;
}

/* Modal dla podglądu zdjęć */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--shadow-glow);
    border: 2px solid var(--border-color);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-primary);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    z-index: 10000;
}

.modal-close:hover {
    color: var(--danger-color);
    transform: scale(1.1);
}

#modalCaption {
    color: var(--text-primary);
    text-align: center;
    padding: 15px 25px;
    font-size: 18px;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 80%;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

/* No data message */
.no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-brand {
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-link {
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        border-left: none;
    }

    .nav-link.active {
        border-bottom-color: var(--primary-color);
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .form-inline input {
        width: 100%;
    }

    .folder-grid,
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .page-header h1 {
        font-size: 24px;
    }

    .folder-header {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }

    .card {
        padding: 20px;
    }

    .modal-folders-content {
        max-width: 95%;
        margin: 0 10px;
    }

    .modal-folders-header {
        padding: 15px 20px;
    }

    .modal-folders-header h2 {
        font-size: 18px;
    }

    .modal-photo-item,
    .photo-list-item {
        flex-wrap: wrap;
    }

    .photo-list-thumb,
    .modal-photo-thumb {
        width: 60px;
        height: 60px;
    }
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.alert,
.folder-item,
.photo-item {
    animation: fadeIn 0.5s ease;
}

/* Pulsacja dla ładowania */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Dodatkowe efekty */
a {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Section divider */
.section-divider {
    width: 100%;
    height: 2px;
    background: var(--border-color);
    margin: 30px 0 20px;
}

/* Folder item special (Zobacz wszystkie) */
.folder-item-special {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(0, 212, 255, 0.1) 100%);
    border-color: var(--primary-color);
}

.folder-item-special:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(0, 212, 255, 0.2) 100%);
    border-color: var(--primary-hover);
}

/* Modal folderów */
.modal-folders {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-folders-content {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: zoomIn 0.3s ease;
}

.modal-folders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
}

.modal-folders-header h2 {
    color: var(--primary-color);
    margin: 0;
    font-size: 24px;
}

.modal-folders-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-folder-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modal-folder-item:hover {
    border-color: var(--primary-color);
}

.modal-folder-header-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-folder-header-item:hover {
    background: var(--bg-hover);
}

.modal-folder-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-folder-icon {
    font-size: 24px;
}

.modal-folder-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}

.modal-folder-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-folder-toggle {
    color: var(--primary-color);
    font-size: 16px;
    transition: transform 0.3s ease;
}

.modal-folder-photos {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-input);
}

.no-photos-msg {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.modal-photo-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.modal-photo-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
}

.modal-photo-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border-color);
}

.modal-photo-info {
    flex: 1;
}

.modal-photo-name {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-photo-size {
    color: var(--text-muted);
    font-size: 13px;
}

/* Lista zdjęć (nowy styl) */
.photos-list-container {
    max-height: 600px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
}

.photo-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.photo-list-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
    transform: translateX(5px);
}

.photo-list-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.photo-list-info {
    flex: 1;
    min-width: 0;
}

.photo-list-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-list-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.photo-list-folder {
    color: var(--text-secondary);
}

.photo-list-size {
    color: var(--text-muted);
}

/* Centrowanie przycisku upload */
#uploadBtn {
    display: block;
    margin: 20px auto 0;
    width: fit-content;
}

/* Upload area - pliki w środku */
.file-list {
    display: none;
    margin: 0;
    padding: 15px 0;
    text-align: center;
}

.file-list h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.file-list ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;
}

.file-list li {
    padding: 10px 15px;
    margin: 8px 0;
    background: var(--bg-hover);
    border-radius: 8px;
    color: var(--text-secondary);
    text-align: left;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.file-list li:hover {
    border-color: var(--primary-color);
    background: var(--bg-card);
}

#uploadInitial {
    text-align: center;
}

/* Progress bar dla uploadu */
.progress-status {
    text-align: center;
    padding: 20px;
}

.progress-status h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 20px;
}

.current-file {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    margin: 10px 0;
}

.file-extension {
    color: var(--text-muted);
    font-size: 13px;
    margin: 5px 0;
    font-family: 'Courier New', monospace;
}

.ai-processing {
    color: var(--primary-color);
    font-size: 14px;
    margin: 8px 0;
    animation: pulse 2s infinite;
}

.no-ai {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 8px 0;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 10px;
}

.upload-summary {
    margin-top: 20px;
}

.upload-summary .alert {
    text-align: left;
    margin: 10px 0;
}