/* ===========================
   Tracker Page Styles
   =========================== */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

.app-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #0f3460;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-left .logo {
    height: 40px;
    width: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 0.5rem 1.25rem;
    color: #e94560;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(233, 69, 96, 0.1);
    color: #ff6b6b;
}

.nav-link.active {
    background-color: rgba(233, 69, 96, 0.2);
    color: #ff6b6b;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background-color: #e94560;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: transparent;
    color: #e94560;
    border: 1px solid #e94560;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: #e94560;
    color: #ffffff;
}

/* Tracker Main Content */
.tracker-main {
    flex: 1;
    padding: 3rem 1.5rem;
}

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

.tracker-title {
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 700;
}

.tracker-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 3rem;
}

/* Mood Entry Card */
.mood-entry-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 3rem;
}

.mood-entry-card h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

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

.mood-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.mood-option:hover {
    border-color: #e94560;
    background-color: #ffffff;
    transform: translateY(-2px);
}

.mood-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.mood-option input[type="radio"]:checked + .mood-emoji {
    transform: scale(1.2);
}

.mood-option input[type="radio"]:checked ~ .mood-label {
    color: #e94560;
    font-weight: 600;
}

.mood-option:has(input[type="radio"]:checked) {
    border-color: #e94560;
    background-color: rgba(233, 69, 96, 0.05);
}

.mood-emoji {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease;
}

.mood-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a1a2e;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: #e94560;
    color: #ffffff;
    width: 100%;
}

.btn-primary:hover {
    background-color: #d63652;
}

/* Mood History */
.mood-history {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.mood-history h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Mood Chart */
.mood-chart {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    color: #6c757d;
    text-align: center;
    font-style: italic;
}

/* Mood Entries List */
.mood-entries {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mood-entry {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 5px solid;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.mood-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.mood-entry.mood-great {
    border-left-color: #10b981;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), white);
}

.mood-entry.mood-good {
    border-left-color: #3b82f6;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), white);
}

.mood-entry.mood-okay {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), white);
}

.mood-entry.mood-low {
    border-left-color: #f97316;
    background: linear-gradient(to right, rgba(249, 115, 22, 0.05), white);
}

.mood-entry.mood-struggling {
    border-left-color: #ef4444;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.05), white);
}

.mood-entry-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.mood-entry-emoji {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

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

.mood-entry-mood {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    text-transform: capitalize;
    margin-bottom: 0.25rem;
}

.mood-entry-date {
    font-size: 0.875rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mood-entry-date::before {
    content: '📅';
    font-size: 0.9rem;
}

.mood-entry-note {
    color: #495057;
    line-height: 1.6;
    margin: 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    font-style: italic;
    border-left: 3px solid rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(233, 69, 96, 0.2);
    }
}

@media (max-width: 768px) {
    .tracker-title {
        font-size: 2rem;
    }
    
    .mood-options {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.75rem;
    }
    
    .mood-option {
        padding: 1rem 0.5rem;
    }
    
    .mood-emoji {
        font-size: 2rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .tracker-main {
        padding: 2rem 1rem;
    }
    
    .mood-entry-card,
    .mood-history {
        padding: 1.5rem;
    }
}

/* ===========================
   Mood Trend Thermometer
   =========================== */

.mood-trend-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 2rem;
}

.mood-trend-section h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    text-align: center;
}

.trend-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.thermometer-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.thermometer {
    width: 60px;
    height: 250px;
    background: linear-gradient(to top, 
        #ef4444 0%, 
        #f97316 25%, 
        #eab308 50%, 
        #84cc16 75%, 
        #22c55e 100%
    );
    border-radius: 30px;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
    overflow: hidden;
}

.thermometer::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1;
}

.thermometer-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.85);
    transition: height 1s ease-out;
    height: 100%; /* Will be set by JS - this covers the "unfilled" portion */
}

.thermometer-markers {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 250px;
    padding: 10px 0;
    margin-left: 0.5rem;
}

.marker {
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
}

.trend-info {
    text-align: center;
    max-width: 250px;
}

.trend-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.trend-arrow {
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.trend-arrow.up {
    color: #22c55e;
    transform: rotate(-45deg);
}

.trend-arrow.down {
    color: #ef4444;
    transform: rotate(45deg);
}

.trend-arrow.stable {
    color: #eab308;
    transform: rotate(0deg);
}

.trend-arrow.neutral {
    color: #6c757d;
}

.trend-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
}

.support-message {
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.trend-detail {
    font-size: 0.85rem;
    color: #6c757d;
}

@media (max-width: 768px) {
    .trend-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .thermometer {
        height: 200px;
        width: 50px;
    }
    
    .thermometer-markers {
        height: 200px;
    }
    
    .thermometer::before {
        width: 70px;
        height: 70px;
    }
}
