
:root {
    --color-primary: #3b82f6;
    --color-secondary: #8b5cf6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-neutral: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
}

[data-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-color: #374151;
}

body[data-theme="dark"] {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

/* Mood Button States */
.mood-not-set {
    opacity: 0.35;
    filter: grayscale(100%);
}

.mood-not-set:hover {
    opacity: 0.6;
    filter: grayscale(50%);
}

.mood-set {
    opacity: 1;
    filter: none;
}

/* Mood Progress Indicator */
#moodProgress.complete {
    background-color: #d1fae5;
    color: #059669;
    font-weight: 600;
}

#moodProgress.partial {
    background-color: #fef3c7;
    color: #d97706;
}

#moodProgress.empty {
    background-color: #fee2e2;
    color: #dc2626;
}

.hydration-dot { 
    width: 16px; 
    height: 16px; 
    border-radius: 50%; 
    display: inline-block; 
    margin: 0 2px; 
}

.hydration-filled { background-color: var(--color-primary); }
.hydration-empty { background-color: #e5e7eb; }

.hidden { display: none !important; }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
}

.delete-btn {
    color: var(--color-danger);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.success-message {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease;
}

.error-message {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease;
}

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

@media (max-width: 640px) {
    .modal-overlay {
        padding: 0;
    }
    
    #addModal .bg-white {
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .touch-target {
        min-height: 48px;
        min-width: 48px;
    }
}
/* Onboarding Animations */
.onboarding-screen {
    animation: fadeIn 0.3s ease-out;
}

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

/* Reminder Banner Animation */
#reminderBanner {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Goal Button Selected State */
.goal-btn.selected {
    border-color: white !important;
    background-color: rgba(255,255,255,0.2) !important;
}

/* Medication Tracking Styles */
.med-freq-btn.selected,
.med-time-btn.selected {
    border-color: #8b5cf6 !important;
    background-color: #ede9fe !important;
}

.med-freq-btn:hover,
.med-time-btn:hover {
    transform: scale(1.02);
}

#medicationSection .cursor-pointer:hover {
    transform: translateY(-1px);
}

/* Medication adherence animation */
@keyframes pulse-success {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.medication-complete {
    animation: pulse-success 0.5s ease-out;
}