/* Community Forum Styles */
.community-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideIn 0.4s ease;
}

.modal-header {
    background: linear-gradient(135deg, #2a5885, #4a90e2);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-modal:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 20px;
}

/* Tabs for navigation */
.forum-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.forum-tab {
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum-tab:hover {
    background-color: #f5f8ff;
}

.forum-tab.active {
    border-bottom: 3px solid #2a5885;
    color: #2a5885;
}

/* Stories section */
.stories-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.story-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #2a5885;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 15px;
}

.story-meta {
    flex: 1;
}

.author-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    color: #333;
}

.story-date {
    font-size: 0.85rem;
    color: #777;
    display: flex;
    align-items: center;
    gap: 5px;
}

.story-content {
    line-height: 1.6;
    color: #444;
    margin-bottom: 15px;
}

.story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.reaction-buttons {
    display: flex;
    gap: 15px;
}

.reaction-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.reaction-btn:hover {
    color: #2a5885;
    transform: scale(1.1);
}

.reaction-btn.liked {
    color: #e74c3c;
}

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.story-tag {
    background-color: #e6f0fd;
    color: #2a5885;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Form to share story */
.share-form {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #2a5885;
    box-shadow: 0 0 0 3px rgba(42, 88, 133, 0.1);
    outline: none;
}

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

.emoji-picker {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.emoji-btn:hover {
    background-color: #e6f0fd;
    transform: scale(1.2);
}

.tag-input {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 50px;
}

.tag {
    background-color: #e6f0fd;
    color: #2a5885;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-remove {
    cursor: pointer;
    font-weight: bold;
}

.tag-input input {
    border: none;
    flex: 1;
    padding: 5px;
    font-size: 0.9rem;
    min-width: 100px;
}

.tag-input input:focus {
    outline: none;
}

.submit-btn {
    background: linear-gradient(135deg, #2a5885, #4a90e2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(42, 88, 133, 0.2);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1d3f5f, #2a5885);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(42, 88, 133, 0.3);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.filter-options {
    display: flex;
    gap: 15px;
}

.filter-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
    color: #2a5885;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 20px;
    padding: 5px 15px;
    width: 200px;
    transition: width 0.3s ease;
}

.search-box:focus-within {
    width: 250px;
    background-color: #e6f0fd;
}

.search-box input {
    border: none;
    background: none;
    padding: 8px;
    width: 100%;
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
}

.search-icon {
    color: #777;
}

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

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #555;
}

/* Loading animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2a5885;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2a5885;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1100;
    animation: slideUp 0.3s ease, fadeOut 0.3s ease 3s forwards;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

/* Responsive styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .forum-tabs {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .forum-tab {
        white-space: nowrap;
        padding: 10px 15px;
    }
    
    .story-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .avatar {
        margin-bottom: 10px;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
}
