/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: #f4f6f9;
    margin: 20px auto;
    max-width: 900px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 2rem;
    padding: 0 20px;
}

/* Profile Completion Banner Styles */
.profile-completion-banner, .profile-completion-reward-banner {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

.profile-completion-reward-banner {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.banner-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 0.5rem;
}

.banner-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.banner-close {
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.banner-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

.progress-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.progress-percentage {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.progress-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.progress-bar-container {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fff 0%, #e8f4fd 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.action-section {
    margin-bottom: 1.5rem;
}

.action-text {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.action-text strong {
    color: #ffffff;
    font-weight: 600;
}

.complete-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.complete-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reward-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reward-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.reward-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.reward-text strong {
    color: #ffffff;
    font-weight: 600;
}

.banner-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.btn-text {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: white;
}

/* Reward Banner Specific Styles */
.reward-icon-large {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.reward-content {
    margin-bottom: 1.5rem;
}

.reward-main-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.reward-main-text strong {
    color: #ffffff;
    font-weight: 600;
}

.pro-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.pro-features li {
    font-size: 0.9rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reward-actions {
    display: flex;
    justify-content: center;
}

.btn-primary {
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.9);
    color: #43e97b;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-completion-banner, .profile-completion-reward-banner {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .banner-header h3 {
        font-size: 1.2rem;
    }
    
    .progress-section {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .progress-text {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: auto;
    }
    
    .banner-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-secondary, .btn-text {
        width: 100%;
        text-align: center;
    }
    
    .pro-features {
        grid-template-columns: 1fr;
    }
}

/* Stories Section Styles */
.stories-container {
    width: 100%;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.stories-header h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.stories-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f1f1f1;
}

.stories-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.stories-scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.stories-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.stories-list {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    min-width: fit-content;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    min-width: 70px;
}

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

.story-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    position: relative;
    padding: 3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-circle.viewed {
    background: #ddd;
    animation: none;
}

.story-circle.add-story {
    background: #e8e8e8;
    border: 2px dashed #3498db;
    animation: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Story Upload Progress Styles */
.story-circle.uploading {
    background: #f8f9fa;
    border: 2px solid #007bff;
    animation: pulse 1.5s ease-in-out infinite;
}

.story-circle.error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    animation: shake 0.5s ease-in-out;
}

.upload-progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.3s ease;
    stroke-linecap: round;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
}

.story-profile-pic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    display: block;
}

.add-story-icon {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid white;
    z-index: 10;
}

.story-username {
    font-size: 12px;
    color: #333;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Story count indicator */
.story-count-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
    z-index: 10;
}

/* Story Modal Styles */
.story-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.story-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer {
    width: 800px; /* Match main wrapper width */
    height: calc(100vh - 40px); /* Almost full height with some margin */
    max-width: 90vw; /* Responsive for smaller screens */
    background: white;
    border-radius: 15px; /* Curved border */
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.story-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    position: relative;
}

.story-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.story-header-info {
    flex: 1;
}

.story-header-info h4 {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.story-header-info span {
    font-size: 12px;
    color: #666;
}

.story-content {
    position: relative;
    flex: 1;
    margin-top: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.story-content img,
.story-content video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.story-content .story-text-content {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 80%;
    word-wrap: break-word;
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.story-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px;
    font-size: 16px;
}

.story-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 18px;
    z-index: 1001;
}

.delete-story-btn {
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    position: absolute;
    right: 60px; /* Move it away from close button */
    top: 50%;
    transform: translateY(-50%);
}

.delete-story-btn:hover {
    background: rgba(255, 0, 0, 1);
}

/* Story navigation buttons */
.story-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.story-prev-btn {
    left: 20px;
}

.story-next-btn {
    right: 20px;
}

.story-progress {
    position: absolute;
    top: 10px;
    left: 15px;
    right: 60px; /* More space for close button */
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.story-progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
    animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
    to { width: 100%; }
}

/* Story Comments and Likes Section */
.story-interaction {
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
}

.story-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.story-like-btn, .story-comment-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.story-like-btn:hover, .story-comment-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.story-like-btn.liked {
    color: #e74c3c;
}

.story-comment-form {
    display: none;
    margin-top: 10px;
}

.story-comment-form textarea {
    width: 100%;
    height: 60px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    resize: none;
    font-family: inherit;
}

.story-comment-form .comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.story-comment-form button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.story-comment-form .cancel-btn {
    background: #f8f9fa;
    color: #6c757d;
}

.story-comment-form .send-btn {
    background: #007bff;
    color: white;
}

.story-comment-form .send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Create Story Modal */
.create-story-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.create-story-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.create-story-header {
    text-align: center;
    margin-bottom: 20px;
}

.create-story-header h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.story-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.story-type-btn {
    padding: 10px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.story-type-btn.active,
.story-type-btn:hover {
    background: #3498db;
    color: white;
}

.story-form-group {
    margin-bottom: 20px;
}

.story-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.story-form-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
}

.story-form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #3498db;
    border-radius: 8px;
    background: #f8f9fa;
}

.story-preview {
    margin-top: 15px;
    text-align: center;
}

.story-preview img,
.story-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

/* Color picker styling */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-picker-container input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-preset {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ddd;
    transition: transform 0.2s ease;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: #3498db;
}

.story-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.story-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.story-btn-primary {
    background: #3498db;
    color: white;
}

.story-btn-primary:hover {
    background: #2980b9;
}

.story-btn-secondary {
    background: #95a5a6;
    color: white;
}

.story-btn-secondary:hover {
    background: #7f8c8d;
}

/* Dark Mode Support for Stories */
.dark-mode .stories-container, body.dark-mode .stories-container {
    background-color: #2c3e50;
    border: 1px solid #34495e;
}

.dark-mode .stories-header h3, body.dark-mode .stories-header h3 {
    color: #ecf0f1;
    border-bottom-color: #3498db;
}

.dark-mode .story-username, body.dark-mode .story-username {
    color: #ecf0f1;
}

.dark-mode .create-story-content, body.dark-mode .create-story-content {
    background-color: #2c3e50;
    color: #ecf0f1;
}

.dark-mode .create-story-header h3, body.dark-mode .create-story-header h3 {
    color: #ecf0f1;
}

.dark-mode .story-form-group label, body.dark-mode .story-form-group label {
    color: #ecf0f1;
}

.dark-mode .story-form-group textarea, body.dark-mode .story-form-group textarea {
    background-color: #34495e;
    color: #ecf0f1;
    border-color: #555;
}

.dark-mode .story-form-group input[type="file"], body.dark-mode .story-form-group input[type="file"] {
    background-color: #34495e;
    color: #ecf0f1;
    border-color: #3498db;
}

.dark-mode .story-viewer, body.dark-mode .story-viewer {
    background-color: #2c3e50;
}

.dark-mode .story-header, body.dark-mode .story-header {
    background: rgba(0, 0, 0, 0.3);
}

.dark-mode .story-header-info h4, body.dark-mode .story-header-info h4 {
    color: #ecf0f1;
}

.dark-mode .story-header-info span, body.dark-mode .story-header-info span {
    color: #bdc3c7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .stories-container {
        padding: 1rem;
    }
    
    .story-circle {
        width: 60px;
        height: 60px;
    }
    
    .story-profile-pic {
        width: 54px;
        height: 54px;
    }
    
    .story-username {
        font-size: 11px;
        max-width: 60px;
    }
    
    .create-story-content {
        width: 95%;
        padding: 20px;
    }
    
    .story-type-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .story-type-btn {
        width: 200px;
    }
}

.post-container, .user-posts {
    width: 100%;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-container h3, .user-posts h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

#post-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#post-text {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    padding: 1rem;
    border: 0.5px solid #0e19be;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between buttons */
    margin-top: 10px;
}



#preview-container {
    position: relative;
    display: none;
    max-width: 100%;
    margin-top: 10px;
}

#preview-container img {
    width: 100%;
    border-radius: 8px;
}

#remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
}



.action-form {
    display: inline; /* Ensures the form wraps around only the button */
}

.like-button, .comment-toggle-button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    gap: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 40px;
    box-sizing: border-box;
}

.like-button:hover, .comment-toggle-button:hover {
    background-color: #e0e0e0;
}


.like-button.liked {
    background-color: #00b333; /* Green background for liked state */
}


.like-button.liked:hover {
    background-color: #007f4f; /* Slightly darker green on hover */
}

.like-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}


/* Comments section */
.comments {
    margin-top: 15px;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.comment {
    margin: 10px 0;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.comment-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-actions,
.reply-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.9em;
}

.comment-timestamp,
.reply-timestamp {
    color: #666;
}

.comment-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}



Profile picture styles */
.comment-profile {
    flex-shrink: 0;
}

.comment-profile-pic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-profile-pic,
.reply-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}



/* Comment content styles */
.comment-content,
.reply-content {
    flex-grow: 1;
    min-width: 0; /* Prevents content from overflowing */
}

.comment-header,
.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-timestamp,
.reply-timestamp {
    color: #666;
    font-size: 0.8em;
}

.comment-text,
.reply-text {
    margin: 4px 0;
    word-wrap: break-word;
}

/* Action buttons styles */
.comment-actions,
.reply-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.like-button,
.reply-button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.9em;
}

.like-button:hover,
.reply-button:hover {
    color: #1a73e8;
}

.like-button.liked {
    color: #1a73e8;
}

/* Reply section styles */
.replies {
    margin-left: 34px; /* 24px (profile pic) + 10px (gap) */
    margin-top: 4px;
}

/* Comment form styles */
.comment-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 36px;
}

.comment-button {
    align-self: flex-end;
    padding: 6px 12px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.comment-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}



/* Comment container styles */
.comment-container,
.reply-container {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}



.comment strong {
    color: #333;
}

.comment small {
    color: #aaa;
    margin-left: 5px;
}
.replies {
    margin-left: 20px;
    padding-left: 10px;
    border-left: 2px solid #eee;
}

.reply {
    margin-left: 40px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 8px;
}

.error {
    color: red;
    padding: 10px;
}

/* Add comment form */
form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    resize: none;
}

form textarea:focus {
    border-color: #007bff;
    outline: none;
}

form button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    margin-top: 5px;
    font-size: 0.9rem;
}

form button:hover {
    background-color: #0056b3;
}

#char-count {
    font-size: 0.9em;
    color: gray;
    margin-top: 5px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-group.button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;  /* Add this line */
    flex-direction: row;  /* Add this line */
    width: 100%;
    margin-top: 10px; /* Added for better spacing */
}

.form-group label {
    color: #2c3e50;
    font-weight: 500;
}


.button-row-left {
    display: flex;
    align-items: left; /* Center align buttons vertically */
}

.button-row-right {
    display: flex; 
    align-items: right; /* Center align buttons vertically */
    margin-left: auto;
}

.upload-image {
    display: block;
    cursor: pointer; /* Change cursor to pointer on hover */
}

.upload-image:hover {
    transform: scale(1.1); /* Slight zoom effect on hover */
}

#post-image {
    padding: 0.5rem 0;
    display: none;
}

button[type="submit"],/* post button when creating a post */
.emoji-button,
.upload-image {
    height: 35px; /* Adjust this value to match your desired height */
    padding: 0 1.5rem;
}

button[type="submit"] {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #2980b9;
}

