/* Character Profile Page Styles */

.profile-container {
    max-width: 100vw;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
}

/* Profile Header */
.profile-header {
    position: relative;
    background: var(--primary-gradient);
    color: white;
    padding: 0;
    margin: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.profile-cover {
    position: relative;
    height: 40vh;
    min-height: 300px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    z-index: 1;
}

.profile-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%),
        linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    animation: shimmerBg 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes shimmerBg {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.profile-avatar-container {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3));
    animation: avatarFloat 3s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    object-position: top;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.08);
}

.profile-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
    padding: 80px 20px 30px;
    text-align: center;
    z-index: 2;
}

.profile-name {
    font-size: 2rem;
    font-weight: 800;
    margin: 15px 0 10px;
    text-shadow: 0 3px 8px rgba(0,0,0,0.4);
    letter-spacing: -0.5px;
}

.profile-intro {
    font-size: 0.95rem;
    opacity: 0.95;
    margin: 0 0 10px;
    line-height: 1.5;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Action Buttons */
.profile-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 25px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    max-width: 200px;
    padding: 13px 24px;
    border-radius: 28px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    min-height: 48px;
}

.action-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.action-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    color: white;
}

.action-btn-primary:active {
    transform: translateY(-1px);
}

.action-btn-secondary {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
}

