/* Contributions Page Specific Styles */

/* Override the main page body styles that prevent scrolling */
body.contributions-page {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    overflow: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: static !important;
    /* Reset any conflicting styles from main.css */
    height: auto !important;
    /* Ensure smooth scrolling */
    scroll-behavior: smooth;
}

/* Reset html element as well to ensure scrolling works */
html {
    overflow: auto !important;
    height: auto !important;
}

/* Ensure visual effects don't interfere with scrolling on contributions page */
.contributions-page .shooting-stars,
.contributions-page .sparkles,
.contributions-page .floating-particles {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.contributions-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1200px;
    width: 95%;
    margin: 0 auto;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
    /* Ensure container doesn't interfere with scrolling */
    overflow: visible;
}

/* Header Styles */
.contributions-header {
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 50%, #3a86ff 100%);
    background-size: 200% 200%;
    animation: headerGradient 8s ease infinite;
    color: white;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(255, 0, 110, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.contributions-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

.contributions-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.contributions-header .logo {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.contributions-header .header-text h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffffff, #e0e7ff, #ffffff);
    background-size: 200% 200%;
    animation: textShimmer 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contributions-header .header-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.contributions-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 1rem;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.welcome-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #e0e7ff);
    background-size: 200% 200%;
    animation: textShimmer 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Section Headers */
.section-header {
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.section-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffffff, #e0e7ff);
    background-size: 200% 200%;
    animation: textShimmer 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    opacity: 0.9;
    font-size: 1rem;
}

/* Quick Contribute Section */
.quick-contribute-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.quick-prompts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.quick-prompt-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.quick-prompt-card:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.quick-prompt-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.quick-prompt-card p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.5;
}

.quick-prompt-card .category-tag {
    display: inline-block;
    background: rgba(255, 0, 110, 0.3);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.75rem;
    border: 1px solid rgba(255, 0, 110, 0.4);
}

/* Detailed Contribution Form */
.detailed-contribute-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contribution-form-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detailed-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detailed-form .form-group {
    margin-bottom: 1.5rem;
}

.detailed-form .form-group:last-child {
    margin-bottom: 0;
}

.detailed-form label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.detailed-form input,
.detailed-form textarea,
.detailed-form select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.detailed-form input::placeholder,
.detailed-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.detailed-form input:focus,
.detailed-form textarea:focus,
.detailed-form select:focus {
    outline: none;
    border-color: #ff006e;
    box-shadow: 
        0 0 0 3px rgba(255, 0, 110, 0.3),
        0 0 20px rgba(255, 0, 110, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.detailed-form textarea {
    resize: vertical;
    min-height: 150px;
}

.detailed-form small {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.char-counter {
    text-align: right;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.confidence-slider {
    margin-top: 0.5rem;
}

.confidence-slider input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
    border: none;
    padding: 0;
}

.confidence-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.confidence-slider input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.confidence-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Recent Contributions */
.recent-contributions-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contributions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contribution-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.contribution-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.contribution-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.contribution-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    flex: 1;
}

.contribution-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.contribution-answer {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.contribution-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    opacity: 0.8;
}

.contribution-category {
    background: rgba(58, 134, 255, 0.3);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid rgba(58, 134, 255, 0.4);
}

.contribution-actions {
    display: flex;
    gap: 0.5rem;
}

.contribution-actions button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contribution-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* Loading States */
.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contributions-container {
        width: 98%;
        padding: 1rem 0;
    }

    .contributions-header {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .contributions-header .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .contributions-header .logo {
        font-size: 2.5rem;
    }

    .contributions-header .header-text h1 {
        font-size: 1.875rem;
    }

    .contributions-header .header-subtitle {
        font-size: 1rem;
    }

    .welcome-card {
        padding: 1.5rem;
    }

    .welcome-card h2 {
        font-size: 1.5rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .quick-prompts {
        grid-template-columns: 1fr;
    }

    .detailed-form .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .contribution-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .contribution-meta {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .contribution-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .contributions-header .header-actions {
        width: 100%;
        justify-content: center;
    }

    .detailed-contribute-section,
    .quick-contribute-section,
    .recent-contributions-section {
        padding: 1.5rem;
    }

    .contribution-form-container {
        padding: 1.5rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.6;
}