/* Base Styles */
:root {
    --primary-color: #FF6B35; /* Vibrant Orange */
    --primary-dark: #F7C59F; /* Soft Orange */
    --accent-color: #EF476F; /* Bright Pink */
    --text-color: #1A1A1A; /* Dark Gray */
    --bg-color: #F5F5F5; /* Light Gray */
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --gradient-1: linear-gradient(135deg, #FF6B35, #EF476F);
    --gradient-2: linear-gradient(135deg, #F7C59F, #FF6B35);
}
/* Journal Styles */
.journal-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
}

/* Journal Form */
#journal-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.dark-mode #journal-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

#journal-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

/* Tags */
.entry-tags {
    margin-top: 1rem;
}

.tag-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-mode .tag {
    background: rgba(255, 255, 255, 0.05);
}

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

.tag input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Journal History */
.journal-history {
    max-height: 600px;
    overflow-y: auto;
}

.journal-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.journal-filters input,
.journal-filters select {
    flex: 1;
}

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

.journal-entry {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.journal-entry:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.entry-title {
    font-weight: bold;
    color: var(--primary-color);
}

.entry-date {
    font-size: 0.9rem;
    opacity: 0.8;
}

.entry-mood {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.entry-content {
    margin: 1rem 0;
    line-height: 1.6;
}

.entry-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.entry-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    background: var(--primary-color);
    color: white;
    font-size: 0.9rem;
}
/* Dark Mode Variables */
.dark-mode {
    --primary-color: #FF6B35;
    --primary-dark: #F7C59F;
    --accent-color: #EF476F;
    --text-color: #FFFFFF;
    --bg-color: #121212; /* Dark background */
    --card-bg: rgba(30, 30, 30, 0.95); /* Darker card background */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

body::before {
    display: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

/* Navigation */
.navbar {
    background: var(--text-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    background-color: var(--primary-color);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dark Mode Navigation Styles */
.dark-mode .navbar {
    background: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dark-mode .logo {
    color: white;
}

.dark-mode .logo i {
    color: var(--primary-color);
}
.dark-mode .nav-links a {
    color: #ffffff;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.dark-mode .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .nav-links a.active {
    color: #ffffff;
}

.dark-mode .theme-toggle {
    color: #F7C59F;
}

.dark-mode .theme-toggle:hover {
    background-color: rgba(255, 107, 53, 0.2);
}

/* Cards and Sections */
.section {
    display: none;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section.active {
    display: block;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 0 rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .card {
    background: var(--card-bg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.dark-mode .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    display: inline-block;
    margin-top: 1 rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50%;
    height: 3px;
    background: var(--gradient-1);
    border-radius: 3px;
}

h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.dark-mode input,
.dark-mode select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.dark-mode input:focus,
.dark-mode select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--text-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Stats and Progress */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.dark-mode .stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-item i {
    font-size: 2rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.stat-item:hover i {
    transform: rotate(360deg);
}

.progress-bar {
    height: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.dark-mode .progress-bar {
    background: rgba(255, 255, 255, 0.05);
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* History Lists */
.history-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.history-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.dark-mode .history-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dark-mode .history-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* BMI Calculator */
.bmi-calculator {
    display: grid;
    gap: 1rem;
}

.bmi-result {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.bmi-categories {
    display: grid;
    gap: 0.5rem;
}

.bmi-category {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.dark-mode .bmi-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bmi-category:hover {
    transform: translateX(5px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    animation: modalSlideIn 0.3s ease;
}

.dark-mode .modal-content {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes modalSlideIn {
    from { transform: translate(-50%, -60%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

/* Responsive Design */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .dashboard-grid,
    .activity-grid,
    .nutrition-grid,
    .profile-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .dashboard-grid,
    .activity-grid,
    .nutrition-grid,
    .profile-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.profile-grid {
    display: flex;
    gap: 1.5rem;
}
/* Mobile Navigation */
@media (max-width: 767px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--card-bg);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Motivational Quote Styles */
.quote-card {
    margin-bottom: 2rem;
    background: var(--gradient-1);
    color: white;
}

.quote-content {
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.quote-content i {
    opacity: 0.5;
    font-size: 1.5rem;
}

.quote-content i.fa-quote-left {
    position: absolute;
    left: 1rem;
    top: 1rem;
}

.quote-content i.fa-quote-right {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

.quote-content p {
    font-size: 1.2rem;
    font-style: italic;
    margin: 0;
    padding: 0 2rem;
}

/* Level and Badges Styles */
.level-display {
    margin-bottom: 2rem;
}

.level-progress {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.level-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.level-info {
    flex: 1;
}

.level-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
}

.level-info .progress-bar {
    margin-bottom: 0.5rem;
}

#xp-display {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.badges-container {
    margin-top: 2rem;
}

.badges-container h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.badge.earned {
    opacity: 1;
    background: var(--gradient-1);
    color: white;
}

.badge i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.badge span {
    font-size: 0.9rem;
    text-align: center;
}

.badge:hover {
    transform: translateY(-5px);
}

/* Dark Mode Adjustments */
.dark-mode .badge {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .badge.earned {
    background: var(--gradient-1);
}

.water-tracker {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
}

.footer {
    text-align: center;
    padding: 1rem;
   
    border-top: 1px solid var(--border-color);
}

.footer a {
    color: blue;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent-color);
}

.activity-grid, .nutrition-grid {
    margin-bottom: 0;
}

.profile-grid, .journal-grid {
    grid-template-columns: repeat(2, 2fr);
} 