@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

:root {
    --bg-color: #151517; 
    --card-bg: #1e1e20; 
    --text-main: #E5E5E5;
    --text-muted: #7a7a7c;
    --orange-glow: rgba(255, 165, 0, 0.6);
    --green-glow: rgba(0, 200, 81, 0.6);
    --red-glow: rgba(255, 68, 68, 0.6);
    --neon-red: #ff4444;
    --neon-pink: #ff66b2;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}

html, body { 
    width: 100%;
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none; 
    background: 
        repeating-linear-gradient(45deg, rgba(0,0,0,0.3) 0px, rgba(0,0,0,0.3) 2px, transparent 2px, transparent 4px),
        linear-gradient(180deg, #1c1c1e 0%, #0a0a0b 100%);    
    background-attachment: fixed; 
    color: var(--text-main); 
}

.page { 
    display: none; 
    padding: 0; 
    height: 100vh; 
    width: 100vw; 
    overflow-y: auto; 
    animation: fadeIn 0.3s ease;
}
.page.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#home-page.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%; 
    min-height: 100vh;
    overflow: hidden; 
    padding-bottom: 0; 
    position: relative;
}

.top-carousel {
    position: relative;
    height: 130px;
    width: 100%;
    display: block;
    margin-top: 60px;  
    margin-bottom: 10px;
    padding-top: 20px; 
    overflow: visible; 
    touch-action: pan-y;
}
.carousel-item {
    position: absolute;
    top: 20px;
    left: 50%;
    margin-left: -70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 140px;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.8s ease, z-index 0.8s;
    opacity: 0;
    pointer-events: none;
}
.carousel-item.active { transform: translateX(0) scale(1); opacity: 1; z-index: 3; pointer-events: auto; }
.carousel-item.prev { transform: translateX(-130px) scale(0.55); opacity: 0.4; z-index: 2; cursor: pointer; pointer-events: auto; }
.carousel-item.next { transform: translateX(130px) scale(0.55); opacity: 0.4; z-index: 2; cursor: pointer; pointer-events: auto; }

.c-icon-wrapper {
    position: relative;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; 
    width: 130px; 
    height: 130px;
    transition: box-shadow 0.8s ease, border-color 0.8s ease;
}

.carousel-item:not(.active) .c-icon-wrapper {
    box-shadow: 0 0 10px rgba(0,0,0,0.8), inset 0 0 10px rgba(0,0,0,0.9) !important;
    border-color: rgba(255,255,255,0.05) !important;
}
.carousel-item:not(.active) .c-icon-wrapper img { filter: drop-shadow(0 0 2px rgba(255,255,255,0.05)) !important; }

.carousel-item#item-cut.active .c-icon-wrapper { box-shadow: 0 0 120px rgba(255,68,68,0.9), inset 0 0 20px rgba(0,0,0,0.8) !important; border-color: rgba(255,68,68,0.6) !important; }
.carousel-item#item-cut.active .c-icon-wrapper img { filter: drop-shadow(0 0 40px rgba(255,68,68,1)) !important; }
.carousel-item#item-maintenance.active .c-icon-wrapper { box-shadow: 0 0 120px rgba(255,187,51,0.9), inset 0 0 20px rgba(0,0,0,0.8) !important; border-color: rgba(255,187,51,0.6) !important; }
.carousel-item#item-maintenance.active .c-icon-wrapper img { filter: drop-shadow(0 0 40px rgba(255,187,51,1)) !important; }
.carousel-item#item-bulk.active .c-icon-wrapper { box-shadow: 0 0 120px rgba(76,175,80,0.9), inset 0 0 20px rgba(0,0,0,0.8) !important; border-color: rgba(76,175,80,0.6) !important; }
.carousel-item#item-bulk.active .c-icon-wrapper img { filter: drop-shadow(0 0 40px rgba(76,175,80,1)) !important; }

.dashboard-grid {
    flex-grow: 1; 
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1.2fr 0.9fr 0.9fr;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    padding: 0 20px 20px 20px;
}

.dash-card {
    background: linear-gradient(145deg, rgba(34,34,38,0.85) 0%, rgba(21,21,23,0.85) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 10px 10px 20px rgba(0,0,0,0.6), -2px -2px 10px rgba(255,255,255,0.03), inset 0 1px 1px rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative; 
    overflow: hidden; 
    min-height: 130px;
}

.dash-card:active { transform: scale(0.96); box-shadow: 4px 4px 10px rgba(0,0,0,0.6), -1px -1px 5px rgba(255,255,255,0.02), inset 0 4px 10px rgba(0, 0, 0, 0.4); }
.dash-card.center-content { align-items: center !important; text-align: center !important; }
.dash-card.center-content .d-title, .dash-card.center-content .d-stat { text-align: center !important; width: 100%; }
.dash-card.center-content .d-icon { margin: 0 auto 12px auto !important; display: flex; justify-content: center; }
.dash-card.full-width { grid-column: 1 / -1; justify-content: flex-start; min-height: 90px; }
.dash-card.nutrition-card { -webkit-mask-image: radial-gradient(circle at calc(100% + 8px) calc(100% - 30px), transparent 38px, black 39px); mask-image: radial-gradient(circle at calc(100% + 8px) calc(100% - 30px), transparent 38px, black 39px); border-bottom-right-radius: 0 !important; }
.dash-card.routine-card { -webkit-mask-image: radial-gradient(circle at calc(0% - 8px) calc(100% - 30px), transparent 38px, black 39px); mask-image: radial-gradient(circle at calc(0% - 8px) calc(100% - 30px), transparent 38px, black 39px); border-bottom-left-radius: 0 !important; }

.d-icon { width: 42px; height: 42px; color: #aaa; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; }
.d-icon.small { width: 24px; height: 24px; }
.d-header-row .d-icon { margin-bottom: 0 !important; }
.d-title { font-size: 16px; font-weight: 800 !important; color: #e5e5e5; z-index: 2; }
.d-stat { font-size: 12px; color: #777; margin-top: 6px; font-weight: 600; z-index: 2; }
.d-header-row { display: flex; align-items: center; gap: 10px; z-index: 2; }

.tracking-wave { position: absolute; bottom: 0; left: 0; width: 100%; height: 65%; opacity: 0.6; z-index: 1; }

.bottom-gear-wrapper {
    position: absolute; 
    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%; 
    background: linear-gradient(145deg, #2a2a2e, #18181a);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.1); 
    border: 1px solid rgba(255,255,255,0.05);
    z-index: 100;
    transition: 0.2s;
}
.bottom-gear-wrapper:active { transform: translateX(-50%) scale(0.9); box-shadow: none; }
.bottom-gear { width: 26px; height: 26px; color: #aaa; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.bottom-gear-wrapper:active .bottom-gear { transform: rotate(45deg); }

.page:not(#home-page) { padding: 20px; background-color: transparent; }
.header { display: flex; align-items: center; gap: 15px; margin-bottom: 30px; margin-top: 10px; }
.back-btn { background-color: #222; border: none; color: white; width: 40px; height: 40px; border-radius: 10px; font-size: 18px; cursor: pointer; }
.page-title { text-align: center; font-size: 24px; margin-bottom: 20px; }
.card { background-color: var(--card-bg); border-radius: 15px; padding: 20px; margin-bottom: 20px; }
.card-header { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 12px; font-weight: 700; margin-bottom: 15px; text-transform: uppercase; }
.exercise-card { background-color: var(--card-bg); border-radius: 15px; padding: 15px; display: flex; align-items: center; margin-bottom: 15px; transition: 0.3s; }
.swap-btn { background-color: #222; border: none; color: var(--neon-red); width: 40px; height: 40px; border-radius: 10px; margin-right: 15px; cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.swap-btn.skipped { background-color: #ff4444; color: white; box-shadow: 0 0 10px rgba(255,0,0,0.5); }
.ex-info { flex-grow: 1; } .ex-name { font-weight: 700; font-size: 16px; } .ex-stats { text-align: right; } .ex-reps { font-weight: 700; font-size: 16px; color: #888; } .ex-weight { color: var(--neon-red); font-size: 14px; font-weight: 700; }
.feedback-btns { display: none; gap: 10px; margin-top: 15px; }
.fb-btn { flex: 1; height: 55px; border: none; border-radius: 10px; cursor: pointer; transition: 0.2s; font-size: 20px; color: white; }
.fb-skull { flex: 0.4; background-color: black; border: 1px solid #333; }
.fb-red { background-color: #ff4444; } .fb-yellow { background-color: #ffbb33; } .fb-green { background-color: #00C851; }

.action-btn { 
    width: 100%; 
    background: linear-gradient(145deg, #ff5555, #cc0000);
    color: white; 
    border: none; 
    padding: 20px; 
    border-radius: 15px; 
    font-size: 18px; 
    font-weight: 900; 
    margin-top: 20px; 
    margin-bottom: 10px; 
    box-shadow: 0 8px 20px rgba(255,0,0,0.4), inset 0 2px 2px rgba(255,255,255,0.3);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer; 
    transition: 0.2s; 
}
.action-btn:active { transform: translateY(2px); box-shadow: 0 4px 10px rgba(255,0,0,0.4), inset 0 4px 8px rgba(0,0,0,0.4); }
.action-btn.pink { background: linear-gradient(145deg, #ff88cc, #e64d99); box-shadow: 0 8px 20px rgba(255,102,178,0.4), inset 0 2px 2px rgba(255,255,255,0.3); }

.styled-input { flex-grow: 1; background-color: var(--card-bg); border: 1px solid #333; padding: 15px; border-radius: 10px; color: white; font-size: 16px; width: 100%; outline: none; }
.styled-input:focus { border-color: var(--neon-red); background-color: var(--card-bg); color: white; }
.styled-input:disabled { opacity: 0.5; cursor: not-allowed; }
.food-input-container, .weight-input-row { display: flex; gap: 10px; margin-bottom: 20px; align-items: stretch; }
.add-btn, .save-btn { background-color: var(--neon-red); border: none; color: white; padding: 0 20px; border-radius: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: 0.3s; }
.custom-select-container { position: relative; width: 100%; }
.custom-select-box { background-color: #0a0a0a; border: 1px solid #222; padding: 15px; border-radius: 10px; color: white; font-size: 16px; font-weight: bold; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.custom-select-box:hover { border-color: #444; }
.custom-select-options { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: #161616; border: 1px solid #333; border-radius: 10px; margin-top: 5px; z-index: 9999; max-height: 300px; overflow-y: auto; box-shadow: 0 10px 20px rgba(0,0,0,0.8); }
.custom-select-options.show { display: block; }
.custom-option { padding: 15px; border-bottom: 1px solid #222; cursor: pointer; color: #ccc; font-weight: bold; transition: 0.2s; }
.custom-option:last-child { border-bottom: none; }
.custom-option:hover { background-color: #222; color: var(--neon-red); }
.draggable-alt, .draggable-phase, .draggable-cycle-slot { display: flex; justify-content: space-between; align-items: center; background: #222; padding: 15px; border-radius: 10px; margin-bottom: 10px; transition: 0.2s; border: 1px solid transparent; }
.draggable-alt.dragging, .draggable-phase.dragging, .draggable-cycle-slot.dragging { opacity: 0.5; border: 1px dashed var(--neon-red); background-color: #111; }
.draggable-alt.over, .draggable-phase.over, .draggable-cycle-slot.over { border: 1px dashed var(--neon-red); opacity: 0.5; }
.drag-handle, .drag-handle-phase, .drag-handle-cycle { color: #666; margin-right: 15px; cursor: grab; font-size: 18px; touch-action: none; padding: 10px; margin-left: -10px; }
.drag-handle:active, .drag-handle-phase:active, .drag-handle-cycle:active { cursor: grabbing; color: var(--neon-red); }
.macros-card .card-header { display: grid; grid-template-columns: 2fr 1fr 1fr; text-align: center; }
.macros-card .card-header span:first-child { text-align: left; }
.macros-card .card-header span:last-child { text-align: right; }
.macro-row { display: grid; grid-template-columns: 2fr 1fr 1fr; align-items: center; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #333; }
.macro-name { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-muted); }
.macro-val { color: var(--neon-red); font-weight: 700; text-align: center; }
.macro-goal { font-weight: 700; text-align: right; }
.total-calories { display: flex; justify-content: space-between; font-weight: 900; font-size: 18px; margin-top: 20px; }
.red-text { color: var(--neon-red); } .green-text { color: var(--neon-green); }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.chart-title { font-size: 20px; font-weight: 900; display:flex; align-items:center; gap:10px; }
.chart-subtitle { color: var(--text-muted); font-size: 12px; }
.chart-icon { background-color: #331111; color: var(--neon-red); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.slider-container { margin-bottom: 20px; }
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; background: var(--neon-red); cursor: pointer; margin-top: -8px; box-shadow: 0 0 10px var(--neon-red-glow); }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: #333; border-radius: 2px; }
.slider-label-text { text-align: center; margin-top: 10px; font-weight: 900; color: var(--neon-red); font-size: 16px; }
.action-buttons-row { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; }
.secondary-btn { background: transparent; border: 1px solid #555; color: #ccc; padding: 15px; border-radius: 10px; cursor: pointer; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.3s; }
.secondary-btn.danger { border-color: #ff4444; color: #ff4444; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); align-items: center; justify-content: center; z-index: 99999; }
.modal-content { background: var(--card-bg); padding: 20px; border-radius: 15px; width: 90%; border: 1px solid var(--neon-red); max-height: 90vh; overflow-y: auto;}
.modal-content h3 { margin-bottom: 15px; }
.close-modal { width: 100%; background: #333; color: white; border: none; padding: 15px; margin-top: 15px; border-radius: 10px;}
.settings-label { font-size: 12px; color: var(--text-muted); font-weight: bold; display: block; margin-bottom: 5px; margin-top: 15px; }
.caliper-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.caliper-label { font-size: 10px; color: var(--text-muted); text-align: center; margin-bottom: 5px; text-transform: uppercase; }
.micro-section-title { font-size: 14px; color: var(--neon-red); font-weight: 900; margin-top: 20px; margin-bottom: 10px; border-bottom: 1px solid #333; padding-bottom: 5px; text-transform: uppercase;}
.micro-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed #222; font-size: 14px; }
.micro-row:last-child { border-bottom: none; }
.micro-name { color: #ccc; font-weight: bold; }
.micro-values { font-weight: bold; }
.micro-values .current { color: var(--neon-red); }
.micro-values .target { color: var(--neon-green); }
.supp-ingredient-row { display: flex; gap: 5px; margin-bottom: 10px; align-items: center; }
.supp-list-item { background: #222; padding: 15px; border-radius: 10px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.checklist-item { display: flex; align-items: center; gap: 15px; background: #1a1a1a; padding: 15px; border-radius: 10px; margin-bottom: 10px; border: 1px solid #333; transition: 0.2s; }
.checklist-item.done { opacity: 0.5; border-color: var(--neon-green); }
.checklist-item.done .micro-name { text-decoration: line-through; color: #888; }
.toxicity-warning { background: rgba(255,0,0,0.1); border: 1px solid var(--neon-red); padding: 15px; border-radius: 10px; margin-top: 20px; }
.toxicity-warning h4 { color: var(--neon-red); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.toxicity-item { color: #ff8888; font-size: 14px; margin-bottom: 5px; font-weight: bold; }
.food-detail-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #333; font-size: 16px; }
.food-detail-item:last-child { border-bottom: none; }
.food-detail-label { color: var(--text-muted); font-weight: bold; }
.food-detail-value { color: white; font-weight: 900; }
.scrollable-key { flex-grow: 1; overflow-x: auto; white-space: nowrap; margin-right: 10px; scrollbar-width: none; }
.scrollable-key::-webkit-scrollbar { display: none; }
.custom-checkbox-container { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; margin-top: 15px; margin-bottom: 5px; }
.custom-checkbox { width: 24px; height: 24px; background-color: #222; border-radius: 6px; display: flex; align-items: center; justify-content: center; border: 1px solid #333; transition: 0.2s; }
.custom-checkbox i { color: transparent; font-size: 14px; transition: 0.2s; }
.custom-checkbox-container input { display: none; }
.custom-checkbox-container input:checked + .custom-checkbox { background-color: var(--neon-red); border-color: var(--neon-red); box-shadow: 0 0 10px var(--neon-red-glow); }
.custom-checkbox-container input:checked + .custom-checkbox i { color: white; }
.checkbox-label { color: white; font-weight: bold; font-size: 14px; }

.cycle-circle-container { display: flex; justify-content: center; margin: 30px 0; position: relative; }
.cycle-circle { width: 200px; height: 200px; border-radius: 50%; border: 8px solid #333; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; box-shadow: inset 0 0 30px rgba(0,0,0,0.5); }
.cycle-day-text { font-size: 48px; font-weight: 900; color: white; line-height: 1; }
.cycle-phase-text { font-size: 14px; font-weight: bold; text-transform: uppercase; margin-top: 5px; text-align: center; padding: 0 10px; }
.cycle-phase-Menstruation { color: #ff4444; text-shadow: 0 0 10px rgba(255,68,68,0.5); border-color: #ff4444; }
.cycle-phase-Follicular { color: #4488ff; text-shadow: 0 0 10px rgba(68,136,255,0.5); border-color: #4488ff; }
.cycle-phase-Ovulation { color: #00C851; text-shadow: 0 0 10px rgba(0,200,81,0.5); border-color: #00C851; }
.cycle-phase-EarlyLuteal { color: #ffbb33; text-shadow: 0 0 10px rgba(255,187,51,0.5); border-color: #ffbb33; }
.cycle-phase-LateLuteal { color: #ff8800; text-shadow: 0 0 10px rgba(255,136,0,0.5); border-color: #ff8800; }
.cycle-phase-Late { color: #888888; border-color: #888888; }

/* AI Vision Image Upload Styles */
.add-image-box {
    width: 80px;
    height: 80px;
    background-color: #222;
    border: 1px dashed #555;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    flex-shrink: 0;
    transition: 0.2s;
}
.add-image-box:hover { border-color: #4488ff; color: #4488ff; }
.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border: 1px solid #333;
}
.delete-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4444;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* Otomatik tamamlama (Autofill) beyaz arka plan sorunu çözümü */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #1e1e20 inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

