/* Profile & Marketplace Styles */
/* Consolidated from embedded styles in PHP files */

/* ==================== PROFILE STYLES ==================== */

/* Profile page spacing */
.container.main-content {
    padding-top: 20px;
    padding-bottom: 20px;
    /* Main content must be transparent to show body background */
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Profile Banner */
.profile-banner-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    margin: 0;
    width: 100%;
    background: var(--brand-gradient);
}

.profile-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile Picture */
.profile-picture-container {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-picture-container:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none; /* Remove default white border */
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Default border only if no custom border is applied to the image */
.profile-picture:not([style*="border"]) {
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Edit Overlays */
.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    border-radius: inherit;
}

.profile-banner-container:hover .edit-overlay {
    opacity: 1;
}

.edit-overlay i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.edit-overlay span {
    font-size: 0.8rem;
    text-align: center;
}

.profile-pic-edit {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.profile-picture-container:hover .profile-pic-edit {
    opacity: 1;
}

.profile-pic-edit i {
    font-size: 0.8rem;
    color: white;
}

/* Profile Info Section */
.profile-info-section {
    position: relative;
    z-index: 1;
}

/* Modern Profile Card */
.modern-profile-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.125));
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modern-profile-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Dark theme support for profile card */
[data-bs-theme="dark"] .modern-profile-card {
    border-color: var(--bs-border-color, #495057) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .modern-profile-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* New Clean Profile Header Layout */
.profile-header-layout {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.profile-picture-wrapper {
    flex-shrink: 0;
}

.profile-info-main {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink below content size */
}

.profile-name-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.profile-name-row .profile-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.profile-name-row .profile-username {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.8;
}

.profile-badges-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    max-width: 100%;
}

.profile-badges-row .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-badges-row .beta-badge {
    font-size: 0.65rem;
}

.profile-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.profile-status-row .status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    line-height: 1.2;
}

.profile-status-row .status-indicator i {
    font-size: 0.65rem;
}

.profile-status-row .status-text {
    font-size: 0.875rem;
}

.profile-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--brand-gradient);
    color: var(--text-primary);
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.profile-level-badge i {
    font-size: 0.7rem;
    opacity: 0.9;
}

.profile-level-badge .level-title {
    font-weight: 600;
}

.profile-level-badge .level-number {
    opacity: 0.85;
    font-weight: 700;
}

.live-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: #dc3545;
    color: white;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    animation: pulse 2s infinite;
    transition: all 0.2s ease;
}

.live-badge-link:hover {
    background: #c82333;
    color: white;
    transform: scale(1.05);
    text-decoration: none;
}

.live-badge-link i {
    font-size: 0.7rem;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.profile-info-main .profile-bio-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.75rem;
    max-width: 600px;
}

.profile-info-main .profile-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

/* Legacy Profile Name Styles */
.profile-name {
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-primary) !important;
    line-height: 1.25;
}

.profile-header-info .profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.profile-info {
    color: var(--text-primary);
}

.profile-info > div {
    line-height: 1.6;
    color: var(--text-primary);
}

.profile-info strong {
    color: var(--text-primary) !important;
}

.profile-bio {
    color: var(--text-primary) !important;
    max-width: 600px;
}

/* User Status Styles */
.user-status-display {
    font-size: 0.9rem;
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-light);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-indicator i {
    font-size: 0.7rem;
    animation: pulse 2s infinite;
}

.status-indicator.online i {
    color: var(--btn-success) !important;
    animation: none;
}

.status-indicator.away i {
    color: var(--btn-warning) !important;
    animation: pulse 2s infinite;
}

