/* Outpic Image Styling - 9:16 Aspect Ratio */
.outfit-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.outfit-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .outfit-image-container {
        margin-bottom: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Mobile flame animations */
    .streak-flame {
        font-size: 0.9em;
    }
    
    .profile-streak .streak-flame {
        font-size: 1.1em;
    }
    
    /* Mobile-only profile grid spacing */
    .profile-grid-card-body {
        padding: 0rem 0.75rem !important;
        margin: -0.5rem 0 !important;
    }
}

/* Profile grid adjustments */
@media (max-width: 576px) {
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Streak flame animations */
.streak-flame {
    display: inline-block;
    transition: all 0.3s ease;
}

.streak-flame.normal {
    color: #ffc107;
}

.streak-flame.epic {
    color: #0d6efd;
}

.streak-flame.animate {
    animation: flame-flicker 0.8s ease-in-out;
}

.streak-flame.animate.epic {
    animation: flame-epic 1.0s ease-in-out;
}

/* Challenge styling */
.challenge-badge {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
    margin-left: 0.5rem;
}

.challenge-vote-btn {
    transition: all 0.2s ease;
}

.challenge-vote-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.challenge-vote-btn.voted {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.challenge-post-image {
    transition: transform 0.2s ease;
}

.challenge-post-image:hover {
    transform: scale(1.02);
}

/* Challenge page specific styling */
.challenge-header {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.challenge-submissions .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.challenge-submissions .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@keyframes flame-flicker {
    0% { transform: scale(1); filter: brightness(1); }
    25% { transform: scale(1.2) rotate(-2deg); filter: brightness(1.3); }
    50% { transform: scale(1.1) rotate(2deg); filter: brightness(1.5); }
    75% { transform: scale(1.15) rotate(-1deg); filter: brightness(1.2); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes flame-epic {
    0% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 2px currentColor); }
    20% { transform: scale(1.3) rotate(-3deg); filter: brightness(1.5) drop-shadow(0 0 8px currentColor); }
    40% { transform: scale(1.2) rotate(3deg); filter: brightness(1.8) drop-shadow(0 0 12px currentColor); }
    60% { transform: scale(1.25) rotate(-2deg); filter: brightness(1.6) drop-shadow(0 0 10px currentColor); }
    80% { transform: scale(1.1) rotate(1deg); filter: brightness(1.3) drop-shadow(0 0 6px currentColor); }
    100% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 2px currentColor); }
}

/* Profile page streak display */
.profile-streak {
    font-size: 1.2em;
    font-weight: bold;
}

.profile-streak .streak-flame {
    font-size: 1.3em;
}

/* Like button styling */
.like-button.liked {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.like-button.liked:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Loading state for buttons */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Profile statistics responsive layout */
.profile-stats {
    margin-bottom: 0;
}

/* Lazy loading styles */
.lazy-image {
    transition: filter 0.3s ease;
}

.lazy-image.loaded {
    filter: none !important;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #333, #444);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.image-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

.profile-stats .col-4 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (max-width: 576px) {
    .profile-stats .col-4 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .profile-stats .col-4 small {
        font-size: 0.7rem;
        line-height: 1.1;
    }
}

/* Custom dark theme enhancements */
.bg-dark {
    background-color: #1a1a1a !important;
}

.card.bg-dark {
    background-color: #2d2d2d !important;
}

.border-secondary {
    border-color: #404040 !important;
}

/* Preview image styling */
#imagePreview .outfit-image-container {
    max-width: 300px;
    margin: 0 auto;
}

/* Character counter styling */
#charCount {
    font-weight: bold;
}

/* Button hover effects */
.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Navbar enhancements */
.navbar-brand {
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin: 0 0.25rem;
    transition: background-color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Card enhancements */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.card-header {
    border-bottom: 1px solid #404040;
}

/* Form enhancements */
.form-control {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    color: #fff;
}

.form-control:focus {
    background-color: #2d2d2d;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alert enhancements */
.alert {
    border-radius: 8px;
    border: none;
}

/* Loading state for image preview */
.loading-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #6c757d;
}

/* Post spacing improvements */
/* Reduce space below caption text when present */
.post-caption {
    margin-bottom: 0.5rem !important;
}

/* Reduce space above action buttons */
.post-actions {
    margin-top: 0.5rem !important;
}

/* Mobile-specific spacing improvements */
@media (max-width: 768px) {
    /* Tighter spacing on mobile */
    .card-body {
        padding: 0.75rem !important;
    }
    
    .post-caption {
        margin-bottom: -0.5rem !important;
    }
    
    .post-actions {
        margin-top: -0.5rem !important;
    }
    
    /* Responsive text sizes */
    .display-4 {
        font-size: 2rem;
    }
    
    .display-1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Desktop-specific spacing - only reduce space below text when present */
@media (min-width: 769px) {
    .post-caption {
        margin-bottom: 0.5rem !important;
    }
}

/* Image upload area enhancement */
.form-control[type="file"] {
    padding: 0.75rem;
}

/* Comments section */
.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
}

/* Profile stats */
.text-center h5 {
    color: #fff;
    margin-bottom: 0.25rem;
}

/* Responsive grid for profile posts */
@media (min-width: 768px) {
    .col-md-4:nth-child(3n+1) {
        clear: left;
    }
}

/* Smooth transitions */
.btn, .card, .form-control {
    transition: all 0.3s ease;
}

/* Focus states */
.btn:focus, .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Profile picture styles */
.profile-picture-container {
    position: relative;
    display: inline-block;
}

.profile-picture {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-picture:hover {
    transform: scale(1.05);
    border-color: #0056b3;
}

.profile-picture-placeholder {
    font-size: 120px;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-picture-placeholder:hover {
    color: #0056b3;
    transform: scale(1.05);
}

/* Profile picture in feed posts */
.post-profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007bff;
    margin-right: 8px;
    flex-shrink: 0;
}

.post-profile-picture-placeholder {
    font-size: 40px;
    color: #007bff;
    margin-right: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Profile picture in comments */
.comment-profile-picture {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007bff;
    margin-right: 8px;
}

.comment-profile-picture-placeholder {
    font-size: 32px;
    color: #007bff;
    margin-right: 8px;
}

/* Lazy loading styles for profile images */
.lazy-image {
    transition: filter 0.3s ease;
}

.lazy-image.loaded {
    filter: none !important;
}

.image-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Likes modal styles */
.likes-modal-profile-picture {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007bff;
}

.likes-modal-profile-icon {
    font-size: 50px;
    color: #007bff;
}

/* Notification badge styles */
#notification-badge {
    font-size: 0.7em;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
}

/* Mobile notification bell positioning */
#notification-bell-mobile {
    color: rgba(255, 255, 255, 0.55) !important;
    text-decoration: none;
}

/* Challenge icon styling */
.challenge-icon {
    color: #ffc107;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
}

/* Challenge icon styling */
.challenge-icon {
    color: #ffc107;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
}

/* Challenge vote button styling */
.challenge-vote-btn {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
    transition: all 0.3s ease;
}

.challenge-vote-btn:hover {
    background-color: #ffc107 !important;
    color: #000 !important;
    border-color: #ffc107 !important;
}

.challenge-vote-btn.voted {
    background-color: #ffc107 !important;
    color: #000 !important;
    border-color: #ffc107 !important;
}

/* Challenge page mobile fixes */
@media (max-width: 768px) {
    .challenge-icon {
        font-size: 1rem;
    }
    
    .card-body .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* Prevent horizontal overflow */
.container-fluid {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    font-size: 1.1rem;
}

#notification-bell-mobile:hover {
    color: rgba(255, 255, 255, 1) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Desktop notification bell in navbar */
#notification-bell {
    color: rgba(255, 255, 255, 0.55) !important;
}

#notification-bell:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Hide desktop notification bell on mobile */
@media (max-width: 991.98px) {
    #notification-bell {
        display: none !important;
    }
}

/* @ Mention autocomplete styles */
.mention-autocomplete {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.mention-item {
    transition: background-color 0.15s ease-in-out;
}

.mention-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Long press hint for like buttons */
.like-button {
    position: relative;
    user-select: none;
}

.like-button:hover::after {
    content: "Hold to see likes";
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out 1s forwards;
}

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

/* Username styling - make all usernames use primary blue color */
.card-header a strong,
.comment-header a strong,
.likes-modal a strong,
.notification-item a strong,
.profile-info a strong {
    color: #007bff !important;
}

.card-header a:hover strong,
.comment-header a:hover strong,
.likes-modal a:hover strong,
.notification-item a:hover strong,
.profile-info a:hover strong {
    color: #0056b3 !important;
}
