/* ===================================
   Diyet & Kalori Takip Sistemi
   Sıcak Renkli Premium Tema (Düz Turuncu & Krem Arka Plan)
   Geliştirici: Ahmet Eren Sönmez #619
   =================================== */

/* -- CSS Variables -- */
:root {
    --primary: #FF6B00;         /* Düz Turuncu */
    --primary-dark: #D45900;    /* Koyu Turuncu */
    --primary-light: #FF8533;   /* Açık Turuncu */
    --accent: #FFD700;          /* Altın Sarı */
    --warm-red: #FF3B00;        /* Kırmızı-Turuncu */
    --warm-crimson: #DC3545;
    --bg-dark: #1E1E24;         /* Navbar için koyu renk */
    --bg-body: #FAF4EA;         /* Krem Rengi Arka Plan */
    --bg-section: #F5EBE0;      /* Daha Koyu Krem (Kartlar ve bölümler için) */
    --text-dark: #2D1B0E;
    --text-medium: #5C3D2E;
    --text-light: #8B6F5E;
    --white: #ffffff;
    --shadow-warm: 0 4px 15px rgba(255, 107, 0, 0.15);
    --shadow-hover: 0 8px 30px rgba(255, 107, 0, 0.25);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* -- Global Reset & Base -- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 76px;
    line-height: 1.6;
}

/* =================================
   NAVBAR
   ================================= */
.navbar {
    background-color: var(--bg-dark) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.6rem 0;
    transition: var(--transition);
    border-bottom: 3px solid var(--primary);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--white) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.brand-text {
    letter-spacing: -0.5px;
}

.brand-highlight {
    color: var(--primary);
    margin: 0 2px;
    font-size: 1.6rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    margin: 0 4px;
    transition: var(--transition);
    position: relative;
}

