:root {
    --primary-color: #4A90E2;
    --secondary-color: #50E3C2;
    --background-color: #000000;
    --text-color: #ffffff;
    --nav-height: 80px;
    --card-bg: rgba(255, 255, 255, 0.07);
    --card-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    padding-top: var(--nav-height);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(74, 144, 226, 0.3));
    transition: transform 0.3s ease;
}

.nav-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.nav-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 5%;
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mood Entry Section */
.mood-entry-section {
    margin-bottom: 4rem;
}

.mood-entry-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.mood-entry-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.mood-emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.mood-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
}

.mood-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.mood-btn.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
}

.mood-btn .emoji {
    font-size: 2.5rem;
}

.mood-btn .label {
    font-size: 0.9rem;
    font-weight: 500;
}

.notes-section {
    margin-bottom: 1.5rem;
}

#mood-notes {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem;
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
}

#mood-notes:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

#mood-notes::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.save-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.save-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}

.save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.success-message {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(80, 227, 194, 0.2);
    border: 1px solid var(--secondary-color);
    border-radius: 10px;
    color: var(--secondary-color);
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease;
}

.success-message.show {
    display: block;
}

/* Mood Suggestion Popup */
.suggestion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.suggestion-overlay.show {
    display: flex;
}

.mood-suggestion-popup {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(80, 227, 194, 0.2));
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: popupSlideIn 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: rgba(74, 144, 226, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.suggestion-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    flex: 1;
}

.close-suggestion {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.close-suggestion:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.suggestion-content {
    padding: 1.5rem;
}

.suggestion-tip {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.suggestion-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.suggestion-footer span {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

/* Charts Section */
.charts-section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

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

.chart-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.chart-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.chart-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
    text-align: center;
}

.chart-card canvas {
    max-height: 300px;
}

/* Entries Section */
.entries-section {
    margin-bottom: 4rem;
}

.export-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.mood-entry-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.mood-entry-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.mood-entry-emoji {
    font-size: 3rem;
    width: 60px;
    text-align: center;
}

.mood-entry-details {
    flex: 1;
}

.mood-entry-label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

.mood-entry-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.mood-entry-notes {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.delete-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.delete-btn:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff6b6b;
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    body {
        padding-top: var(--nav-height);
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .nav-title {
        gap: 0.75rem;
    }

    .nav-title h1 {
        font-size: 1.1rem;
    }

    .nav-icon {
        width: 32px;
        height: 32px;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .mood-entry-section {
        margin-bottom: 3rem;
    }

    .mood-entry-card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .mood-emoji-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .mood-btn {
        padding: 1.25rem 0.75rem;
        min-height: 80px;
        border-radius: 12px;
        touch-action: manipulation;
    }

    .mood-btn:active {
        transform: scale(0.95);
    }

    .mood-btn .emoji {
        font-size: 2rem;
    }

    .mood-btn .label {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .notes-section {
        margin-bottom: 1.25rem;
    }

    #mood-notes {
        padding: 0.875rem;
        font-size: 0.95rem;
        min-height: 80px;
    }

    .save-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        touch-action: manipulation;
    }

    .success-message {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .mood-suggestion {
        margin-top: 1.25rem;
        border-radius: 12px;
    }

    .suggestion-header {
        padding: 1rem 1.25rem;
    }

    .suggestion-header h3 {
        font-size: 1.1rem;
    }

    .suggestion-content {
        padding: 1.25rem;
    }

    .suggestion-tip {
        font-size: 1rem;
        padding: 0.875rem;
        line-height: 1.5;
    }

    .suggestion-footer span {
        font-size: 0.875rem;
    }

    .charts-section {
        margin-bottom: 3rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .chart-card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .chart-card h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }

    .chart-card canvas {
        max-height: 250px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .chart-controls {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
        touch-action: manipulation;
    }

    .entries-section {
        margin-bottom: 3rem;
    }

    .export-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        min-height: 44px;
        width: 100%;
        justify-content: center;
        touch-action: manipulation;
    }

    .mood-entry-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .mood-entry-emoji {
        font-size: 2.5rem;
        width: auto;
    }

    .mood-entry-label {
        font-size: 1.1rem;
    }

    .mood-entry-date {
        font-size: 0.85rem;
    }

    .mood-entry-notes {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .delete-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
        width: 100%;
        justify-content: center;
        touch-action: manipulation;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --nav-height: 65px;
    }

    .navbar {
        padding: 0.625rem 0.75rem;
    }

    .nav-title h1 {
        font-size: 1rem;
    }

    .nav-icon {
        width: 28px;
        height: 28px;
    }

    .container {
        padding: 1.25rem 0.75rem;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1.25rem;
    }

    .mood-entry-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .mood-emoji-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.625rem;
    }

    .mood-btn {
        padding: 1rem 0.5rem;
        min-height: 75px;
    }

    .mood-btn .emoji {
        font-size: 1.75rem;
    }

    .mood-btn .label {
        font-size: 0.7rem;
    }

    #mood-notes {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .save-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .chart-card {
        padding: 1.25rem;
    }

    .chart-card h3 {
        font-size: 1rem;
    }

    .chart-card canvas {
        max-height: 200px;
    }

    .chart-controls {
        grid-template-columns: 1fr;
    }

    .filter-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .mood-entry-item {
        padding: 1rem;
    }

    .mood-entry-emoji {
        font-size: 2rem;
    }

    .mood-entry-label {
        font-size: 1rem;
    }

    .mood-entry-notes {
        font-size: 0.85rem;
    }

    .suggestion-header {
        padding: 0.875rem 1rem;
    }

    .suggestion-header h3 {
        font-size: 1rem;
    }

    .suggestion-content {
        padding: 1rem;
    }

    .suggestion-tip {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .mood-suggestion-popup {
        max-width: 95%;
        max-height: 85vh;
    }

    .suggestion-overlay {
        padding: 0.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .mood-btn:hover {
        transform: none;
    }

    .mood-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.15);
    }

    .save-btn:hover:not(:disabled) {
        transform: none;
    }

    .save-btn:active:not(:disabled) {
        transform: scale(0.98);
    }

    .filter-btn:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .filter-btn:active {
        transform: scale(0.98);
    }

    .export-btn:hover {
        transform: none;
    }

    .export-btn:active {
        transform: scale(0.98);
    }

    .delete-btn:hover {
        transform: none;
    }

    .delete-btn:active {
        transform: scale(0.98);
    }
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.app-footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0;
}

.app-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.app-footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.app-footer .footer-link {
    color: var(--secondary-color);
}

.app-footer .footer-link:hover {
    color: var(--primary-color);
}

.app-footer .bmc-logo {
    display: inline-block;
    margin-top: 1rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.app-footer .bmc-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.app-footer .bmc-logo img {
    height: 60px;
    width: 217px;
}

.app-footer .view-all-apps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto 0 auto;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: fit-content;
}

.app-footer .view-all-apps-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 242, 255, 0.3);
    text-decoration: none;
}

