/* Enhanced UI Styles for Community Forum and Code Help */

/* Global Styles */
:root {
    /* Original colors from styles.css */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --card-background: #ffffff;
    
    /* Additional colors for enhanced UI */
    --primary-light: #a29bfe;
    --secondary-light: #55efc4;
    --dark-color: #2d3436;
    --light-color: #f8f9fa;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --border-radius: 10px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

/* Enhanced Tab Buttons */
.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 3px;
}

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

.tab-btn:hover::before {
    width: 80%;
}

.tab-btn.active {
    color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.1);
}

.tab-btn.active::before {
    width: 80%;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

/* Enhanced Form Elements */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
    outline: none;
}

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

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

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

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
}

.submit-btn:hover {
    background-color: #5649c0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(108, 92, 231, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(108, 92, 231, 0.3);
}

/* Enhanced Emoji Picker */
.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 10px;
    max-width: 100%;
    overflow-x: auto;
}

.emoji-btn {
    background: white;
    border: 1px solid #eee;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.emoji-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

/* Enhanced Notifications */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: white;
    color: #333;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--info-color);
}

.notification i {
    font-size: 1.2rem;
}

.notification.success i {
    color: var(--success-color);
}

.notification.error i {
    color: var(--danger-color);
}

.notification.warning i {
    color: var(--warning-color);
}

.notification.info i {
    color: var(--info-color);
}

/* Enhanced Code Help Section */
.code-question-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    overflow: hidden;
}

.code-question-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.code-snippet {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.code-snippet pre {
    margin: 0;
    padding: 15px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-snippet-header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #343a40;
    color: #f8f9fa;
}

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

.copy-code-btn:hover {
    color: white;
}

.language-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.language-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.language-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.code-search-box {
    position: relative;
    margin-bottom: 20px;
}

.code-search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.code-search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
    outline: none;
}

.code-search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.code-filter-btn {
    padding: 8px 15px;
    border-radius: 20px;
    background: none;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.code-filter-btn:hover, .code-filter-btn.active {
    background-color: rgba(108, 92, 231, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.code-answer {
    position: relative;
    margin-top: 15px;
    padding: 20px;
    border-radius: 10px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.code-answer:hover {
    background-color: #f0f7ff;
}

.code-answer.accepted {
    background-color: #e6ffed;
    border-left: 4px solid var(--success-color);
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #aaa;
    transition: all 0.2s ease;
}

.vote-btn:hover {
    transform: scale(1.2);
}

.vote-btn.upvote:hover, .vote-btn.upvote.active {
    color: var(--success-color);
}

.vote-btn.downvote:hover, .vote-btn.downvote.active {
    color: var(--danger-color);
}

.accept-answer-btn {
    background-color: #f0f0f0;
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.accept-answer-btn:hover {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.accept-answer-btn.accepted {
    background-color: var(--success-color);
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tab-buttons {
        justify-content: center;
    }
    
    .tab-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .code-help-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .code-filter-options {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .language-badges {
        justify-content: center;
    }
    
    .code-question-actions {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .emoji-picker {
        justify-content: center;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(108, 92, 231, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

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

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

.empty-state h3 {
    margin-bottom: 10px;
    font-weight: 600;
}

/* Code Editor Enhancements */
.code-editor {
    font-family: 'Fira Code', 'Courier New', monospace;
    line-height: 1.6;
    padding: 15px;
    border-radius: 10px;
    resize: vertical;
    min-height: 150px;
    transition: all 0.3s ease;
}

.code-editor:focus {
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
    outline: none;
}
