:root {
    --primary-color: #2196F3;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --purple-color: #9C27B0;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --gray: #9e9e9e;
    --dark-gray: #424242;
    --black: #212121;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
  
    
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--light-gray) 0%, #e3f2fd 100%);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 80px;
}

.app-header {
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    color: var(--white);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.logo-container {
    flex-shrink: 0;
}

.app-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
    border: 3px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    filter: brightness(1.05) contrast(1.1);
    position: relative;
}

.app-logo::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 3px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
    border-color: rgba(255,255,255,1);
}

.app-logo:hover::after {
    opacity: 1;
}

.header-text {
    text-align: left;
}

.app-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

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

.app-main {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.app-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.app-section.active {
    display: block;
}

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

.welcome-card,
.daily-prompt-card,
.quick-entry-card,
.mood-tracker-card,
.mood-insights-card,
.goals-card,
.goal-reflection-card,
.gratitude-card,
.gratitude-insights-card,
.history-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(33, 150, 243, 0.1);
}

.welcome-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-logo-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25), 0 4px 15px rgba(33, 150, 243, 0.2), inset 0 2px 0 rgba(255,255,255,0.3);
    border: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    filter: brightness(1.08) contrast(1.15);
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    position: relative;
}

.welcome-logo-img::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent 30%, rgba(33, 150, 243, 0.15) 50%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-logo-img:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 35px rgba(0,0,0,0.35), 0 6px 20px rgba(33, 150, 243, 0.3), inset 0 2px 0 rgba(255,255,255,0.5);
    border-width: 5px;
}

.welcome-logo-img:hover::after {
    opacity: 1;
}

.welcome-card h2,
.daily-prompt-card h3,
.quick-entry-card h3,
.mood-tracker-card h2,
.mood-insights-card h3,
.goals-card h2,
.goal-reflection-card h3,
.gratitude-card h2,
.gratitude-insights-card h3,
.history-card h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.prompt-text {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
}

.btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

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

.btn-secondary:hover {
    box-shadow: 0 4px 15px rgba(158, 158, 158, 0.3);
}

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

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

textarea,
input[type="text"],
input[type="date"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

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

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.mood-options {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mood-btn {
    background: var(--white);
    border: 3px solid #e0e0e0;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mood-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.mood-btn.selected {
    border-color: var(--primary-color);
    background: rgba(33, 150, 243, 0.1);
    transform: scale(1.1);
}

.gratitude-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.goals-container,
.gratitude-list,
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goal-item,
.gratitude-item,
.history-item {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.goal-item h4,
.history-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.goal-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.category-badge {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

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

.history-filters select,
.history-filters input {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.insights-content {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success-color);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

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

.faq-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.faq-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 0;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 0 1rem 0;
    color: var(--dark-gray);
    line-height: 1.6;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer[hidden] {
    display: none;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid #e0e0e0;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
   
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.nav-logo-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.85;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    border: 2px solid rgba(255,255,255,0.7);
    filter: brightness(1.05) contrast(1.1);
}

.nav-logo-img:hover {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,1);
}

.nav-items {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 600px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.8rem;
    font-weight: 500;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary-color);
    background: rgba(33, 150, 243, 0.1);
}

footer {
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    color: var(--white);
    padding: 2.5rem 1rem;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-inspiration {
    margin-bottom: 2rem;
}

.inspiration-text {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    opacity: 0.95;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.footer-branding {
    text-align: center;
    margin-bottom: 1.5rem;
}

.footer-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.9;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3), 0 2px 8px rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.6);
    filter: brightness(1.1) contrast(1.1);
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 5px 18px rgba(0,0,0,0.4), 0 3px 12px rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.9);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.footer-credits {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
}

.footer-credits a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.footer-credits a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .app-main {
        padding: 0.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .app-logo {
        width: 45px;
        height: 45px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .welcome-card,
    .daily-prompt-card,
    .quick-entry-card,
    .mood-tracker-card,
    .mood-insights-card,
    .goals-card,
    .goal-reflection-card,
    .gratitude-card,
    .gratitude-insights-card,
    .history-card {
        padding: 1rem;
    }
    
    .welcome-logo-img {
        width: 70px;
        height: 70px;
    }
    
    .mood-options {
        justify-content: center;
    }
    
    .mood-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .history-filters {
        flex-direction: column;
    }
    
    .goal-actions {
        flex-direction: column;
    }
    
    footer {
        padding: 2rem 1rem;
        margin-top: 2rem;
    }
    
    .inspiration-text {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .footer-info {
        gap: 0.3rem;
    }
    
    .footer-logo {
        width: 40px;
        height: 40px;
    }
    
    .nav-logo-img {
        width: 30px;
        height: 30px;
    }
    
    .nav-items {
        max-width: 100%;
    }
}

@media (min-width: 769px) {
    .app-main {
        padding: 2rem;
    }
    
    .bottom-nav {
        max-width: 800px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

.notification.error {
    background: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}
