/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #E0F7FA 0%, #F3E5F5 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #B2DFDB 0%, #E1BEE7 100%);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    color: #4A148C;
    margin-bottom: 5px;
}

.tagline {
    color: #6A1B9A;
    font-size: 1.1rem;
}

/* Navigation */
#mainNav {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    background: #E1F5FE;
    color: #0277BD;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-btn:hover {
    background: #B3E5FC;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn.active {
    background: linear-gradient(135deg, #4A148C 0%, #7B1FA2 100%);
    color: white;
}

/* Main Content */
main {
    padding: 40px 20px;
    min-height: calc(100vh - 300px);
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section h2 {
    font-size: 2rem;
    color: #4A148C;
    margin-bottom: 10px;
    text-align: center;
}

.section-desc {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Welcome Card */
.welcome-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.welcome-card h2 {
    margin-bottom: 15px;
}

.welcome-card > p {
    text-align: center;
    color: #555;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: linear-gradient(135deg, #F3E5F5 0%, #E1F5FE 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-card .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #4A148C;
    margin-bottom: 10px;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Disclaimer */
.disclaimer {
    background: #FFF9C4;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #FBC02D;
    margin-top: 30px;
}

.disclaimer p {
    color: #F57F17;
    font-size: 0.95rem;
}

/* Mood Tracker */
.mood-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.mood-btn {
    background: white;
    border: 3px solid #E0E0E0;
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 100px;
}

.mood-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.mood-emoji {
    font-size: 3rem;
}

.mood-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.mood-history {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mood-history h3 {
    color: #4A148C;
    margin-bottom: 20px;
    text-align: center;
}

.mood-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    height: 150px;
    margin-bottom: 20px;
    padding: 10px;
    border-bottom: 2px solid #E0E0E0;
}

.mood-bar {
    background: linear-gradient(to top, #7B1FA2, #BA68C8);
    border-radius: 8px 8px 0 0;
    width: 40px;
    min-height: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.mood-bar-emoji {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
}

.mood-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.mood-entry {
    background: #F5F5F5;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mood-entry-mood {
    font-size: 1.5rem;
}

.mood-entry-date {
    color: #666;
    font-size: 0.9rem;
}

/* Breathing Exercise */
.breathing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.breathing-circle {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B2DFDB 0%, #E1BEE7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #4A148C;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.breathing-circle.breathe-in {
    animation: breatheIn 4s ease-in-out;
}

.breathing-circle.hold {
    animation: hold 4s ease-in-out;
}

.breathing-circle.breathe-out {
    animation: breatheOut 6s ease-in-out;
}

@keyframes breatheIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.3);
    }
}

@keyframes hold {
    0%, 100% {
        transform: scale(1.3);
    }
}

@keyframes breatheOut {
    0% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.breathing-controls {
    display: flex;
    gap: 15px;
}

.breathing-progress {
    text-align: center;
    font-size: 1.2rem;
    color: #4A148C;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4A148C 0%, #7B1FA2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 20, 140, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 20, 140, 0.4);
}

.btn-secondary {
    background: #E0E0E0;
    color: #333;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #BDBDBD;
    transform: translateY(-2px);
}

.hide {
    display: none !important;
}

/* Info Box */
.info-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.info-box h4 {
    color: #4A148C;
    margin-bottom: 15px;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
}

.info-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4A148C;
    font-weight: bold;
}

/* Mindfulness */
.mindfulness-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mindfulness-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.step-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-top: 50px;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4A148C 0%, #7B1FA2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-card h3 {
    color: #4A148C;
    margin-bottom: 10px;
}

.step-card p {
    color: #666;
}

.ambient-player {
    background: linear-gradient(135deg, #E1F5FE 0%, #F3E5F5 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ambient-player h3 {
    color: #4A148C;
    margin-bottom: 10px;
}

.ambient-note {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.ambient-status {
    color: #7B1FA2;
    font-weight: 600;
}

/* Assessment */
.quiz-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.question {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.question:last-child {
    border-bottom: none;
}

.question h4 {
    color: #4A148C;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.answer-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.answer-option label {
    cursor: pointer;
    flex: 1;
}

#submitAssessment {
    margin-top: 20px;
    width: 100%;
}

.result-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-container h3 {
    color: #4A148C;
    margin-bottom: 20px;
}

.result-box {
    background: linear-gradient(135deg, #E8F5E9 0%, #E1F5FE 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.result-box h4 {
    color: #2E7D32;
    margin-bottom: 15px;
}

.result-box p {
    color: #555;
    line-height: 1.8;
}

/* Articles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.article-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-card h3 {
    color: #4A148C;
    margin-bottom: 15px;
}

.article-card p {
    color: #666;
    line-height: 1.8;
}

/* Journal */
.journal-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.journal-input {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#journalText {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

#journalText:focus {
    outline: none;
    border-color: #7B1FA2;
}

.journal-entries {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.journal-entries h3 {
    color: #4A148C;
    margin-bottom: 20px;
    text-align: center;
}

#journalList {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.journal-item {
    background: #F5F5F5;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #7B1FA2;
}

.journal-date {
    color: #7B1FA2;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.journal-content {
    color: #333;
    line-height: 1.6;
}

.journal-delete {
    background: #EF5350;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9rem;
}

.journal-delete:hover {
    background: #E53935;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #B2DFDB 0%, #E1BEE7 100%);
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

footer p {
    color: #4A148C;
    margin-bottom: 5px;
}

.footer-note {
    font-size: 0.9rem;
    color: #6A1B9A;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    #mainNav {
        padding: 10px;
    }

    .nav-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .breathing-circle {
        width: 200px;
        height: 200px;
        font-size: 1.2rem;
    }

    .mindfulness-steps {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .welcome-card {
        padding: 20px;
    }

    .mood-selector {
        gap: 10px;
    }

    .mood-btn {
        min-width: 80px;
        padding: 15px;
    }

    .mood-emoji {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    main {
        padding: 20px 10px;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .quiz-container,
    .result-container {
        padding: 20px;
    }

    .breathing-circle {
        width: 150px;
        height: 150px;
        font-size: 1rem;
    }
}