.action-btn-secondary:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Stats Section */
.profile-stats {
    display: flex;
    padding: 30px 20px;
    background: linear-gradient(to right, #f9fafb, #ffffff);
    border-bottom: 1px solid var(--border-color);
    gap: 0;
}

.stat-item {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 20px;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50%;
    background: var(--border-color);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading State for Count Displays */
.stat-number.count-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.stat-number.count-loading .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
    color: var(--primary-color);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

/* Content Tabs */
.content-tabs {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.tab-nav {
    display: flex;
    padding: 0;
}

.tab-btn {
    flex: 1;
    padding: 16px 12px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    background: linear-gradient(to right, transparent, rgba(99, 102, 241, 0.05), transparent);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px 2px 0 0;
}

/* Initial Grid */
.character-grid-initial .gallery-card{
    display: inline-block;
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 12px;
    background: var(--bg-secondary);
}

.media-item {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary), #e0e7ff);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.media-item:active {
    transform: scale(0.98);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.media-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.media-item:hover .media-item-overlay {
    opacity: 1;
}

.media-item-info {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.media-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    z-index: 20;
}

.media-item:hover .media-item-actions {
    opacity: 1;
}

.media-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary-color);
    font-weight: 600;
    pointer-events: auto;
    flex-shrink: 0;
    z-index: 30;
}

.media-action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.media-action-btn.liked,
.media-action-btn.image-fav.liked {
    color: #ef4444;
}

.video-indicator {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.media-item video {
    display: block;
    background: #000;
}

.media-item video::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Similar Characters */
.similar-section {
    padding: 40px 20px;
    background: linear-gradient(to right, #ffffff, #f9fafb);
    border-top: 1px solid var(--border-color);
}

.similar-section h5 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.similar-section .text-muted {
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.similar-card {
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.similar-card:hover {
    transform: translateY(-5px);
}

.similar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
    border: 3px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.similar-card:hover .similar-avatar {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.similar-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Loading States */
.loading-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 0;
    width: 100%;
    grid-column: 1 / -1;
}

.loading-item {
    aspect-ratio: 1;
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Character Details */
.character-details {
    padding: 25px;
    background: var(--bg-primary);
}

.character-details h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    margin-top: 20px;
}

.character-details h5:first-child {
    margin-top: 0;
}

.character-details p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.character-personality-details {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.personality-section {
    border: none !important;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-button {
    background: #fff;
    color: #8240FF;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background: #fff;
    color: #8240FF;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(130,64,255,0.25);
}

.section-title {
    color: #8240FF;
    padding: 12px 15px;
}

.accordion-body {
    padding: 15px;
    background-color: #fff;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
}

.character-tag {
    background-color: #f0e6ff;
    color: #6610f2;
    border: 1px solid #d2b8ff;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.character-tag:hover {
    background: linear-gradient(90.9deg, #D2B8FF 2.74%, #8240FF 102.92%);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.content-container {
    background: #fff;
    border-radius: 6px;
    padding: 5px;
}

.btn.custom-gradient-bg {
    background: linear-gradient(90.9deg, #D2B8FF 2.74%, #8240FF 102.92%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(130,64,255,0.25);
}

.btn.custom-gradient-bg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(130,64,255,0.35);
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .media-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .loading-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .media-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .loading-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .profile-cover {
        height: 35vh;
        min-height: 280px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-intro {
        font-size: 0.85rem;
        max-width: 100%;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        border-width: 4px;
    }

    .media-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .loading-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .tab-btn {
        padding: 14px 8px;
        font-size: 0.8rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .action-btn {
        padding: 11px 16px;
        font-size: 0.85rem;
        max-width: 160px;
    }

    .container-fluid.px-0 {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

@media (max-width: 480px) {
    .profile-header {
        box-shadow: none;
    }

    .profile-cover {
        height: auto;
        min-height: auto;
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 16px;
    }

    .profile-avatar-container {
        animation: none;
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        border-width: 3px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .profile-info {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        background: none;
        padding: 0;
        text-align: left;
        z-index: 2;
        flex: 1;
    }

    .profile-name {
        font-size: 1.4rem;
        font-weight: 700;
        margin: 0 0 6px 0;
        text-shadow: none;
        letter-spacing: 0;
        color: white;
    }

    .profile-intro {
        font-size: 0.8rem;
        opacity: 0.9;
        margin: 0;
        line-height: 1.4;
        max-width: 100%;
        text-shadow: none;
        color: rgba(255, 255, 255, 0.9);
    }

    .profile-stats {
        padding: 16px 20px;
        gap: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
    }

    .stat-item {
        flex: 1;
        text-align: center;
        padding: 0 12px;
    }

    .stat-item:not(:last-child)::after {
        height: 40%;
    }

    .stat-number {
        font-size: 1.3rem;
        font-weight: 800;
        margin-bottom: 4px;
    }

    .stat-label {
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .profile-actions {
        padding: 12px 20px;
        gap: 8px;
        background: white;
        border-bottom: 1px solid var(--border-color);
        flex-wrap: nowrap;
    }

    .action-btn {
        flex: 1;
        max-width: 100%;
        padding: 10px 12px;
        font-size: 0.75rem;
        gap: 4px;
        min-height: 44px;
        border-radius: 22px;
    }

    .action-btn i {
        display: none;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        padding: 4px;
    }

    .loading-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
        padding: 4px;
    }

    .tab-btn {
        padding: 12px 6px;
        font-size: 0.7rem;
    }

    .tab-btn i {
        display: none;
    }

    .similar-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .similar-avatar {
        width: 70px;
        height: 70px;
    }
}

/* Gallery Section */
.gallery-section {
    padding: 20px 0;
}

.gallery-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.gallery-section .text-muted {
    text-align: center;
    margin-bottom: 20px;
}

/* Character Gallery for non-specific character pages */
.character-gallery {
    padding: 40px 20px;
    background: var(--bg-secondary);
}

.character-gallery h2 {
    text-align: center;
    margin-bottom: 30px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.character-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.character-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
}

.character-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.character-card h5 {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.character-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.sticky-bottom, .grid-control {
    display: none;
}

/* Load More Button Styling */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: 24px 12px;
    grid-column: 1 / -1;
}

.load-more-btn {
    padding: 12px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 28px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.load-more-btn:active {
    transform: translateY(-1px);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner styling for load more button */
.load-more-btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
    color: white;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

/* Image Modal Styles - Full-Screen with Overlay Footer */

/* Override Bootstrap modal dialog for full-screen */
.modal.fade .modal-dialog.image-modal-dialog {
    margin: 0;
    width: 100%;
    height: 100vh;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    background: #000;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Image Body - Full viewport */
.image-modal-body {
    padding: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-modal-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    display: block;
    background: #000;
}

/* Modal Header - Close Button Only */
.image-modal-header {
    background: none;
    color: inherit;
    padding: 0;
    border-bottom: none;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    position: fixed;
    top: 16px;
    right: 24px;
    z-index: 1055;
    width: auto;
    pointer-events: auto;
}

.image-modal-header .btn-close {
    background: linear-gradient(135deg, #D2B8FF 0%, #8240FF 100%);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.95;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(130, 64, 255, 0.4);
    flex-shrink: 0;
    cursor: pointer;
}

.image-modal-header .btn-close::after {
    content: '✕';
    position: absolute;
    font-size: 1.5rem;
    color: white;
    font-weight: 300;
    letter-spacing: 2px;
}

.image-modal-header .btn-close:hover {
    opacity: 1;
    box-shadow: 0 8px 28px rgba(130, 64, 255, 0.6);
    transform: scale(1.1);
}

.image-modal-header .btn-close:active {
    transform: scale(0.95);
}

/* Info Section - White Footer */
.image-modal-footer {
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #e5e7eb;
    padding: 5px 24px 5px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    width: 100%;
    max-height: auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.image-modal-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
}

.image-modal-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.image-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #1f2937;
    word-break: break-word;
    line-height: 1.5;
    letter-spacing: -0.3px;
    cursor: pointer;
    user-select: text;
    transition: all 0.3s ease;
}

.image-modal-title .title-toggle {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    margin-left: 4px;
    display: inline;
}

.image-modal-date {
    margin: 0;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Action Buttons - Icon Only, Smaller */
.image-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}

.image-modal-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 8px;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
}

.image-modal-action-btn i {
    font-size: 1.4rem;
    transition: all 0.3s ease;
    margin: 0;
}

.image-modal-action-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.image-modal-action-btn:active {
    transform: scale(0.95);
}

/* Like button - Simple Gray */
.image-modal-like-btn {
    background: transparent;
    color: #d1d5db;
}

.image-modal-like-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.image-modal-like-btn.liked {
    background: transparent;
    color: #ef4444;
}

.image-modal-like-btn.liked i {
    animation: heartBeat 0.6s ease-in-out;
}


/* Responsive design for full-width modals */
@media (max-width: 1024px) {
    .image-modal-content {
        height: 100vh;
        border-radius: 0;
    }
    
    .modal.fade .modal-dialog.image-modal-dialog {
        height: 100vh;
    }
    
    .image-modal-body {
        flex: 1;
        min-height: 55vh;
    }
    
    .image-modal-footer {
        padding: 24px 20px;
        gap: 20px;
    }
    
    .image-modal-title {
        font-size: 1rem;
    }
    
    .image-modal-action-btn {
        padding: 11px 20px;
        font-size: 0.85rem;
        min-width: 110px;
    }
}

@media (max-width: 1024px) {
    .image-modal-header .btn-close {
        width: 44px;
        height: 44px;
    }
    
    .image-modal-footer {
        padding: 50px 24px 24px 24px;
    }
    
    .image-modal-title {
        font-size: 1rem;
    }
    
    .image-modal-action-btn {
        padding: 11px 20px;
        font-size: 0.85rem;
        min-width: 110px;
    }
}

@media (max-width: 768px) {
    .image-modal-header {
        padding: 12px 16px;
    }
    
    .image-modal-header .btn-close {
        width: 40px;
        height: 40px;
        box-shadow: 0 4px 16px rgba(130, 64, 255, 0.35);
    }
    
    .image-modal-footer {
        padding: 40px 20px 20px 20px;
        gap: 16px;
    }
    
    .image-modal-title {
        font-size: 0.95rem;
    }
    
    .image-modal-date {
        font-size: 0.75rem;
    }
    
    .image-modal-action-btn {
        padding: 10px 18px;
        font-size: 0.8rem;
        min-width: 100px;
        gap: 8px;
    }
    
    .image-modal-action-btn i {
        font-size: 1.1rem;
    }
    
    .image-modal-actions {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .image-modal-header {
        padding: 10px 12px;
    }
    
    .image-modal-header .btn-close {
        width: 36px;
        height: 36px;
        box-shadow: 0 3px 12px rgba(130, 64, 255, 0.3);
    }
    
    .image-modal-footer {
        padding: 5px 16px 0px 16px;
        gap: 12px;
    }

    .image-modal-info {
        gap: 10px;
        padding-bottom: 12px;
    }
    
    .image-modal-title {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .image-modal-date {
        font-size: 0.7rem;
    }
    
    .image-modal-action-btn {
        padding: 8px 8px;
        font-size: 0.75rem;
        flex: 0 0 auto;
        min-width: auto;
        width: 32px;
        height: 32px;
    }
    
    .image-modal-action-btn i {
        font-size: 1.2rem;
    }
    
    .image-modal-actions {
        gap: 8px;
        flex-direction: row;
        margin-bottom: 2px;
    }
}