.status-indicator.offline i {
    color: var(--text-secondary) !important;
    animation: none;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes pulse-live {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% { 
        opacity: 0.85;
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }
}

.live-badge-pulse {
    animation: pulse-live 2s infinite;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.live-badge-pulse i {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Links and Usernames */
.text-link {
    color: var(--link-color);
    text-decoration: underline;
    word-break: break-all;
}

.text-link:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.username-link {
    color: var(--btn-success);
    text-decoration: none;
    font-weight: 500;
}

.username-link:hover {
    color: var(--btn-success);
    opacity: 0.8;
    text-decoration: underline;
}

/* Shared Post Styling */
.shared-post-header {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-radius: 8px;
    padding: 8px 12px;
    border-left: 3px solid #28a745;
}

.shared-post-content {
    border-left: 3px solid #28a745;
    padding-left: 15px;
    margin: 10px 0;
}

.shared-original-content {
    font-style: italic;
    color: var(--text-primary) !important;
    line-height: 1.6;
}

.post-content {
    color: var(--text-primary) !important;
    line-height: 1.6;
}

.original-post-attribution {
    background: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
    padding: 4px 8px;
    border-left: 2px solid #28a745;
}

.original-post-attribution a {
    color: #28a745 !important;
}

.original-post-attribution a:hover {
    color: #1e7e34 !important;
    text-decoration: underline !important;
}

/* Theme-aware shared post styling */
.theme-dark .shared-post-header,
[data-theme="dark"] .shared-post-header {
    background: linear-gradient(135deg, #2d5a3d 0%, #1a3d1a 100%);
    color: var(--text-primary);
}

.theme-dark .shared-post-content,
[data-theme="dark"] .shared-post-content {
    border-left-color: #38a169;
}

.theme-dark .shared-original-content,
[data-theme="dark"] .shared-original-content {
    color: var(--text-primary) !important;
}

.theme-dark .post-content,
[data-theme="dark"] .post-content {
    color: var(--text-primary) !important;
}

.theme-dark .original-post-attribution,
[data-theme="dark"] .original-post-attribution {
    background: rgba(40, 167, 69, 0.2);
    color: var(--text-primary);
}

/* Folder and Media Gallery Styles */
.folder-item {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.folder-item:hover {
    transform: translateY(-2px);
}

/* Inline Media Editing Styles */
.media-title-edit, .media-description-edit {
    margin-bottom: 5px;
}

.media-title-edit:focus, .media-description-edit:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.folder-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px;
    height: 100%;
    transition: all 0.2s ease;
}

.folder-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--border-color);
}

.media-item {
    transition: transform 0.2s ease;
}

.media-item:hover {
    transform: translateY(-2px);
}

.media-thumbnail {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.media-thumbnail:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Stream Confirmation Overlay */
.stream-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.stream-confirm-box {
    background: var(--bg-primary, #fff);
    border: 2px solid var(--border-light, #dee2e6);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.stream-confirm-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stream-confirm-box h5 {
    color: var(--text-primary, #212529);
    font-weight: 600;
}

.stream-confirm-box p {
    color: var(--text-secondary, #6c757d);
    font-size: 0.95rem;
}

/* Stream Toast Notifications */
.stream-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.stream-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.stream-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stream-toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stream-toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

.stream-toast-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.stream-toast-danger {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.stream-toast-info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.stream-toast-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .folder-card {
        padding: 10px;
    }
    
    .media-thumbnail img,
    .media-thumbnail video {
        height: 120px !important;
    }
    
    .stream-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .stream-confirm-box {
        padding: 20px;
    }
}

/* ==================== MARKETPLACE STYLES ==================== */

/* Marketplace Item Cards */
.marketplace-item-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.marketplace-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

/* ==================== CUSTOMIZATION STYLES ==================== */

/* Customization Item Selection */
.customization-item {
    position: relative;
    transition: all 0.2s;
    border: 3px solid transparent;
    border-radius: 8px;
}

.customization-item:hover {
    transform: scale(1.05);
    border-color: var(--bs-primary);
}

.customization-item.active {
    border-color: var(--bs-success);
    box-shadow: 0 0 15px rgba(25, 135, 84, 0.3);
}

.customization-item.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--bs-success);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ==================== THEME OVERRIDES ==================== */

/* Ensure customizations override themes */
body[style*="background-color"],
body[style*="background-image"] {
    /* User profile customizations should take priority */
    background-attachment: fixed !important;
}

/* Ensure content is visible on custom backgrounds */
.card {
    background: var(--bg-primary, white);
    backdrop-filter: blur(10px);
}

/* Dark mode adjustments for custom backgrounds */
[data-theme="dark"] .card {
    background: rgba(30, 30, 30, 0.95);
}

[data-theme="light"] .card {
    background: rgba(255, 255, 255, 0.95);
}

/* Additional footer protection for custom backgrounds */
body[style*="background"] .site-footer,
body[style*="background"] .footer {
    /* Ensure footer covers entire width even with custom backgrounds */
    box-sizing: border-box;
}

body[style*="background"] .site-footer .container,
body[style*="background"] .footer .container {
    max-width: 100%;
}

/* ==================== ADDITIONAL PROFILE STYLES ==================== */

/* Comment username link styles */
.comment-item a {
    transition: all 0.2s ease;
}

.comment-item a:hover {
    opacity: 0.8;
}

.comment-item a:hover strong {
    text-decoration: underline;
}

/* Pin button active state */
.pin-post-btn.pinned {
    background-color: var(--bs-info);
    color: white;
    border-color: var(--bs-info);
}

.pin-post-btn.pinned:hover {
    background-color: var(--bs-info);
    opacity: 0.9;
}

/* Bookmark button active state */
.bookmark-btn.bookmarked {
    background-color: var(--bs-info);
    color: white;
    border-color: var(--bs-info);
}

.bookmark-btn.bookmarked:hover {
    background-color: var(--bs-info);
    opacity: 0.9;
}

/* Highlight post when accessed via anchor link */
.card:target {
    animation: highlightPost 2s ease;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

@keyframes highlightPost {
    0%, 100% { 
        background-color: transparent; 
    }
    50% { 
        background-color: rgba(102, 126, 234, 0.1); 
    }
}

/* Profile Meta Tags */
.profile-meta .badge,
.profile-meta .profile-username {
    display: inline-flex;
    align-items: center;
    line-height: 1.25;
}

.profile-bio-inline {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Themed chips for Posts/Followers/Following */
.profile-info-section .profile-chip.btn {
    color: var(--text-primary);
    border-color: var(--btn-primary);
    background: transparent;
}

.profile-info-section .profile-chip.btn:hover,
.profile-info-section .profile-chip.btn:focus {
    color: var(--btn-primary-contrast, #fff);
    background: var(--btn-primary);
    border-color: var(--btn-primary);
}

.profile-chip.btn {
    color: var(--text-primary);
    border-color: var(--btn-primary);
}

.profile-level {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333 !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Modern Bio & Meta Tags (Twitter/Instagram Style) */
.profile-about-section {
    margin-top: 1rem;
}

.profile-bio-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.profile-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.meta-tag i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.meta-tag-link {
    color: var(--btn-primary);
}

.meta-tag-link:hover {
    color: var(--accent-primary, var(--btn-primary));
    text-decoration: underline;
}

[data-theme="dark"] .meta-tag {
    color: var(--text-secondary);
}

[data-theme="dark"] .meta-tag-link {
    color: var(--btn-primary);
}

/* Old bio style - deprecated */
.profile-bio {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 12px;
}

/* Profile Content Area Styling */
.profile-content-area {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    margin-top: 1rem;
}

[data-bs-theme="dark"] .profile-content-area {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Profile Details Card - Integrated Design */
.profile-details-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px var(--shadow);
    backdrop-filter: blur(10px);
    margin-top: 0.5rem;
}

[data-bs-theme="dark"] .profile-details-card {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.profile-details-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--btn-primary);
    padding-bottom: 0.5rem;
}

.profile-details-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
}

.profile-detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
}

.profile-detail-item i {
    font-size: 1.2rem;
    color: var(--bs-primary);
    margin-top: 2px;
    min-width: 20px;
}

.detail-content {
    flex: 1;
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.detail-value a {
    color: var(--bs-primary) !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.detail-value a:hover {
    color: var(--bs-link-hover-color, var(--bs-secondary)) !important;
    text-decoration: underline;
}

/* Profile Info Item Styles */
.profile-info-item.hobbies-field span {
    white-space: pre-line;
    word-wrap: break-word;
}

/* Clickable links and usernames */
.text-link {
    color: var(--link-color);
    text-decoration: underline;
    word-break: break-all;
}

.text-link:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.username-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.username-link:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Dark theme adjustments */
[data-theme="dark"] .profile-bio-text {
    color: var(--text-primary);
}

[data-theme="dark"] .profile-about-section {
    color: var(--text-primary);
}

/* ==================== FOLDER AND MEDIA GALLERY STYLES ==================== */
.folder-item {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.folder-item:hover {
    transform: translateY(-2px);
}

/* Inline Media Editing Styles */
.media-title-edit, .media-description-edit {
    margin-bottom: 5px;
}

.media-title-edit:focus, .media-description-edit:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    border-color: var(--btn-primary);
}

.folder-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px;
    height: 100%;
    transition: all 0.2s ease;
}

.folder-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--border-color);
}

.media-item {
    transition: transform 0.2s ease;
}

.media-item:hover {
    transform: translateY(-2px);
}

.media-thumbnail {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.media-thumbnail:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Color picker styles */
.btn-check:checked + .btn {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* Privacy badge styles */
.badge {
    font-size: 0.75rem;
}

.uncategorized-preview {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.uncategorized-preview img,
.uncategorized-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uncategorized-preview-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    padding: 4px 6px;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .folder-card {
        padding: 10px;
    }
    
    .media-thumbnail img,
    .media-thumbnail video {
        height: 120px !important;
    }
}

/* ==================== STREAM CONFIRMATION OVERLAY ==================== */
.stream-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.stream-confirm-box {
    background: var(--bg-primary, #fff);
    border: 2px solid var(--border-light, #dee2e6);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.stream-confirm-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stream-confirm-box h5 {
    color: var(--text-primary, #212529);
    font-weight: 600;
}

.stream-confirm-box p {
    color: var(--text-secondary, #6c757d);
    font-size: 0.95rem;
}

/* ==================== STREAM TOAST NOTIFICATIONS ==================== */
.stream-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.stream-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.stream-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stream-toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stream-toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

.stream-toast-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.stream-toast-danger {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.stream-toast-info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.stream-toast-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

/* ==================== ACHIEVEMENT STYLES - COMPACT GRID LAYOUT ==================== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 8px 0;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
    transition: all 0.2s ease;
    cursor: help;
    text-align: center;
}

.achievement-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
}

.achievement-icon-small {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.achievement-title-small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #495057;
    line-height: 1.2;
    word-break: break-word;
}

@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .achievement-icon-small {
        font-size: 1.5rem;
    }
    
    .achievement-title-small {
        font-size: 0.7rem;
    }
}

/* ==================== KEYFRAME ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== ENHANCED PROFILE MODAL STYLES ==================== */
#editProfileModal .nav-tabs {
    border-bottom: 2px solid var(--border-light, #dee2e6);
}

#editProfileModal .nav-tabs .nav-link {
    color: var(--text-secondary, #6c757d);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-weight: 500;
}

#editProfileModal .nav-tabs .nav-link:hover {
    border-bottom-color: var(--primary, #007bff);
    color: var(--primary, #007bff);
}

#editProfileModal .nav-tabs .nav-link.active {
    color: var(--primary, #007bff);
    background: none;
    border-bottom-color: var(--primary, #007bff);
}

#editProfileModal .tab-content {
    min-height: 400px;
}

#editProfileModal .form-label i {
    color: var(--primary, #007bff);
    width: 16px;
    text-align: center;
}

#editProfileModal .alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border: 1px solid #bee5eb;
    border-left: 4px solid var(--info, #17a2b8);
}

@media (max-width: 768px) {
    .stream-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .stream-confirm-box {
        padding: 20px;
    }
    
    #editProfileModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    #editProfileModal .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

