* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Top Navigation */
.top-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo h1 {
    color: #5a67d8;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover,
.nav-link.active {
    color: #5a67d8;
    background: rgba(90, 103, 216, 0.1);
}

/* User Section */
.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.sign-in-btn,
.sign-up-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign-in-btn {
    background: transparent;
    color: #5a67d8;
    border: 2px solid #5a67d8;
}

.sign-in-btn:hover {
    background: #5a67d8;
    color: white;
}

.sign-up-btn {
    background: #5a67d8;
    color: white;
}

.sign-up-btn:hover {
    background: #4c51bf;
    transform: translateY(-1px);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 25px;
    background: rgba(90, 103, 216, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(90, 103, 216, 0.2);
}

.user-info img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 10px 0;
    min-width: 180px;
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.user-dropdown a:hover {
    background: #f8f9fa;
}

.user-dropdown hr {
    margin: 5px 0;
    border: none;
    border-top: 1px solid #eee;
}

.logout-link {
    color: #dc3545 !important;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #5a67d8;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 70px);
    padding: 40px 0;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Mood Card */
.mood-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.mood-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #5a67d8;
    font-size: 1.8rem;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.mood-btn {
    background: #f8f9fa;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 2.5rem;
}

.mood-btn span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
}

.mood-btn:hover {
    transform: translateY(-5px);
    border-color: #5a67d8;
    box-shadow: 0 10px 25px rgba(90, 103, 216, 0.2);
}

.mood-btn.selected {
    background: #5a67d8;
    border-color: #5a67d8;
    color: white;
    transform: translateY(-5px) scale(1.02);
}

.mood-btn.selected span {
    color: white;
}

.mood-result {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 20px;
}

/* Mood Details */
.mood-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.detail-group {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
}

.detail-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.counter {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.counter button {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #5a67d8;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.counter button:hover {
    background: #4c51bf;
    transform: scale(1.1);
}

.counter span {
    font-size: 1.8rem;
    font-weight: bold;
    color: #5a67d8;
    min-width: 60px;
    text-align: center;
}

.rating-stars {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-bottom: 10px;
}

.star {
    cursor: pointer;
    font-size: 1.8rem;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 5px;
}

.star:hover,
.star.selected {
    background: #ffc107;
    transform: scale(1.2);
}

#food-rating {
    text-align: center;
    font-weight: 600;
    color: #5a67d8;
}

#mood-note {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#mood-note:focus {
    outline: none;
    border-color: #5a67d8;
}

/* Share Options */
.share-options {
    margin-bottom: 30px;
}

.privacy-setting {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.privacy-label:hover {
    background: #e9ecef;
}

.privacy-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.privacy-label input[type="radio"]:checked + .radio-custom {
    border-color: #5a67d8;
    background: #5a67d8;
}

.privacy-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Share Button */
.share-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 1.5rem;
}

/* Community Preview */
.community-preview {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    color: #5a67d8;
    font-size: 1.6rem;
}

.view-all {
    color: #5a67d8;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: #4c51bf;
}

.feed-preview {
    display: grid;
    gap: 15px;
}

.feed-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #5a67d8;
}

.feed-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.feed-user img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.feed-mood {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.feed-time {
    font-size: 0.9rem;
    color: #666;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Feed Filters */
.feed-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: white;
    color: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Community Feed */
.community-feed {
    display: grid;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.vibe-post {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.vibe-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.post-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-info h4 {
    margin: 0;
    color: #333;
}

.post-time {
    font-size: 0.9rem;
    color: #666;
}

.post-mood {
    font-size: 3rem;
    text-align: center;
    margin: 20px 0;
}

.post-note {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #555;
}

.post-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
}

.post-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.action-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: #f8f9fa;
}

/* Friends Section */
.add-friend-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.friend-code-card,
.add-friend-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.friend-code-card h3,
.add-friend-card h3 {
    margin-bottom: 20px;
    color: #5a67d8;
}

.friend-code-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

#my-friend-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #5a67d8;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    flex: 1;
    text-align: center;
}

.copy-btn {
    background: #5a67d8;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #4c51bf;
}

.add-friend-form {
    display: flex;
    gap: 15px;
}

#friend-code-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    text-transform: uppercase;
}

