/*
Theme Name: Productivity Hub
Theme URI: https://example.com/productivity-hub
Author: Your Name
Author URI: https://example.com
Description: A comprehensive productivity theme with Trello-like boards, habit tracker, health vitals tracker, and social planning features
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: productivity-hub
Tags: productivity, planning, health, social
*/

:root {
    --primary-color: #0079bf;
    --secondary-color: #5aac44;
    --danger-color: #eb5a46;
    --warning-color: #f2d600;
    --info-color: #00c2e0;
    --dark-color: #172b4d;
    --light-color: #f4f5f7;
    --border-color: #dfe1e6;
    --text-color: #172b4d;
    --text-muted: #5e6c84;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: #fafbfc;
    line-height: 1.6;
}

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

/* Header Styles */
.site-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: relative;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.notification-badge {
    background: #eb5a46;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 5px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    line-height: 1;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border-top: 1px solid #dfe1e6;
        z-index: 100;
    }
    
    .main-nav.show {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid #f4f5f7;
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        padding: 16px 20px;
        display: block;
        width: 100%;
    }
    
    .main-nav a:hover {
        background: #f4f5f7;
    }
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #026aa7;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Trello Board Styles */
.trello-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    min-height: 500px;
}

.trello-list {
    background: var(--light-color);
    border-radius: 8px;
    padding: 15px;
    min-width: 300px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
}

.trello-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.trello-list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.trello-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trello-card {
    background: white;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: all 0.2s;
}

.trello-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.card-title {
    font-weight: 500;
    margin-bottom: 8px;
}

.card-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.card-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.add-card-btn {
    margin-top: 10px;
    width: 100%;
    text-align: left;
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
}

.add-card-btn:hover {
    background: rgba(9,30,66,0.08);
}