.navbar .nav-link:hover {
    color: var(--white) !important;
    background-color: rgba(255, 107, 0, 0.15);
    transform: translateY(-1px);
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar .nav-link:hover::after {
    width: 60%;
}

/* =================================
   MAIN CONTENT
   ================================= */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* =================================
   HERO SECTION
   ================================= */
.hero-section {
    background-color: var(--primary); /* Düz Turuncu Arka Plan */
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
    color: var(--white);
    box-shadow: var(--shadow-warm);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.hero-title i {
    margin-right: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

.hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.95;
    margin-bottom: 0;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.btn-add-new {
    background-color: var(--white);
    color: var(--primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.btn-add-new:hover {
    background-color: var(--white);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* =================================
   STAT CARDS
   ================================= */
.stat-card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: 1px solid rgba(255, 107, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.stat-total::after { background-color: var(--warm-red); }
.stat-count::after { background-color: var(--primary); }
.stat-avg::after { background-color: var(--accent); }

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-total .stat-icon {
    background-color: rgba(255, 59, 0, 0.1);
    color: var(--warm-red);
}

.stat-count .stat-icon {
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--primary);
}

.stat-avg .stat-icon {
    background-color: rgba(255, 215, 0, 0.15);
    color: #D4AF37;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    line-height: 1;
}

.stat-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* =================================
   SEARCH SECTION
   ================================= */
.search-section {
    margin-bottom: 2rem;
}

.search-form .input-group {
    box-shadow: var(--shadow-card);
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--white);
    border: 1px solid rgba(255, 107, 0, 0.1);
}

.search-icon {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    padding-left: 1.2rem;
}

.search-input {
    border: none !important;
    padding: 1rem 1rem;
    font-size: 1rem;
    background: transparent;
}

.search-input:focus {
    box-shadow: none !important;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-light);
}

.btn-search {
    background-color: var(--primary); /* Düz Turuncu */
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-search:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.btn-clear {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--warm-crimson);
    border: none;
    transition: var(--transition);
}

.btn-clear:hover {
    background-color: var(--warm-crimson);
    color: var(--white);
}

/* =================================
   FOOD TABLE
   ================================= */
.food-table-wrapper {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid rgba(255, 107, 0, 0.1);
}

.food-table {
    margin: 0;
    border-collapse: collapse;
}

.food-table thead {
    background-color: var(--bg-dark);
}

.food-table thead th {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    white-space: nowrap;
}

.food-table thead th i {
    color: var(--primary);
}

.food-table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.food-table tbody tr:hover {
    background-color: rgba(255, 107, 0, 0.04);
    transform: scale(1.002);
}

.food-table tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    font-size: 0.92rem;
    border: none;
}

.calorie-badge {
    background-color: rgba(255, 59, 0, 0.1);
    color: var(--warm-red);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.category-badge {
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
}

.btn-delete-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(220, 53, 69, 0.08);
    color: var(--warm-crimson);
    border: none;
    transition: var(--transition);
}

.btn-delete-icon:hover {
    background-color: var(--warm-crimson);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

/* =================================
   EMPTY STATE
   ================================= */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 2px dashed rgba(255, 107, 0, 0.2);
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    background-color: rgba(255, 107, 0, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.empty-state-icon i {
    font-size: 2.5rem;
    color: var(--primary);
}

.empty-state h3 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* =================================
   DELETE MODAL
   ================================= */
.delete-modal {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
}

.delete-modal .modal-header {
    background-color: var(--warm-crimson);
    color: var(--white);
    border: none;
    padding: 1.2rem 1.5rem;
}

.delete-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.delete-modal .modal-body {
    padding: 1.5rem;
}

.delete-modal .modal-footer {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding: 1rem 1.5rem;
}

/* =================================
   CREATE PAGE
   ================================= */
.create-page {
    padding: 1rem 0;
}

.create-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid rgba(255, 107, 0, 0.1);
}

.create-header {
    background-color: var(--primary); /* Düz Turuncu */
    color: var(--white);
    padding: 2rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.create-header h2 {
    font-weight: 700;
    margin-bottom: 0.3rem;
    font-size: 1.6rem;
    position: relative;
    z-index: 1;
}

.create-header p {
    opacity: 0.95;
    margin-bottom: 0;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.create-body {
    padding: 2rem 2.5rem;
}

.custom-input {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.95rem;
}

.custom-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.form-floating > label {
    color: var(--text-light);
}

/* Öğün Radio Buttons */
.ogun-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ogun-radio {
    margin: 0 !important;
}

.ogun-radio .form-check-input {
    display: none;
}

.ogun-radio .form-check-label {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    user-select: none;
}

.ogun-radio .form-check-label:hover {
    border-color: var(--primary-light);
    background-color: rgba(255, 107, 0, 0.05);
}

.ogun-radio .form-check-input:checked + .form-check-label {
    border-color: var(--primary);
    background-color: rgba(255, 107, 0, 0.08);
    color: var(--primary-dark);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-back {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-medium);
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-back:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    transform: translateX(-3px);
}

.btn-save {
    background-color: var(--primary); /* Düz Turuncu */
    color: var(--white);
    font-weight: 600;
    padding: 0.7rem 2rem;
    border-radius: var(--radius);
    border: none;
    transition: var(--transition);
    box-shadow: var(--shadow-warm);
}

.btn-save:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

/* =================================
   TOAST ALERT
   ================================= */
.toast-alert {
    border: none;
    border-radius: var(--radius);
    border-left: 4px solid #28a745;
    box-shadow: var(--shadow-card);
}

/* =================================
   FOOTER
   ================================= */
.site-footer {
    background-color: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 4px solid var(--primary);
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--white);
}

.footer-desc {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0;
}

.developer-info {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: rgba(255, 255, 255, 0.85);
}

.developer-info i {
    color: var(--primary);
    width: 20px;
}

.footer-copy {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* =================================
   RESPONSIVE
   ================================= */
@media (max-width: 768px) {
    body {
        padding-top: 66px;
    }

    .hero-section {
        padding: 1.5rem;
        text-align: center;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-section .text-end {
        text-align: center !important;
        margin-top: 1rem;
    }

    .stat-info h3 {
        font-size: 1.4rem;
    }

    .create-body {
        padding: 1.5rem;
    }

    .create-header {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    .ogun-radio-group {
        gap: 0.4rem;
    }

    .ogun-radio .form-check-label {
        padding: 0.4rem 0.8rem;
        font-size: 0.82rem;
    }

    .site-footer .row > div {
        text-align: center !important;
        margin-bottom: 1rem;
    }

    .footer-brand {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .search-form .input-group {
        flex-direction: column;
    }
    
    .search-form .input-group > * {
        border-radius: var(--radius) !important;
        margin-bottom: 0.5rem;
    }
    
    .btn-search, .btn-clear {
        width: 100%;
    }
}

/* =================================
   SCROLLBAR CUSTOMIZATION
   ================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--bg-section);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-dark);
}