/* Sending state for post button */
button[type="submit"]:disabled {
    background-color: #6b7280 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.user-posts .post {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-posts .post img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}
.post-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-time {
    color: #666;
    font-size: 0.9em;
}

.user-posts .post small {
    color: #7d6c6c;
    font-style: italic;
}

.relationship {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.relationship-info {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
    margin-top: 5px;
}

.emoji-button {
    background-color: transparent;
    border: none;
    font-size: 1.5rem; /* Size of the emoji button */
    cursor: pointer;
}

.emoji-button:hover {
    transform: scale(1.2); /* Slight zoom on hover */
}



.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    vertical-align: middle;
    cursor: pointer;
    transition: opacity 0.2s;
}

.profile-pic:hover {
    opacity: 0.8;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.post-profile-pic {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-right: 12px;
    padding: 10px;
    
}

.username {
    font-weight: bold;
}


.left-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 7px;
    max-width: 220px;
    width: 100%;
    margin-left: -40px;
}

.profile-picture {
    width: 100px; /* Adjust as needed */
    height: 100px; /* Ensure a square shape */
    border-radius: 50%; /* Make it circular */
    object-fit: cover; /* Ensure the image doesn't stretch */
    margin-bottom: 10px; /* Add space below the image */
    cursor: pointer; /* Indicate it's clickable */
    transition: transform 0.3s ease;
   
}

.left-wrapper p {
    font-size: 1.2rem;
    margin: 0;
    color: #333;
}

/* Navigation Links */
.navigation-links {
    margin-top: 15px;
    width: 100%;
}

.nav-link {
    display: block;
    padding: 12px 16px;
    margin: 8px 0;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    text-align: center;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    color: white;
    text-decoration: none;
}

.events-link {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.events-link:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.trivia-link {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.trivia-link:hover {
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Logout Button */
form button {
    padding: 10px 20px;
    background-color: #0047cc;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
}

form button:hover {
    background-color: #b30000;
}



.mark-read-form {
    text-align: center;
    margin-top: 20px;
}

.mark-read-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.mark-read-button:hover {
    background: #0056b3;
}






/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 10px;
    flex: 0 0 auto;

}

.logo {
    max-width: 150px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.flashes {
    list-style-type: none; /* Remove bullet points */
    padding: 0;
    margin: 20px auto; /* Center the messages */
    max-width: 400px; /* Limit the width for better readability */
}

.flashes li {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 16px; /* Adjust the font size */
    text-align: center; /* Center-align the text */
    color: #fff; /* White text color */
}

.flashes .success {
    background-color: #4CAF50; /* Green for success messages */
}

.flashes .error {
    background-color: #f44336; /* Red for error messages */
}

.flashes .info {
    background-color: #2196F3; /* Blue for informational messages */
}

.flashes .warning {
    background-color: #ff9800; /* Orange for warning messages */
}

.success {
    background-color: #d4edda;
    color: #155724;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
}



.dark-mode body, body.dark-mode {
    background-color: #181a1b !important;
    color: #e0e0e0 !important;
}

.dark-mode main, body.dark-mode main {
    background-color: #23272a !important;
    color: #e0e0e0 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.dark-mode .post-container, .dark-mode .user-posts, body.dark-mode .post-container, body.dark-mode .user-posts {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Dark mode for left wrapper and posts in homepage */
.dark-mode .left-wrapper, body.dark-mode .left-wrapper {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .left-wrapper p, body.dark-mode .left-wrapper p {
    color: #e0e0e0 !important;
}

.dark-mode .nav-link, body.dark-mode .nav-link {
    color: white !important;
}

.dark-mode .nav-link:hover, body.dark-mode .nav-link:hover {
    color: white !important;
    text-decoration: none !important;
}

.dark-mode .user-posts .post, body.dark-mode .user-posts .post {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.dark-mode .post, body.dark-mode .post {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.dark-mode .post-wrapper, body.dark-mode .post-wrapper {
    background-color: #1a1a1a !important;
}

.dark-mode .post p, .dark-mode .post-content, .dark-mode .post-header, .dark-mode .post-info,
body.dark-mode .post p, body.dark-mode .post-content, body.dark-mode .post-header, body.dark-mode .post-info {
    color: #e0e0e0 !important;
}

.dark-mode .post-info strong, body.dark-mode .post-info strong {
    color: #ffffff !important;
}

.dark-mode .post-time, .dark-mode .relationship, 
body.dark-mode .post-time, body.dark-mode .relationship {
    color: #b0b0b0 !important;
}

/* Dark mode for comment sections */
.dark-mode .comments, body.dark-mode .comments {
    background-color: #2d2d2d !important;
    border: 1px solid #404040 !important;
}

.dark-mode .comment, body.dark-mode .comment {
    background-color: #333333 !important;
    border-bottom: 1px solid #404040 !important;
    color: #e0e0e0 !important;
}

.dark-mode .comment-form textarea, body.dark-mode .comment-form textarea {
    background-color: #404040 !important;
    color: #e0e0e0 !important;
    border: 1px solid #555555 !important;
}

.dark-mode .comment-button, body.dark-mode .comment-button {
    background-color: #007bff !important;
    color: white !important;
}

.dark-mode nav, body.dark-mode nav {
    background-color: #23272a !important;
    color: #e0e0e0 !important;
}

/* Dark mode header button styles removed - using base.css navigation system */

.dark-mode .dropdown-content, body.dark-mode .dropdown-content {
    background-color: #23272a !important;
    color: #e0e0e0 !important;
}

.dark-mode .dropdown-content li a, .dark-mode .dropdown-content form button, body.dark-mode .dropdown-content li a, body.dark-mode .dropdown-content form button {
    color: #e0e0e0 !important;
}

.dark-mode .dropdown-content li a:hover, .dark-mode .dropdown-content form button:hover, body.dark-mode .dropdown-content li a:hover, body.dark-mode .dropdown-content form button:hover {
    background-color: #181a1b !important;
}

.dark-mode .profile-picture, body.dark-mode .profile-picture {
    border: 2px solid #444 !important;
}

.dark-mode .success, body.dark-mode .success {
    background-color: #234d20 !important;
    color: #e0e0e0 !important;
}

.dark-mode .error, body.dark-mode .error {
    background-color: #7b1e1e !important;
    color: #fff !important;
}

.homepage-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 80vh;
}

@media (max-width: 900px) {
    .homepage-layout {
        flex-direction: column;
        align-items: center;
    }
    .left-wrapper {
        margin-left: 0;
        margin-bottom: 24px;
    }
}

/* Post images should respect their actual dimensions after resize */
.post-image {
    max-width: 800px;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    object-fit: contain;
}

/* Media container styles */
.post-media-container {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-media {
    border-radius: 8px;
    /* Use black background wrapper instead of cropping */
    object-fit: contain;
    background-color: #000;
    width: 100%;
}

.single-media {
    width: 100%;
    max-height: 400px;
    min-height: 250px;
    /* Maintain aspect ratio with black padding */
    background-color: #000;
}

/* Media grid layouts */
.media-grid {
    display: grid;
    gap: 4px;
    border-radius: 8px;
    overflow: hidden;
}

.media-grid-2 {
    grid-template-columns: 1fr 1fr;
    max-height: 300px;
}

.media-grid-multiple {
    grid-template-columns: 1fr 1fr 1fr;
    max-height: 250px;
}

/* Standard sizing for user profile and about me posts */
.user-posts .post-media-container {
    width: 100%;
    max-height: 350px;
    min-height: 250px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-posts .single-media {
    max-height: 350px;
    min-height: 250px;
    width: 100%;
    object-fit: contain;
    background-color: #000;
}

.user-posts .media-grid-2 {
    max-height: 250px;
    min-height: 200px;
}

.user-posts .media-grid-multiple {
    max-height: 200px;
    min-height: 150px;
}

.user-posts .grid-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

.grid-media {
    width: 100%;
    height: 100%;
    /* Use black background wrapper for grid items too */
    object-fit: contain;
    background-color: #000;
    border-radius: 0;
    display: block;
}

/* Ensure overlay containers take full grid cell space */
.media-grid .media-overlay-container {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 0;
    min-width: 0;
}

/* Overlay for +N more indicator */
.media-overlay-container {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.dimmed {
    opacity: 0.7;
}

.more-count {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    display: block;
    text-align: center;
    line-height: 1;
    margin: 0;
    padding: 0;
}

/* Desktop specific styles for better centering */
@media (min-width: 769px) {
    .media-overlay-container {
        display: block;
        position: relative;
    }
    
    .media-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
    }
    
    .more-count {
        font-size: 1.5rem;
        font-weight: bold;
        flex-shrink: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .media-grid-2 {
        max-height: 200px;
    }
    
    .media-grid-multiple {
        max-height: 150px;
    }
    
    .media-overlay {
        font-size: 1.2rem;
    }
}

/* Reaction dropdown styling */
.reaction-container {
    position: relative;
    display: inline-block;
}

/* Removed conflicting .reaction-dropdown styles - now using base.css styles for consistency */

/* Load more comments button */
.load-more-comments {
    text-align: center;
    margin: 10px 0;
}

.load-more-comments button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.load-more-comments button:hover {
    background: #e0e0e0;
}

/* Infinite scroll indicators */
#loading-indicator {
    color: #666;
    font-style: italic;
}

#end-of-posts {
    font-weight: bold;
}

/* Ensure posts container has proper spacing */
#posts-container {
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    main {
        max-width: 100%;
        padding: 0;
        margin: 0;
        background-color: transparent;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
    }
    
    /* Removed .reaction-dropdown mobile styles - using base.css */
    
    /* Remove post wrapper constraints for true edge-to-edge mobile experience */
    .post-wrapper {
        border-radius: 0;
        margin-bottom: 0;
        box-shadow: none;
        border-bottom: 1px solid #e0e0e0;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        background: white;
    }
    
    .post-wrapper:hover {
        box-shadow: none;
    }
    
    /* Post content with minimal side padding */
    .post {
        padding: 16px 12px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Post media truly full width */
    .post-media-container {
        margin: 12px 0 0 0;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    .post-media {
        width: 100%;
        border-radius: 0;
        display: block;
        height: auto;
    }
    
    .post-image {
        margin: 12px 0 0 0;
        border-radius: 0;
        width: 100%;
    }
    
    /* Ensure media grids also take full width */
    .media-grid {
        width: 100%;
        margin: 12px 0 0 0;
        display: flex;
        gap: 0;
    }
    
    .media-grid-2 .grid-media {
        width: 50%;
        border-radius: 0;
        flex: 1;
    }
    
    .grid-media {
        border-radius: 0;
        width: 100%;
        height: auto;
    }
    
    /* Single media full width */
    .single-media {
        width: 100%;
        height: auto;
        max-height: none;
        border-radius: 0;
        display: block;
    }
    
    /* Ensure user posts container doesn't constrain width */
    .user-posts {
        width: 100%;
        padding: 0;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    
    #posts-container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
}

/* Inline reply form styles */
.inline-reply-form {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007bff;
}

.inline-reply-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.inline-reply-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.reply-form-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

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

.reply-btn {
    background-color: #007bff;
    color: white;
}

.reply-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.reply-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Clickable profile picture styles */
.comment-header a,
.reply-header a {
    display: inline-block;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.comment-header a:hover,
.reply-header a:hover {
    transform: scale(1.1);
}

.comment-profile-pic,
.reply-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    cursor: pointer;
}

/* Preview styles for upload - Enhanced for multiple media */
#preview-container {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    position: relative;
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    padding: 8px;
}

.preview-media {
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.single-preview {
    width: 100%;
    max-height: 300px;
}

/* Preview grid layouts */
.preview-grid {
    display: grid;
    gap: 4px;
    border-radius: 8px;
    overflow: hidden;
}

.preview-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.preview-grid-multiple {
    grid-template-columns: 1fr 1fr 1fr;
}

.grid-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

/* Preview overlay styles */
.preview-overlay-container {
    position: relative;
}

.preview-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    pointer-events: none;
    background: rgba(0,0,0,0.5);
    padding: 8px 12px;
    border-radius: 20px;
}

/* Enhanced post wrapper styles */
.post-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.post-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post {
    padding: 16px;
}

.post p {
    margin: 12px 0;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Post media should span full width without padding */
.post-media-container {
    margin: 12px -16px 0 -16px; /* Negative margins to extend to edges */
    border-radius: 0; /* Remove border radius for full width */
    overflow: hidden;
}

/* Post media styles - updated for full width */
.post-media {
    border-radius: 0; /* Remove border radius for full width */
    object-fit: cover;
    width: 100%;
    display: block;
}

.single-media {
    max-height: 500px;
    object-fit: cover;
    width: 100%;
}

/* Grid media maintains aspect ratio */
.grid-media {
    height: 200px;
    object-fit: cover;
}

/* Update post-image styles to match new layout */
.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
    margin: 12px -16px 0 -16px; /* Full width like other media */
    border-radius: 0;
}

/* Dark mode updates for new styles */
.dark-mode #preview-container, body.dark-mode #preview-container {
    background: #2c3e50;
    border-color: #34495e;
}

.dark-mode .post-wrapper, body.dark-mode .post-wrapper {
    background: #2c3e50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dark-mode .post-wrapper:hover, body.dark-mode .post-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Mobile responsive updates */
@media (max-width: 600px) {
    .preview-grid-2 {
        grid-template-columns: 1fr;
    }

    .post-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .preview-grid-multiple {
        grid-template-columns: 1fr 1fr;
    }
    
    .grid-preview {
        height: 100px;
    }
    
    .post {
        padding: 12px;
    }
    
    .post-media-container {
        margin: 12px -12px 0 -12px;
    }
    
    .post-image {
        margin: 12px -12px 0 -12px;
    }
}

/* Media Modal Styles */
.media-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.media-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    max-height: 800px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.media-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.media-modal-close:hover {
    color: #000;
    background-color: #f0f0f0;
}

.media-modal-body {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.media-modal-left {
    width: 40%;
    background-color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.media-modal-right {
    width: 60%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-post-text {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #333;
    word-wrap: break-word;
}

.modal-post-actions {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.modal-like-button,
.modal-comment-button {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modal-like-button:hover,
.modal-comment-button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.modal-like-button.liked {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #2196f3;
}

.modal-reaction-container {
    position: relative;
    display: inline-block;
}

.modal-reaction-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1002;
    min-width: 180px;
    padding: 8px 0;
    margin-top: 5px;
}

.modal-reaction-dropdown button {
    display: block;
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.modal-reaction-dropdown button:hover {
    background-color: #f5f5f5;
}

.modal-comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-comments-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

.modal-comment {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.modal-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.modal-comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.modal-comment-avatar.clickable-avatar {
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-comment-avatar.clickable-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.dark-mode .modal-comment-avatar.clickable-avatar:hover {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* Dark mode for modal comment headers - full names */
.dark-mode .modal-comment-header strong,
.dark-mode .modal-reply-header strong,
body.dark-mode .modal-comment-header strong,
body.dark-mode .modal-reply-header strong {
    color: #ffffff !important;
}

.dark-mode .modal-comment,
.dark-mode .modal-reply,
body.dark-mode .modal-comment,
body.dark-mode .modal-reply {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

/* Dark mode for regular comment sections (not modal) */
.dark-mode .comment strong,
.dark-mode .reply strong,
body.dark-mode .comment strong,
body.dark-mode .reply strong {
    color: #ffffff !important;
}

.dark-mode .comment,
.dark-mode .reply,
body.dark-mode .comment,
body.dark-mode .reply {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

.modal-comment-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.modal-comment-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.modal-comment-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    min-height: 40px;
    max-height: 100px;
}

.modal-comment-form button {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    height: 40px;
}

.modal-comment-form button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.modal-comment-form button:not(:disabled):hover {
    background-color: #1976d2;
}

.media-display {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-media {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    min-height: 400px;
    /* Black background for modal media as well */
    background-color: #000;
}

.media-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.media-nav-prev {
    left: 20px;
}

.media-nav-next {
    right: 20px;
}

/* Dark mode support for modal */
body.dark-mode .media-modal-left {
    background-color: #1a1a1a;
    border-right-color: #333;
}

body.dark-mode .modal-post-text {
    color: #e0e0e0;
}

body.dark-mode .modal-comment {
    background-color: #2a2a2a;
}

body.dark-mode .modal-comment-text {
    color: #e0e0e0;
}

body.dark-mode .modal-like-button,
body.dark-mode .modal-comment-button {
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .modal-like-button:hover,
body.dark-mode .modal-comment-button:hover {
    background-color: #333;
    border-color: #666;
}

body.dark-mode .modal-comment-form textarea {
    background-color: #2a2a2a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .modal-reaction-dropdown {
    background-color: #2a2a2a;
    border-color: #555;
}

body.dark-mode .modal-reaction-dropdown button {
    color: #e0e0e0;
}

body.dark-mode .modal-reaction-dropdown button:hover {
    background-color: #333;
}

/* Modal comment actions and replies */
.modal-comment-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    font-size: 0.9rem;
}

.modal-like-button, .modal-reply-button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.modal-like-button:hover, .modal-reply-button:hover {
    background-color: #e9ecef;
}

.modal-like-button.liked {
    color: #007bff;
    background-color: #e7f3ff;
}

.modal-comment-time {
    color: #999;
    font-size: 0.8rem;
}

.modal-reply {
    margin-left: 20px;
    margin-top: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.modal-reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.modal-reply-form {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007bff;
}

.modal-reply-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.modal-reply-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-reply-actions button:first-child {
    background-color: #6c757d;
    color: white;
}

.modal-reply-actions button:first-child:hover {
    background-color: #5a6268;
}

.modal-reply-actions button:last-child {
    background-color: #007bff;
    color: white;
}

.modal-reply-actions button:last-child:hover {
    background-color: #0056b3;
}

/* Hide mobile-only buttons on desktop */
.comments-expand-toggle,
.comments-collapse-btn {
    display: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .media-modal-content {
        width: 100%;
        height: 100%;
        flex-direction: column;
        border-radius: 0;
        position: relative;
    }
    
    .media-modal-body {
        flex-direction: column;
        height: 100%;
        position: relative;
    }
    
    /* Media appears first/on top - fixed height */
    .media-modal-right {
        width: 100%;
        height: 60%;
        order: 1;
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
        flex-shrink: 0;
    }
    
    /* Text and comments appear below media - scrollable */
    .media-modal-left {
        width: 100%;
        height: 40%;
        order: 2;
        border-right: none;
        border-top: none;
        overflow-y: auto;
        padding: 15px;
        background: white;
        flex-shrink: 0;
        position: relative;
    }
    
    /* Instagram-style expandable comments */
    .media-modal-left.comments-expanded {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: 10;
        border-top: none;
        background: white;
    }
    
    /* Comments expansion toggle - only show on mobile */
    .comments-expand-toggle {
        position: absolute;
        top: 10px;
        right: 15px;
        background: #f0f0f0;
        border: none;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        cursor: pointer;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 11;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .comments-expand-toggle:hover {
        background: #e0e0e0;
    }
    
    /* Hide expand button when comments are expanded */
    .media-modal-left.comments-expanded .comments-expand-toggle {
        display: none;
    }
    
    /* Comments collapse button */
    .comments-collapse-btn {
        position: absolute;
        top: 15px;
        left: 15px;
        background: #007bff;
        color: white;
        border: none;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        cursor: pointer;
        font-size: 16px;
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 12;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .media-modal-left.comments-expanded .comments-collapse-btn {
        display: flex;
    }
    
    .media-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .media-nav-prev {
        left: 10px;
    }
    
    .media-nav-next {
        right: 10px;
    }
}

/* Trivia Badge Styling */
.trivia-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
    margin: 5px 0;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.trivia-badge-small {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: bold;
    text-align: center;
    margin-left: 5px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.trivia-badge.gold, .trivia-badge-small.gold {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    border: 1px solid #e6c200;
}

.trivia-badge.silver, .trivia-badge-small.silver {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    border: 1px solid #999999;
}

.trivia-badge.bronze, .trivia-badge-small.bronze {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    border: 1px solid #a0522d;
}

/* Instagram-style Image Carousel */
.post-media-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-container {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    position: relative;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Slide Counter (1/4 style) */
.slide-counter {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
}

/* Navigation Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: #1da1f2;
}

/* Touch/Swipe Navigation for Mobile */
@media (max-width: 768px) {
    .post-media-carousel {
        touch-action: pan-y pinch-zoom;
    }
    
    /* Hide navigation arrows on mobile - use swipe instead */
    .carousel-nav {
        display: none;
    }
}

/* Desktop Navigation Arrows */
@media (min-width: 769px) {
    .carousel-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.5);
        color: white;
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        z-index: 10;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .post-media-carousel:hover .carousel-nav {
        opacity: 1;
    }
    
    .carousel-nav.prev {
        left: 8px;
    }
    
    .carousel-nav.next {
        right: 8px;
    }
    
    .carousel-nav:hover {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Dark mode support */
.dark-mode .slide-counter {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.dark-mode .carousel-dot {
    background: rgba(255, 255, 255, 0.3);
}

.dark-mode .carousel-dot.active {
    background: #1da1f2;
}

/* Desktop/Mobile Visibility Classes */
.desktop-only {
    display: block !important;
}

.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    /* Ensure post-media-container is hidden on mobile */
    .post-media-container.desktop-only {
        display: none !important;
    }
    
    /* Ensure carousel is visible on mobile */
    .post-media-carousel.mobile-only {
        display: block !important;
    }
}

/* Additional carousel improvements for mobile */
@media (max-width: 768px) {
    .post-media-carousel {
        touch-action: pan-y pinch-zoom;
        user-select: none;
    }
    
    .carousel-container {
        cursor: grab;
    }
    
    .carousel-container:active {
        cursor: grabbing;
    }
}

/* Fix carousel image sizing on mobile */
@media (max-width: 768px) {
    .post-media-carousel {
        touch-action: pan-y pinch-zoom;
        user-select: none;
        max-width: 100%;
        width: 100%;
    }
    
    .carousel-container {
        cursor: grab;
        max-width: 100%;
        width: 100%;
    }
    
    .carousel-container:active {
        cursor: grabbing;
    }
    
    .carousel-slide {
        max-width: 100%;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .carousel-slide img,
    .carousel-slide video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: 400px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    /* Ensure mobile carousel matches standard post image size */
    .post-media-carousel.mobile-only .carousel-slide img,
    .post-media-carousel.mobile-only .carousel-slide video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: 350px; /* Match standard post image height */
        object-fit: cover;
    }
}

/* Post Options Menu (3-dots) Styles */
.post-options {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.post-options-button {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.post-options-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: scale(1.1);
}

.post-options-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 120px;
    z-index: 1000;
    display: none;
}

.post-options-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
}

.post-option-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.post-option-item:hover {
    background-color: #f5f5f5;
}

.post-option-item.report {
    color: #dc3545;
}

.post-option-item.report:hover {
    background-color: #fef2f2;
}

.post-option-item .icon {
    margin-right: 8px;
    font-size: 16px;
}

/* Report Modal Styles */
.report-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.report-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease;
}

.report-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.report-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.report-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.report-modal-body {
    padding: 24px;
}

.report-question {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-option {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.report-option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.report-option.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.report-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 2px;
    transform: scale(1.2);
    accent-color: #007bff;
}

.report-option-content {
    flex: 1;
}

.report-option-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.report-modal-footer {
    padding: 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.report-modal-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-modal-button.cancel {
    background-color: #6c757d;
    color: white;
}

.report-modal-button.cancel:hover {
    background-color: #5a6268;
}

.report-modal-button.submit {
    background-color: #dc3545;
    color: white;
}

.report-modal-button.submit:hover {
    background-color: #c82333;
}

.report-modal-button:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Dark Mode Styles for Post Options and Report Modal */
.dark-mode .post-options-button, body.dark-mode .post-options-button {
    color: #b0b0b0;
}

.dark-mode .post-options-button:hover, body.dark-mode .post-options-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.dark-mode .post-options-dropdown, body.dark-mode .post-options-dropdown {
    background: #2c3e50;
    border-color: #34495e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dark-mode .post-option-item, body.dark-mode .post-option-item {
    color: #e0e0e0;
}

.dark-mode .post-option-item:hover, body.dark-mode .post-option-item:hover {
    background-color: #34495e;
}

.dark-mode .post-option-item.report:hover, body.dark-mode .post-option-item.report:hover {
    background-color: #4a2c2c;
}

.dark-mode .report-modal-content, body.dark-mode .report-modal-content {
    background-color: #2c3e50;
}

.dark-mode .report-modal-header, body.dark-mode .report-modal-header {
    border-bottom-color: #34495e;
}

.dark-mode .report-modal-header h3, body.dark-mode .report-modal-header h3,
.dark-mode .report-question, body.dark-mode .report-question,
.dark-mode .report-option-title, body.dark-mode .report-option-title {
    color: #e0e0e0;
}

.dark-mode .report-modal-close, body.dark-mode .report-modal-close {
    color: #b0b0b0;
}

.dark-mode .report-modal-close:hover, body.dark-mode .report-modal-close:hover {
    background-color: #34495e;
    color: #e0e0e0;
}

.dark-mode .report-option, body.dark-mode .report-option {
    background-color: #2c3e50;
    border-color: #34495e;
}

.dark-mode .report-option:hover, body.dark-mode .report-option:hover {
    border-color: #007bff;
    background-color: #34495e;
}

.dark-mode .report-option.selected, body.dark-mode .report-option.selected {
    border-color: #007bff;
    background-color: #1a2332;
}

.dark-mode .report-modal-footer, body.dark-mode .report-modal-footer {
    border-top-color: #34495e;
}

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

@keyframes slideInUp {
    from {
        transform: translate(-50%, 100%);
        left: 50%;
        position: relative;
    }
    to {
        transform: translate(-50%, 0);
        left: 50%;
        position: relative;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .report-modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .post-options-dropdown {
        right: -10px;
    }
    
    .report-modal-header,
    .report-modal-body,
    .report-modal-footer {
        padding: 16px;
    }
    
    .report-option {
        padding: 12px;
    }
}

/* Mixed Content Styles for Homepage Recent Activity */

/* Content Type Badges */
.content-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.listing-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.event-badge {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
}

/* Listing Posts in Homepage */
.listing-post-wrapper {
    margin-bottom: 30px;
}

.listing-post {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.listing-post .post-header {
    padding: 16px 16px 0 16px;
    position: relative; /* Enable absolute positioning for post-options */
}

.homepage-listing {
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.homepage-listing .listing-image {
    margin: 12px -16px 0 -16px; /* Match regular post media margins */
    position: relative;
    overflow: hidden;
    border-radius: 0; /* Match regular post media */
}

.homepage-listing .listing-image img {
    width: 100%;
    max-height: 400px; /* Responsive height like regular posts */
    object-fit: cover;
    display: block;
}

.homepage-listing .listing-image a {
    display: block;
    width: 100%;
}

.homepage-listing .no-image-placeholder {
    width: 100%;
    height: 200px; /* Fixed height for placeholder when no image */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 24px;
}

.homepage-listing .featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.homepage-listing .listing-status {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
    max-width: calc(100% - 40px); /* Ensure it doesn't overflow */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Add shadow for better visibility */
    /* Ensure the badge is fully contained within visible area */
    transform: translate(-4px, 4px);
}

.homepage-listing .listing-status.active {
    background: #28a745;
    color: white;
}

.homepage-listing .listing-status.sold {
    background: #dc3545;
    color: white;
}

.homepage-listing .listing-content {
    padding: 16px;
}

.homepage-listing .listing-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333;
}

.homepage-listing .listing-price {
    font-size: 20px;
    font-weight: 700;
    color: #28a745;
    margin: 0 0 12px 0;
}

.homepage-listing .listing-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.homepage-listing .listing-details span {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #6c757d;
}

.homepage-listing .listing-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 16px;
}

.homepage-listing .listing-actions {
    display: flex;
    gap: 8px;
}

.homepage-listing .btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.homepage-listing .btn-primary {
    background: #007bff;
    color: white;
}

.homepage-listing .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.homepage-listing .btn-secondary {
    background: #6c757d;
    color: white;
}

.homepage-listing .btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.homepage-listing .make-offer-btn {
    background: #28a745 !important;
    color: white !important;
    border: 1px solid #28a745;
}

.homepage-listing .make-offer-btn:hover {
    background: #218838 !important;
    color: white !important;
    border-color: #1e7e34;
    text-decoration: none;
}

/* Event Posts in Homepage */
.event-post-wrapper {
    margin-bottom: 30px;
}

.event-post {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.event-post .post-header {
    padding: 16px 16px 0 16px;
}

.homepage-event {
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    display: flex;
    gap: 16px;
    padding: 16px;
}

.homepage-event .event-image {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.homepage-event .event-image-placeholder {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    flex-shrink: 0;
}

.homepage-event .event-icon {
    font-size: 48px;
}

.homepage-event .event-details {
    flex: 1;
}

.homepage-event .event-details h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
}

.homepage-event .event-details h3 a {
    color: #333;
    text-decoration: none;
}

.homepage-event .event-details h3 a:hover {
    color: #007bff;
}

.homepage-event .event-host,
.homepage-event .event-time,
.homepage-event .event-location {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
}

.homepage-event .event-description {
    margin: 8px 0 12px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

.homepage-event .read-more-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.homepage-event .read-more-link:hover {
    text-decoration: underline;
}

.homepage-event .event-visibility {
    margin: 8px 0;
}

.homepage-event .visibility-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.homepage-event .visibility-direct_family {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.homepage-event .visibility-indirect_family {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.homepage-event .event-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.homepage-event .view-btn,
.homepage-event .join-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.homepage-event .view-btn {
    background: #007bff;
    color: white;
}

.homepage-event .view-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.homepage-event .join-btn {
    background: #28a745;
    color: white;
}

.homepage-event .join-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.homepage-event .join-btn.request-sent {
    background: #6c757d;
    cursor: not-allowed;
}

.homepage-event .join-btn.request-sent:hover {
    transform: none;
}

/* Modal Styles for Event Details */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 0 20px 20px 20px;
    text-align: right;
}

/* Dark Mode Support */
.dark-mode .listing-post,
.dark-mode .event-post,
body.dark-mode .listing-post,
body.dark-mode .event-post {
    background: #2d2d2d !important;
}

.dark-mode .content-type-badge,
body.dark-mode .content-type-badge {
    background: linear-gradient(135deg, #4a5568, #2d3748) !important;
    color: #e2e8f0 !important;
}

.dark-mode .homepage-listing .listing-title,
.dark-mode .homepage-event .event-details h3 a,
body.dark-mode .homepage-listing .listing-title,
body.dark-mode .homepage-event .event-details h3 a {
    color: #e2e8f0 !important;
}

.dark-mode .homepage-listing .listing-description,
.dark-mode .homepage-event .event-description,
.dark-mode .homepage-event .event-host,
.dark-mode .homepage-event .event-time,
.dark-mode .homepage-event .event-location,
body.dark-mode .homepage-listing .listing-description,
body.dark-mode .homepage-event .event-description,
body.dark-mode .homepage-event .event-host,
body.dark-mode .homepage-event .event-time,
body.dark-mode .homepage-event .event-location {
    color: #a0aec0 !important;
}

.dark-mode .homepage-listing .listing-details span,
body.dark-mode .homepage-listing .listing-details span {
    background: #4a5568 !important;
    color: #e2e8f0 !important;
}

.dark-mode .homepage-listing .no-image-placeholder,
.dark-mode .homepage-event .event-image-placeholder,
body.dark-mode .homepage-listing .no-image-placeholder,
body.dark-mode .homepage-event .event-image-placeholder {
    background: #4a5568 !important;
    color: #a0aec0 !important;
}

.dark-mode .homepage-listing .make-offer-btn,
body.dark-mode .homepage-listing .make-offer-btn {
    background: #38a169 !important;
    border-color: #38a169 !important;
}

.dark-mode .homepage-listing .make-offer-btn:hover,
body.dark-mode .homepage-listing .make-offer-btn:hover {
    background: #2f855a !important;
    border-color: #2f855a !important;
}

.dark-mode .modal-content,
body.dark-mode .modal-content {
    background: #2d2d2d !important;
}

.dark-mode .modal-header h3,
body.dark-mode .modal-header h3 {
    color: #e2e8f0 !important;
}

.dark-mode .modal-body,
body.dark-mode .modal-body {
    color: #a0aec0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .homepage-event {
        flex-direction: column;
        gap: 12px;
    }
    
    .homepage-event .event-image,
    .homepage-event .event-image-placeholder {
        width: 100%;
        height: 200px;
    }
    
    .homepage-listing .listing-image {
        margin: 12px -12px 0 -12px; /* Adjust negative margins for mobile padding */
    }
    
    .homepage-listing .listing-actions,
    .homepage-event .event-actions {
        flex-direction: row; /* Keep buttons side by side */
        gap: 8px;
        flex-wrap: wrap; /* Allow wrapping if needed */
    }
    
    .homepage-listing .listing-actions .btn,
    .homepage-event .event-actions .btn,
    .homepage-event .event-actions .view-btn,
    .homepage-event .event-actions .join-btn {
        flex: 1; /* Make buttons equal width */
        min-width: 0; /* Allow flex shrinking */
        text-align: center;
        font-size: 13px; /* Slightly smaller text for mobile */
        padding: 8px 12px; /* Adjust padding for mobile */
    }
    
    .content-type-badge {
        display: block;
        margin: 4px 0;
    }
}