* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

.community-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.community-header {
    background: linear-gradient(135deg, #f0f8f5 0%, #e8f5f0 100%);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 60px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.community-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 16px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 15px;
}

.community-header img {
    width: 60px;
    height: 60px;
    margin-bottom: -75px;
    margin-left: -450px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.community-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 16px;
}

.community-header p {
    font-size: 16px;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.stats-section {
    margin-bottom: 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}

.stat-number.stat-green { color: #4caf50; }
.stat-number.stat-blue { color: #2196f3; }
.stat-number.stat-orange { color: #ff9800; }
.stat-number.stat-purple { color: #9c27b0; }

.stat-label {
    color: #666;
    font-size: 0.95em;
    display: block;
}

.challenges-section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.carousel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.challenges-grid-js {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
    max-width: 1050px;
}

.challenge-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #4caf50;
    display: flex;
    flex-direction: column;
}

.challenge-card:nth-child(2) {
    border-left-color: #2196f3;
}

.challenge-card:nth-child(3) {
    border-left-color: #ff9800;
}

.challenge-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.challenge-icon-wrapper {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}

.challenge-icon-wrapper.blue-gradient {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.challenge-icon-wrapper.orange-gradient {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
}

.challenge-icon {
    font-size: 3em;
}

.challenge-content {
    padding: 20px;
}

.challenge-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.challenge-participants {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 12px;
}

.challenge-description {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
}

.progress-container {
    margin: 15px 0;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.challenge-card:nth-child(2) .progress-fill {
    background: linear-gradient(90deg, #2196f3 0%, #42a5f5 100%);
}

.challenge-card:nth-child(3) .progress-fill {
    background: linear-gradient(90deg, #ff9800 0%, #ffa726 100%);
}

.progress-percentage {
    display: block;
    text-align: right;
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
}

.btn-join {
    width: 100%;
    padding: 12px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-join:hover {
    background: #45a049;
    transform: scale(1.02);
}

.success-stories {
    margin-bottom: 80px;
}

.stories-grid-js {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1050px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40%;
}

.carousel-btn:hover {
    background-color: #f0f8f5;
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
    left: -22px;
    background-image: url('/static/img/arrow1.png');
}

.carousel-btn.next {
    right: -22px;
    background-image: url('/static/img/arrow.png');
}

.story-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 24px;
    border-left: 5px solid #059669;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.story-card a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.story-stats .comment-link {
    color: #059669;
    font-weight: 600;
}

.story-card a:hover {
    color: #047857;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.story-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.story-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.story-author-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.story-quoute {
    font-size: 14px;
    color: #4b5563;
    font-style: italic;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-grow: 1; 
}

.story-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #059669;
    font-weight: 600;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 16px;
    width: 100%;
}

.community-forum {
    margin-bottom: 60px;
}

.new-post-container h3, .register-box h3 {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
    text-align: center;
}

#new-post-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

#new-post-form input[type="text"],
#new-post-form textarea {
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.3s ease;
}

#new-post-form input[type="text"]:focus,
#new-post-form textarea:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

#new-post-form textarea {
    resize: vertical;
    min-height: 120px;
}

.register-box {
    background-color: #f0f8f5;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.register-box p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary.btn-full,
#new-post-form button.btn-primary {
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    width: 100%;
    background-color: #059669;
    color: white;
}

.btn-primary.btn-full:hover,
#new-post-form button.btn-primary:hover {
    background-color: #047857;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.like-btn {
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.like-btn:hover {
    background-color: #e0e0e0;
}

.like-btn.liked {
    background-color: #059669;
    color: white;
    border-color: #047857;
}


@media (max-width: 1100px) {
    .stories-grid-js,
    .challenges-grid-js {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.header {
    background-color: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
}

.header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 40px;
}

.nav {
    display: flex;
    gap: 25px;
}

.nav a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #059669;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-greeting {
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    margin-right: 5px;
}

.btn {
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: #059669;
    color: white;
    border-color: #059669;
}

.btn-primary:hover {
    background-color: #047857;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
    background-color: #0f172a;
    color: #ffffff;
    border: none;
}

.btn-secondary:hover {
    background-color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.breadcrumb-nav {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb-item a {
    color: #059669;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #047857;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #1f2937;
    font-weight: 600;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #9ca3af;
    font-size: 14px;
}

@media (max-width: 768px) {
    .community-header { 
        padding: 40px 20px; 
    }
    
    .community-header h1 { 
        font-size: 32px; 
    }
    
    .section-title { 
        font-size: 24px; 
    }
    
    .stories-grid-js,
    .challenges-grid-js {
        grid-template-columns: 1fr;
        max-width: 350px;
    }
    
    .carousel-btn {
        display: none !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.btn-progress {
    background: #2196f3 !important;
}

.btn-progress:hover {
    background: #1976d2 !important;
}

.btn-completed {
    background: #9e9e9e !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.btn-completed:hover {
    transform: none !important;
    background: #9e9e9e !important;
}

.community-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 42px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 16px;
}

.community-header img {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
    animation: float 3s ease-in-out infinite;
}

.community-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 42px;
    font-weight: 700;
    color: #059669;
    margin: 0 auto 16px;
}

.community-header img {
    width: 60px;
    height: 60px;
    margin: 0;
    animation: float 3s ease-in-out infinite;
}

.community-header {
    text-align: center;
}

.community-header p {
    text-align: center;
}