#friend-code-input:focus {
    outline: none;
    border-color: #5a67d8;
}

.add-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: #218838;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.friend-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.friend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.friend-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
}

.friend-card h4 {
    margin-bottom: 10px;
    color: #333;
}

.friend-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.friend-mood {
    font-size: 1.5rem;
}

.care-btn {
    background: #e91e63;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.care-btn:hover {
    background: #c2185b;
    transform: scale(1.05);
}

/* Analytics Dashboard */
.analytics-dashboard {
    color: white;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255,255,255,0.95);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-info {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #5a67d8;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.chart-card {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.chart-card h3 {
    margin-bottom: 20px;
    color: #5a67d8;
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    background: rgba(255,255,255,0.95);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.profile-avatar {
    position: relative;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #5a67d8;
}

.change-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #5a67d8;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.profile-info h1 {
    color: #333;
    margin-bottom: 5px;
}

.profile-info p {
    color: #666;
    margin-bottom: 5px;
}

.join-date {
    font-size: 0.9rem;
    color: #999;
}

.profile-content {
    background: rgba(255,255,255,0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.profile-section {
    margin-bottom: 40px;
}

.profile-section h3 {
    color: #5a67d8;
    margin-bottom: 20px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.achievement {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.achievement-name {
    font-weight: 600;
    color: #333;
}

/* Settings */
.settings-sections {
    max-width: 600px;
    margin: 0 auto;
}

.settings-section {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.settings-section h3 {
    color: #5a67d8;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-weight: 500;
    color: #333;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #5a67d8;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.danger-zone {
    border: 2px solid #dc3545;
}

.danger-zone h3 {
    color: #dc3545;
}

.danger-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px 10px 10px 0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.danger-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    background: rgba(255,255,255,0.95);
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.about-section h3 {
    color: #5a67d8;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.about-section p {
    line-height: 1.8;
    color: #555;
    font-size: 1.1rem;
}

/* Auth Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close-modal:hover {
    opacity: 1;
}

.auth-container {
    padding: 40px;
}

.auth-container p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.apple-btn {
    background: #000;
    color: white;
    border-color: #000;
}

.guest-btn {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
}

.auth-footer small {
    color: #999;
    line-height: 1.4;
}

/* Enhanced Profile Styles */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-picture-section {
    position: relative;
    display: inline-block;
}

.profile-picture {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #5a67d8;
}

.change-photo-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #5a67d8;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1rem;
}

.name-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: #5a67d8;
    color: white;
}

.edit-input, .edit-textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #5a67d8;
    border-radius: 5px;
    font-size: 1rem;
    margin-top: 5px;
}

.bio-section, .social-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bio-text {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.char-counter {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
    margin-top: 5px;
    display: none;
}

/* Social Links */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.social-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

.social-link a {
    flex: 1;
    text-decoration: none;
    color: #5a67d8;
    font-weight: 500;
}

.remove-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.2s;
}

.remove-link:hover {
    background: #fee;
}

.add-social {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.add-social select, .add-social input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.add-social button {
    background: #5a67d8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* Settings */
.profile-settings select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: white;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.save-profile-btn {
    background: #5a67d8;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .mood-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mood-details {
        grid-template-columns: 1fr;
    }
    
    .add-friend-section {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .page-container {
        padding: 0 15px;
    }
    
    .mood-card,
    .community-preview {
        padding: 25px;
    }
    
    .add-social {
        flex-direction: column;
    }
    
    .add-social select, .add-social input {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .sign-in-btn,
    .sign-up-btn {
        width: 100%;
    }
    
    .user-info span {
        display: none;
    }
    
    .mood-btn {
        padding: 20px 10px;
        font-size: 2rem;
    }
    
    .mood-btn span {
        font-size: 0.8rem;
    }
}

/* Add these focused styles for the three main pages */

/* HOME PAGE STYLES */
.input-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.mood-input-section {
    margin-bottom: 30px;
}

.mood-input-section h2 {
    text-align: center;
    color: #374151;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.mood-btn {
    background: white;
    border: 3px solid #e5e7eb;
    border-radius: 15px;
    padding: 20px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mood-btn:hover {
    transform: translateY(-2px);
    border-color: #5a67d8;
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.15);
}

.mood-btn.selected {
    background: #5a67d8;
    border-color: #5a67d8;
    color: white;
    transform: translateY(-2px) scale(1.05);
}

.mood-emoji {
    font-size: 2rem;
}

.mood-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.mood-result {
    text-align: center;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 10px;
    color: #0369a1;
    font-weight: 500;
    display: none;
}

/* Health Inputs */
.health-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.input-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
}

.input-card:hover {
    border-color: #5a67d8;
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.1);
}

.input-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.input-icon {
    font-size: 1.5rem;
}

.input-header h3 {
    color: #374151;
    font-size: 1.1rem;
}

.counter-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.counter-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #5a67d8;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.counter-btn:hover {
    background: #4c51bf;
    transform: scale(1.1);
}

.counter-display {
    text-align: center;
    transition: transform 0.2s;
}

.counter-display span {
    font-size: 2rem;
    font-weight: bold;
    color: #5a67d8;
    display: block;
}

.counter-display small {
    color: #6b7280;
    font-size: 0.9rem;
}

.quick-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.quick-buttons button {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-buttons button:hover {
    background: #f3f4f6;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.star {
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.3;
}

.star:hover,
.star.selected {
    opacity: 1;
    transform: scale(1.1);
}

.rating-display {
    text-align: center;
    color: #5a67d8;
    font-weight: 500;
}

/* Mood Note */
.mood-note-section {
    margin-bottom: 25px;
}

.mood-note-section h3 {
    color: #374151;
    margin-bottom: 10px;
}

.mood-note-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
}

.mood-note-section textarea:focus {
    outline: none;
    border-color: #5a67d8;
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 5px;
    display: none;
}

/* Privacy Section */
.privacy-section {
    margin-bottom: 25px;
}

.privacy-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.privacy-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5a67d8;
}

.privacy-control small {
    color: #6b7280;
    margin-left: 28px;
}

/* Save Button */
.save-data-btn {
    width: 100%;
    background: linear-gradient(135deg, #5a67d8, #4c51bf);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.save-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 103, 216, 0.3);
}

/* COMMUNITY FEED STYLES */
.feed-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.feed-header {
    text-align: center;
    margin-bottom: 25px;
}

.feed-header h2 {
    color: #374151;
    margin-bottom: 5px;
}

.feed-header p {
    color: #6b7280;
}

.mood-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    border-color: #5a67d8;
    background: #5a67d8;
    color: white;
}

.feed-post {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.feed-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    position: relative;
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.life-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    font-size: 1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #374151;
}

.post-time {
    font-size: 0.8rem;
    color: #6b7280;
}

.mood-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.mood-emoji-large {
    font-size: 2rem;
}

.mood-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.post-content {
    margin-bottom: 15px;
    color: #374151;
    line-height: 1.5;
}

.post-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6b7280;
}

