* {
    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;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Weather Widget */
.weather-widget {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
}

#weather-info {
    font-size: 1.2rem;
}

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

.weather-temp {
    font-size: 2rem;
    font-weight: bold;
    color: #4A90E2;
}

.weather-desc {
    color: #666;
    text-transform: capitalize;
}

/* Mood Form Section */
.mood-form-section, .mood-history-section, .stats-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
}

.mood-form-section h2, .mood-history-section h2, .stats-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
    font-weight: 500;
}

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

.mood-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
}

.mood-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mood-btn.selected {
    background: #4A90E2;
    color: white;
    border-color: #4A90E2;
    transform: scale(1.05);
}

.mood-btn.selected:hover {
    transform: scale(1.05) translateY(-2px);
}

/* Note Section */
.note-section {
    margin-bottom: 1.5rem;
}

#mood-note {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
}

#mood-note:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: #4A90E2;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    background: #357ABD;
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Mood History */
.mood-history {
    max-height: 400px;
    overflow-y: auto;
}

.mood-entry {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    gap: 1rem;
}

.mood-entry:last-child {
    border-bottom: none;
}

.mood-entry-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mood-entry-content {
    flex-grow: 1;
}

.mood-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mood-entry-mood {
    font-weight: 500;
    text-transform: capitalize;
}

.mood-entry-time {
    font-size: 0.9rem;
    color: #666;
}

.mood-entry-note {
    color: #666;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.mood-entry-weather {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Section */
.mood-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
}

.stat-emoji {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stat-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4A90E2;
}

/* Loading States */
#weather-loading, #history-loading {
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .mood-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mood-stats {
        justify-content: center;
    }
}

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

.mood-entry {
    animation: fadeIn 0.3s ease;
}

/* Success feedback */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid #c3e6cb;
}
