/* FitFeed Application - Minimalist Modern Design */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header and Navigation */
header {
    background-color: white;
    color: #1e293b;
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1e293b;
}

.logo {
    height: 32px;
    width: auto;
    margin-right: 12px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-logo {
    position: absolute;
    top: 20px;
    left: 20px;
}

.logo-small {
    height: 28px;
    width: auto;
}

nav .nav-links a {
    color: #64748b;
    text-decoration: none;
    margin-left: 25px;
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

nav .nav-links a:hover,
nav .nav-links a.active {
    color: #10b981;
}

nav .nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #10b981;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #86efac;
    box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.2);
}

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

/* Authentication Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 60px 40px 40px;
    position: relative;
    border: 1px solid #e2e8f0;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 10px;
}

.logo-container-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-container-corner {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.logo-small {
    height: 24px;
    width: auto;
}

.auth-header h2 {
    font-family: "Montserrat", sans-serif;
    font-size: 1.5rem;
    color: #1e293b;
    margin: 0;
    font-weight: 600;
}

.auth-header p {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 6px;
}

.auth-form {
    margin-bottom: 24px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input {
    width: auto;
}

.remember-me label {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
}

.forgot-link {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-button {
    width: 100%;
    padding: 14px;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.auth-button:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    margin-top: 8px;
}

.auth-footer p {
    color: #64748b;
    font-size: 0.95rem;
}

.auth-footer a {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.form-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0 24px;
    font-size: 0.9rem;
}

.form-agreement input {
    width: auto;
    margin-top: 3px;
}

.form-agreement label {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.form-agreement a {
    color: #10b981;
    text-decoration: none;
}

.form-agreement a:hover {
    text-decoration: underline;
}

.stats-title {
    font-size: 1.1rem;
    color: #1e293b;
    margin: 30px 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

button {
    background-color: #10b981;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

button:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.button {
    display: inline-block;
    background-color: #10b981;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.button:hover {
    background-color: #059669;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.profile-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.daily-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.user-info {
    margin: 20px 0;
}

.user-info p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #334155;
}

.user-info strong {
    color: #1e293b;
    font-weight: 500;
}

.streak-info {
    background-color: #eff6ff;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border-left: 4px solid #10b981;
}

.streak-info h3 {
    color: #065f46;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

#streak-count {
    font-size: 1.8em;
    font-weight: 700;
    color: #047857;
    display: block;
    margin-top: 5px;
}

/* Badges Section */
.badges-section h3,
.profile-badges h3 {
    margin-bottom: 16px;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge-item {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 10px 14px;
    border-radius: 8px;
    text-align: center;
    min-width: 130px;
    border: 1px solid #e2e8f0;
}

.badge-item img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    object-fit: contain;
}

.badge-info h4 {
    margin-bottom: 3px;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-info p {
    font-size: 0.75rem;
    color: #64748b;
}

.daily-post-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.daily-post-section h3 {
    margin-bottom: 16px;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Posts */
.post {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
}

.post:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.05);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.post-header h4 {
    margin: 0;
    font-size: 1rem;
}

.post-header h4 a {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
}

.post-header h4 a:hover {
    text-decoration: underline;
}

.post-date {
    color: #94a3b8;
    font-size: 0.85rem;
}

.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
}

.post-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    color: #64748b;
    font-size: 0.9rem;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.like-btn {
    background-color: #e2e8f0;
    color: #475569;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
    font-family: "Poppins", sans-serif;
}

.like-btn:hover {
    background-color: #cbd5e1;
}

.like-btn.liked {
    background-color: #fee2e2;
    color: #ef4444;
}

.comment-btn {
    background-color: #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.comment-btn:hover {
    background-color: #cbd5e1;
}

/* Community Feed */
.feed-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.feed-posts h2 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 600;
}

.today-stats {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.today-stats h3 {
    margin-bottom: 16px;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.stats-summary p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #334155;
}

/* Profile Page */
.profile-page {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.profile-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.profile-header h1 {
    color: #1e293b;
    margin-bottom: 8px;
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-header p {
    color: #64748b;
    font-size: 0.9rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-grid p {
    margin: 0;
    font-size: 0.95rem;
    color: #334155;
}

.info-grid strong {
    color: #1e293b;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.profile-stats,
.profile-badges,
.profile-posts {
    margin-top: 24px;
}

.profile-stats h2,
.profile-badges h2,
.profile-posts h2 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Comments */
.comments-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    margin-top: 24px;
}

.comments-list {
    margin-bottom: 20px;
}

.comment {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.comment-header strong {
    color: #10b981;
}

.comment-date {
    color: #94a3b8;
}

.add-comment-form {
    margin-top: 20px;
}

/* Stats Table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stats-table th,
.stats-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.stats-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

/* Stats Comparison */
.stats-comparison {
    margin-top: 20px;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.comparison-data p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #334155;
}

.comparison-data p span {
    font-weight: 500;
}

.comparison-data p.positive {
    color: #16a34a;
}

.comparison-data p.negative {
    color: #dc2626;
}

/* Responsive Design */
@media (max-width: 992px) {
    .feed-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    nav .nav-container {
        flex-direction: column;
        gap: 16px;
        padding: 0 16px;
    }
    
    nav .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav .nav-links a {
        margin: 0 8px;
        font-size: 0.85rem;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .post-actions {
        flex-wrap: wrap;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .post-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .feed-container,
    .dashboard {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .profile-section,
    .daily-section {
        padding: 16px;
    }
    
    .streak-info {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    nav .nav-links a {
        margin: 4px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .post {
        padding: 16px;
    }
    
    .profile-page {
        padding: 16px;
    }
    
    button,
    .button {
        width: 100%;
        text-align: center;
    }
    
    .post-actions {
        flex-direction: column;
    }
}

/* Auth forms responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-card {
        padding: 30px 24px;
    }
}

.delete-btn {
    background-color: #fecaca;
    color: #dc2626;
    border: none;
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
    font-family: "Poppins", sans-serif;
}

.delete-btn:hover {
    background-color: #fee2e2;
}

.delete-form {
    display: inline-block;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }
}