.post-actions {
    display: flex;
    gap: 10px;
}

.support-btn,
.care-btn {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.support-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.care-btn:hover {
    background: #fce7f3;
    border-color: #ec4899;
}

/* FRIENDS PAGE STYLES */
.friends-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.add-friend-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid #f1f5f9;
}

.add-friend-section h2 {
    color: #374151;
    margin-bottom: 20px;
    text-align: center;
}

.friend-code-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.friend-code-input input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 2px;
}

.friend-code-input input:focus {
    outline: none;
    border-color: #5a67d8;
}

.add-btn {
    padding: 12px 24px;
    background: #5a67d8;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.my-code {
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.my-code strong {
    font-family: monospace;
    font-size: 1.1rem;
    color: #5a67d8;
    letter-spacing: 2px;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #e2e8f0;
}

.friends-list-section h3 {
    color: #374151;
    margin-bottom: 15px;
}

.friends-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.friend-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.friend-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.friend-avatar {
    position: relative;
}

.friend-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.online-indicator.online {
    background: #22c55e;
}

.online-indicator.offline {
    background: #94a3b8;
}

.friend-info {
    flex: 1;
}

.friend-info h4 {
    color: #374151;
    margin-bottom: 5px;
}

.friend-mood {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}

.friend-mood span:first-child {
    font-size: 1.2rem;
}

.friend-mood span:last-child {
    color: #5a67d8;
    font-weight: 500;
    text-transform: capitalize;
}

.friend-info small {
    color: #6b7280;
}

.friend-action {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.friend-action:hover {
    background: #fce7f3;
    transform: scale(1.1);
}

.no-friends {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.no-friends-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mood-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .health-inputs {
        grid-template-columns: 1fr;
    }
    
    .friend-code-input {
        flex-direction: column;
    }
    
    .my-code {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .mood-display {
        align-self: flex-end;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page.active {
    animation: fadeIn 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.mood-btn.selected {
    animation: pulse 0.6s ease;
}

/* Add these styles for the analytics dashboard */

/* Life Status Badge */
.life-status-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 3px solid #5a67d8;
}

.life-status-info {
    margin: 10px 0;
}

.status-level {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.status-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.status-progress {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.status-progress.excellent { background: linear-gradient(90deg, #22c55e, #16a34a); }
.status-progress.good { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.status-progress.average { background: linear-gradient(90deg, #f59e0b, #d97706); }
.status-progress.poor { background: linear-gradient(90deg, #ef4444, #dc2626); }
.status-progress.critical { background: linear-gradient(90deg, #7c2d12, #991b1b); }

/* Analytics Dashboard */
.analytics-dashboard {
    background: #f8fafc;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
}

.analytics-dashboard h3 {
    color: #5a67d8;
    margin-bottom: 20px;
    text-align: center;
}

/* Wellness Overview */
.wellness-overview {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.wellness-score {
    display: flex;
    align-items: center;
    gap: 30px;
}

.score-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.score-circle span {
    font-size: 2rem;
    font-weight: bold;
}

.score-circle small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.score-breakdown {
    flex: 1;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.score-label {
    min-width: 100px;
    font-weight: 500;
}

.mini-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.mini-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.3s ease;
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chart-section h4 {
    color: #374151;
    margin-bottom: 15px;
}

#mood-trend-chart {
    width: 100%;
    height: 200px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.mood-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.mood-stat {
    text-align: center;
}

.mood-emoji {
    font-size: 1.5rem;
    display: block;
}

.mood-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #5a67d8;
    display: block;
}

.mood-label {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Health Metrics */
.health-metrics {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #5a67d8;
}

.metric-icon {
    font-size: 2rem;
}

.metric-data {
    flex: 1;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #5a67d8;
    display: block;
}

.metric-unit {
    font-size: 0.9rem;
    color: #6b7280;
}

.metric-label {
    font-size: 0.9rem;
    color: #374151;
    display: block;
    margin-top: 5px;
}

.metric-trend {
    font-size: 0.8rem;
    color: #059669;
    margin-top: 5px;
}

/* Growth Tracker */
.growth-tracker {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.growth-milestones {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.milestone {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.milestone-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.milestone-info {
    flex: 1;
}

.milestone-title {
    font-weight: bold;
    color: #374151;
    display: block;
}

.milestone-desc {
    font-size: 0.9rem;
    color: #6b7280;
    display: block;
    margin: 5px 0;
}

.milestone-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.3s ease;
}

/* Life Timeline */
.life-timeline {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #5a67d8, #e5e7eb);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #5a67d8;
}

.timeline-dot.start { background: #22c55e; }
.timeline-dot.achievement { background: #f59e0b; }
.timeline-dot.social { background: #3b82f6; }
.timeline-dot.future { background: #e5e7eb; }

.timeline-content {
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 8px;
    flex: 1;
}

.timeline-date {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: bold;
}

.timeline-event {
    display: block;
    color: #374151;
    margin-top: 2px;
}

.timeline-item.future {
    opacity: 0.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wellness-score {
        flex-direction: column;
        gap: 20px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .milestone {
        flex-direction: column;
        text-align: center;
    }
    
    .milestone-progress {
        width: 100%;
    }
}