/* Habit Tracker Styles */
.habit-tracker {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.habit-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.habit-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.habit-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.habit-streak {
    font-size: 14px;
    color: var(--text-muted);
}

.habit-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.habit-day {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.habit-day.completed {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.habit-day:hover {
    transform: scale(1.1);
}

/* Health Vitals Styles */
.health-tracker {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.vitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.vital-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.vital-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.vital-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

.vital-label {
    font-size: 14px;
    color: var(--text-muted);
}

.vital-chart {
    height: 150px;
    margin-top: 15px;
}

/* Social Feed Styles */
.social-feed {
    max-width: 800px;
    margin: 0 auto;
}

.feed-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.feed-author {
    flex: 1;
}

.author-name {
    font-weight: 600;
    font-size: 15px;
}

.post-time {
    font-size: 13px;
    color: var(--text-muted);
}

.feed-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.feed-actions {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--light-color);
}

.action-btn.active {
    color: var(--primary-color);
}

.comments-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    background: var(--light-color);
    border-radius: 6px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 3px;
}

.comment-text {
    font-size: 14px;
    line-height: 1.4;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.comment-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

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

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dashboard-card h2 {
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .trello-board {
        flex-direction: column;
    }
    
    .trello-list {
        min-width: 100%;
        max-width: 100%;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .vitals-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Responsive - Habits */
@media (max-width: 768px) {
    .habit-card {
        padding: 15px !important;
    }
    
    .habit-calendar {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
        margin-top: 10px;
    }
    
    .habit-day {
        width: 30px !important;
        height: 30px !important;
        font-size: 10px !important;
        padding: 0;
    }
    
    .habit-info h3 {
        font-size: 16px !important;
        margin-bottom: 5px;
    }
    
    .habit-streak {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .habit-day {
        width: 26px !important;
        height: 26px !important;
        font-size: 9px !important;
    }
    
    .habit-calendar {
        gap: 2px;
    }
}

/* Mobile - Habit Buttons */
@media (max-width: 768px) {
    .habit-item {
        padding-top: 50px !important;
    }
    
    .habit-item > div:first-child {
        /* Edit/Delete buttons */
        flex-direction: row !important;
        gap: 5px !important;
    }
    
    .habit-item button {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}

@media (max-width: 480px) {
    .habit-item button {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
}

/* ========== HEALTH/VITALS PAGE MOBILE ========== */
@media (max-width: 768px) {
    /* BMI Calculator */
    .health-tracker {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .health-tracker h2 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .bmi-calculator {
        padding: 15px !important;
    }
    
    /* BMI inputs side by side */
    .bmi-inputs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .bmi-inputs input {
        width: 100% !important;
        font-size: 14px !important;
        padding: 10px !important;
    }
    
    /* BMI Calculate button */
    .bmi-calculator button {
        width: 100% !important;
        font-size: 14px !important;
        padding: 12px !important;
        margin-top: 10px !important;
    }
    
    /* BMI Result */
    #bmiResult {
        font-size: 14px !important;
        padding: 12px !important;
        margin-top: 10px !important;
    }
    
    /* Steps Calculator */
    .steps-calculator {
        padding: 15px !important;
    }
    
    .steps-calculator input {
        font-size: 14px !important;
        padding: 10px !important;
    }
    
    /* Current Vitals */
    .vitals-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .vital-card {
        padding: 12px !important;
    }
    
    .vital-value {
        font-size: 24px !important;
    }
    
    .vital-label {
        font-size: 12px !important;
    }
    
    /* Log Vital Modal */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 20px auto !important;
        padding: 20px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    .modal-content h2 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .modal-content label {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }
    
    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        font-size: 14px !important;
        padding: 10px !important;
        width: 100% !important;
    }
    
    .modal-content button {
        font-size: 14px !important;
        padding: 12px 20px !important;
    }
    
    /* Close button */
    .modal-content .close {
        font-size: 28px !important;
        right: 15px !important;
        top: 10px !important;
    }
}

@media (max-width: 480px) {
    .health-tracker {
        padding: 12px !important;
        margin: 10px 0 !important;
    }
    
    .health-tracker h2 {
        font-size: 18px !important;
    }
    
    .bmi-inputs input {
        font-size: 13px !important;
        padding: 8px !important;
    }
    
    .modal-content {
        width: 98% !important;
        padding: 15px !important;
    }
    
    .modal-content h2 {
        font-size: 18px !important;
    }
    
    .vital-value {
        font-size: 20px !important;
    }
}

/* ========== BMI CALCULATOR RESPONSIVE GRID ========== */
@media (max-width: 768px) {
    /* Override inline grid for BMI calculator */
    div[style*="grid-template-columns: 1fr 1fr 1fr auto"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    /* Make calculate button span full width */
    div[style*="grid-template-columns: 1fr 1fr 1fr auto"] > div:last-child {
        grid-column: 1 / -1 !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr 1fr auto"] button {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* Stack everything on small screens */
    div[style*="grid-template-columns: 1fr 1fr 1fr auto"] {
        grid-template-columns: 1fr !important;
    }
}

/* ========== STORIES SYSTEM ========== */
.sws-story-container { 
    display: flex; 
    gap: 15px; 
    overflow-x: auto; 
    padding: 20px; 
    font-family: sans-serif; 
    scrollbar-width: none;
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.sws-story-circle { 
    cursor: pointer; 
    text-align: center; 
    width: 75px; 
    flex-shrink: 0; 
}
.sws-story-circle img, .sws-thumb-text { 
    width: 65px; 
    height: 65px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 2px solid #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    margin: 0 auto;
    font-size: 24px;
    font-weight: 700;
}
.sws-story-circle span {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sws-border-wrap { 
    border-radius: 50%; 
    padding: 3px; 
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); 
}
.sws-story-circle.seen .sws-border-wrap { 
    background: #e0e0e0; 
}
#sws-modal { 
    display: none; 
    position: fixed; 
    z-index: 99999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: #000; 
    flex-direction: column; 
}
#sws-content-area { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.sws-status-view { 
    color: #fff; 
    font-size: 2rem; 
    text-align: center; 
    padding: 40px; 
    font-weight: bold; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
#sws-full-img { 
    max-height: 80vh; 
    max-width: 90vw; 
    border-radius: 12px; 
}
.sws-interactions { 
    position: absolute; 
    bottom: 80px; 
    left: 20px; 
    display: flex; 
    gap: 10px; 
    z-index: 120; 
}
.sws-icon-btn { 
    color: white; 
    background: rgba(0,0,0,0.5); 
    padding: 8px 12px; 
    border-radius: 20px; 
    cursor: pointer; 
    font-size: 14px; 
    backdrop-filter: blur(5px); 
}
.sws-progress-container { 
    position: absolute; 
    top: 15px; 
    left: 10px; 
    right: 10px; 
    display: flex; 
    gap: 5px; 
    height: 3px; 
    z-index: 110; 
}
.sws-bar-bg { 
    flex: 1; 
    background: rgba(255,255,255,0.3); 
    border-radius: 5px; 
    overflow: hidden; 
}
.sws-bar-fill { 
    width: 0%; 
    height: 100%; 
    background: #fff; 
}
.sws-nav { 
    position: absolute; 
    top: 50%; 
    color: #fff; 
    font-size: 40px; 
    cursor: pointer; 
    padding: 20px; 
    z-index: 100; 
    transform: translateY(-50%); 
    opacity: 0.5; 
}
.sws-nav:hover {
    opacity: 1;
}
.sws-prev { left: 0; } 
.sws-next { right: 0; }
.close-story { 
    position: absolute; 
    top: 25px; 
    right: 20px; 
    color: #fff; 
    font-size: 35px; 
    cursor: pointer; 
    z-index: 111; 
}
.sws-see-more { 
    display: none; 
    position: absolute; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: rgba(255,255,255,0.2); 
    color: #fff; 
    padding: 8px 20px; 
    border-radius: 20px; 
    text-decoration: none; 
    border: 1px solid #fff; 
    z-index: 102; 
}

@media (max-width: 600px) { 
    .sws-nav { display: none; }
    .sws-story-container {
        padding: 15px;
        gap: 10px;
    }
    .sws-interactions {
        bottom: 60px;
        left: 10px;
        flex-wrap: wrap;
    }
}
