/* ============================================
   Albums CSS - Centralized Styling
   ============================================ */

/* ✅ CSS Variables for Easy Control */
:root {
    /* Padding Control - এখানে পরিবর্তন করুন */
    --album-container-padding-y: 20px;
    --album-container-padding-x: 5%;      /* বাম-ডান padding */
    --album-sidebar-padding: 0;
    --album-content-padding: 40px;
    
    /* Colors */
    --album-primary: #9b59b6;
    --album-primary-dark: #8e44ad;
    --album-secondary: #8e44ad;
    --album-bg: #f0f2f5;
    --album-card-bg: #fff;
    --album-border: #e9ecef;
    --album-text: #333;
    --album-text-muted: #6c757d;
    
    /* Spacing */
    --album-gap: 20px;
    --album-border-radius: 12px;
    --album-shadow: 0 2px 8px rgba(0,0,0,0.08);
    
    /* Layout */
    --album-sidebar-width: 280px;
}

/* ============================================
   Layout Structure
   ============================================ */

/* Main Container */
.album-creator-container,
.album-list-container,
.album-detail-container {
    min-height: 100vh;
    background: var(--album-bg);
    padding: var(--album-container-padding-y) var(--album-container-padding-x);
    width: 100%;
    box-sizing: border-box;
}

/* Two Column Layout */
.album-layout {
    display: grid;
    grid-template-columns: var(--album-sidebar-width) 1fr;
    gap: var(--album-gap);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ============================================
   Sidebar Styling
   ============================================ */

.album-sidebar {
    background: var(--album-card-bg);
    border-radius: var(--album-border-radius);
    box-shadow: var(--album-shadow);
    padding: var(--album-sidebar-padding);
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid var(--album-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--album-primary) 0%, var(--album-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--album-text);
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--album-text);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-menu a:hover {
    background: #f8f9fa;
    color: var(--album-primary);
}

.sidebar-menu li.active a {
    background: linear-gradient(135deg, var(--album-primary) 0%, var(--album-secondary) 100%);
    color: #fff;
    font-weight: 600;
}

.sidebar-menu a i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* ============================================
   Content Area
   ============================================ */

.album-main-content {
    background: var(--album-card-bg);
    border-radius: var(--album-border-radius);
    box-shadow: var(--album-shadow);
    overflow: hidden;
}

/* Header */
.creator-header {
    background: linear-gradient(135deg, var(--album-primary) 0%, var(--album-secondary) 100%);
    color: #fff;
    padding: 30px 40px;
    text-align: center;
}

.header-icon {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 32px;
    backdrop-filter: blur(10px);
}

.header-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.header-subtitle {
    font-size: 15px;
    opacity: 0.95;
    margin: 0;
}

/* Form Content */
.creator-content {
    padding: var(--album-content-padding);
}

/* ============================================
   Form Elements
   ============================================ */

.form-group {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--album-text);
    font-size: 15px;
}

.required {
    color: #dc3545;
    margin-left: 4px;
}

.form-control, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--album-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--album-primary);
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-text {
    font-size: 13px;
    color: var(--album-text-muted);
    margin-top: 6px;
    display: block;
}

.text-danger {
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
}

/* ============================================
   Photo Upload Section
   ============================================ */

.photo-upload-section {
    background: #f8f9fa;
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 30px;
}

.photo-upload-section:hover {
    border-color: var(--album-primary);
    background: #f0f4ff;
}

.upload-icon {
    font-size: 48px;
    color: var(--album-primary);
    margin-bottom: 15px;
}

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

.upload-hint {
    font-size: 14px;
    color: var(--album-text-muted);
}

input[type="file"] {
    display: none;
}

/* Photo Preview Grid */
.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-photo:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* ============================================
   Buttons
   ============================================ */

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--album-primary) 0%, var(--album-secondary) 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.btn-secondary {
    background: var(--album-text-muted);
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 992px) {
    :root {
        --album-container-padding-x: 3%;
    }
    
    .album-layout {
        grid-template-columns: 1fr;
    }

    .album-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --album-container-padding-x: 10px;
        --album-content-padding: 30px 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

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

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}


/* Encyclopedia Right Sidebar Styles */
.encyclopedia-sidebar-right {
    background: white;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.encyclopedia-sidebar-right .sidebar-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.encyclopedia-sidebar-right .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.encyclopedia-sidebar-right .category-item {
    border-bottom: 1px solid #f0f0f0;
}

.encyclopedia-sidebar-right .category-item:last-child {
    border-bottom: none;
}

.encyclopedia-sidebar-right .category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.encyclopedia-sidebar-right .category-link:hover {
    background: #f8f9fa;
    color: #f39c12;
    padding-left: 25px;
}

.encyclopedia-sidebar-right .category-link.active {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    font-weight: 600;
}

.encyclopedia-sidebar-right .category-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.encyclopedia-sidebar-right .category-icon-small {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.encyclopedia-sidebar-right .category-details {
    flex: 1;
    min-width: 0;
}

.encyclopedia-sidebar-right .category-name-small {
    font-size: 0.95rem;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.encyclopedia-sidebar-right .category-count-badge {
    background: #e8f0fe;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.encyclopedia-sidebar-right .category-link:hover .category-count-badge {
    background: rgba(255,255,255,0.2);
    color: white;
}

.encyclopedia-sidebar-right .category-link.active .category-count-badge {
    background: rgba(255,255,255,0.2);
    color: white;
}

.view-all-categories {
    padding: 15px 20px;
    text-align: center;
    border-top: 2px solid #f0f0f0;
}

.view-all-categories a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.view-all-categories a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.encyclopedia-stats {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0 0 15px 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

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

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Encyclopedia specific styles */
.encyclopedia-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.encyclopedia-search {
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    transform: translateY(-50%) scale(1.05);
}

.entries-section {
    margin-top: 40px;
}

.encyclopedia-posts-feed {
    max-width: 800px;
    margin: 0 auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1rem;
}
