/* --- YÖNETİM PANELİ: GRADIENT RENKLERİ --- */
/* Buradaki renk kodlarını değiştirerek tüm gradient yazıların renklerini güncelleyebilirsiniz. */
/* --- YÖNETİM PANELİ: GRADIENT RENKLERİ --- */
/* Buradaki renk kodlarını değiştirerek tüm gradient yazıların renklerini güncelleyebilirsiniz. */
:root {
    --gradient-color-1: #4f46e5;  /* Indigo */
    --gradient-color-2: #a855f7;  /* Mor */
    --gradient-color-3: #ec4899;  /* Pembe */
    --gradient-color-4: #f59e0b;  /* Amber */
}

/* --- GENEL ANİMASYONLAR VE GEÇİŞLER --- */
.screen {
    transition: opacity 0.4s ease-in-out;
}

/* Ekranlar göründüğünde uygulanacak animasyon */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Butonlar ve kartlar için yumuşak geçiş */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- MOBİL UYUMLULUK İYİLEŞTİRMELERİ --- */
body {
    -webkit-overflow-scrolling: touch;
}

button, a, [role="button"] {
    -webkit-tap-highlight-color: transparent;
}


/* --- BUTON STİLLERİ --- */
.btn-gradient {
    background: linear-gradient(to right, #4f46e5, #a855f7);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    box-shadow: 0 4px 15px 0 rgba(79, 70, 229, 0.4);
}

.btn-gradient:hover {
    background: linear-gradient(to right, #4338ca, #9333ea);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
}

.btn-gradient:disabled {
    background: #374151;
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- MODAL PENCERE İYİLEŞTİRMELERİ --- */
.modal-backdrop {
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out forwards;
}

.modal-content {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Su Takip Sistemi Dalga Animasyonu */
#water-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0ea5e9;
    transition: height 0.7s ease-in-out;
}

#water-wave::before,
#water-wave::after {
    content: "";
    position: absolute;
    left: 0;
    width: 200%;
    height: 10px;
    background-size: 50% 100%;
}

#water-wave::before {
    top: -10px;
    background-repeat: repeat-x;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 C25,10 25,0 50,5 C75,10 75,0 100,5 L100,10 L0,10 Z" fill="%230ea5e9"></path></svg>');
    animation: wave 2s linear infinite;
}

#water-wave::after {
    top: -10px;
    background-repeat: repeat-x;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10" preserveAspectRatio="none"><path d="M0,5 C25,0 25,10 50,5 C75,0 75,10 100,5 L100,10 L0,10 Z" fill="%230ea5e9"></path></svg>');
    animation: wave-reverse 2.5s linear infinite;
    opacity: 0.6;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes wave-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* --- GİRİŞ FORMU ANİMASYONU --- */
#auth-screen fieldset {
    padding-top: 0;
}

#auth-screen fieldset > div {
    margin-top: 0;
}

#auth-screen input {
    padding: 1rem;
}

#auth-screen legend {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    background-color: rgba(17, 24, 39, 0.8);
    padding: 0 0.25rem;
}

#auth-screen input:focus + legend,
#auth-screen input:not(:placeholder-shown) + legend {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    color: #a78bfa;
    font-weight: 500;
}

/* --- DASHBOARD HEADER PANELİ (YENİ STİLLER) --- */
.stat-card {
    background-color: rgba(31, 41, 55, 0.2);
    background-image: radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent);
    border: 1px solid #374151;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 1px 2px 0 rgba(0,0,0,0.3);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #4f46e5;
}

.stat-card .label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0.25rem;
    text-shadow: 0 0 5px rgba(255,255,255,0.2);
}

.progress-bar-track {
    width: 100%;
    height: 16px;
    background-color: #1f2937;
    border-radius: 9999px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #4f46e5, #a855f7);
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.progress-bar-indicator {
    position: absolute;
    top: 50%;
    left: var(--progress-percent, 0%);
    width: 24px;
    height: 24px;
    background-color: white;
    border: 4px solid #a855f7;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.5s ease-in-out;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    animation: pulse 2.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 25px rgba(255, 255, 255, 1);
    }
}


/* --- TOAST BİLDİRİM SİSTEMİ --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.toast-item {
    background-color: #1f2937;
    color: #e5e7eb;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid #4b5563;
    font-weight: 500;
    animation: toast-in 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards, toast-out 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) 3.5s forwards;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-item.toast-success {
    background-color: #10B981; /* Green-500 */
    border-color: #059669; /* Green-600 */
    color: white;
}

.toast-item.toast-error {
    background-color: #EF4444; /* Red-500 */
    border-color: #DC2626; /* Red-600 */
    color: white;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* --- DASHBOARD HEADER İKON BUTONLARI --- */
.icon-btn, .icon-btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.icon-btn {
    background-color: rgba(20, 184, 166, 0.4); /* Teal */
}

.icon-btn:hover {
    background-color: rgba(20, 184, 166, 0.7);
    transform: scale(1.1);
}

.icon-btn-danger {
    background-color: rgba(239, 68, 68, 0.4); /* Red */
}

.icon-btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.7);
    transform: scale(1.1);
}

/* --- YENİ & GÜNCEL: MODERN AI MEAL MODAL TASARIMI --- */
.ai-response-section {
    background-color: rgba(31, 41, 55, 0.5); /* gray-800/50 */
    border-left-width: 4px;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ai-response-section .section-header {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-food-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

.ai-food-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.ai-food-item .calorie-badge {
    font-weight: 600;
    font-size: 0.875rem;
    background-color: rgba(17, 24, 39, 0.6);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.animated-gradient-text {
    background: linear-gradient(90deg, 
        var(--gradient-color-1), 
        var(--gradient-color-2), 
        var(--gradient-color-3), 
        var(--gradient-color-4)
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-animation 5s ease infinite;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}