:root {
    --bg-color: #f8faf8;
    --card-bg: #ffffff;
    --text-primary: #1a1f1a;
    --text-secondary: #718071;
    --accent-color: #4a6741;
    --highlight-color: #b08d48;
    --danger-color: #ef4444;
    --success-color: #2e7d32;
    --today-bg: #e0f2fe;
    --today-border: #3b82f6;
    --radius: 16px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(#e0e7e0 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text-primary);
    overflow-x: hidden;
    padding: 15px;
}

.container { width: 100%; max-width: 550px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }

.fade-in { animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.profile-card {
    background: var(--card-bg); padding: 15px; border-radius: var(--radius);
    box-shadow: var(--shadow); border-right: 6px solid var(--accent-color);
    display: flex; justify-content: space-between; align-items: center;
}

.badges-row { display: flex; gap: 8px; margin-top: 5px; }
.mini-icon { width: 18px; height: 18px; object-fit: contain; margin-left: 4px; vertical-align: middle; }

.badge { background: #f4f6f4; padding: 3px 8px; border-radius: 6px; color: var(--text-secondary); font-size: 0.7rem; display: flex; align-items: center; }
.badge.highlight { background: #fdf8ef; color: var(--highlight-color); border: 1px solid #f1e4cc; }

.live-clock-section {
    background: white; padding: 30px 10px; border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid #edf2ed; text-align: center;
}

.countdown-label { 
    font-size: 1.1rem; color: #333; margin-bottom: 25px; 
    font-weight: 900; letter-spacing: -0.5px;
}

.timer-container {
    display: flex; justify-content: center; align-items: flex-start; gap: 4px;
}

.time-block {
    display: flex; flex-direction: column; align-items: center;
    min-width: 65px; 
}

.time-val {
    font-size: 3.2rem; font-weight: 950; color: var(--accent-color);
    line-height: 0.9; font-variant-numeric: tabular-nums;
}

.time-lbl {
    font-size: 0.85rem; color: #444; margin-top: 12px; font-weight: 800;
}

.time-sep {
    font-size: 2.8rem; color: #ccc; margin: -5px 2px 0; font-weight: 900;
}

.progress-section { background: var(--card-bg); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); }
.progress-labels { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: bold; font-size: 0.85rem; }
.progress-bar-container { height: 12px; background: #e2e8e2; border-radius: 10px; position: relative; overflow: hidden; }
.progress-bar { 
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--accent-color), var(--highlight-color)); 
    border-radius: 10px; transition: width 0.5s ease;
}

.stats-grid { display: flex; gap: 10px; }
.stat-card {
    flex: 1; background: var(--card-bg); padding: 15px 5px; border-radius: var(--radius); 
    box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; align-items: center;
    min-height: 90px;
}

.combined-box { margin-top: 10px; }
.timeline-card { flex-direction: row; justify-content: space-around; width: 100%; min-height: 70px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; align-items: center; }
.timeline-divider { width: 1px; height: 30px; background: #e0e4e0; }
.timeline-text { font-size: 1rem; font-weight: 800; margin-top: 4px; display: block; letter-spacing: 0.5px; color: #222; }

.stat-label { font-size: 0.7rem; color: var(--text-secondary); font-weight: bold; }
.stat-value { font-size: 1.35rem; font-weight: 900; }
.text-green { color: var(--success-color); }
.text-red { color: var(--danger-color); }

.calendar-slider { 
    display: flex; gap: 15px; overflow-x: auto; padding: 10px 20px 20px; 
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
}
.calendar-slider::-webkit-scrollbar { display: none; }

.month-card {
    flex: 0 0 280px; background: white; border-radius: 20px; padding: 15px;
    scroll-snap-align: center; transition: all 0.4s ease;
    opacity: 0.6; transform: scale(0.95); border: 1px solid #f0f0f0;
}
.month-card.active-month { 
    opacity: 1; transform: scale(1); border: 2px solid var(--accent-color); 
    box-shadow: 0 10px 25px rgba(74, 103, 65, 0.15); 
}

.month-header { text-align: right; font-weight: 900; color: var(--accent-color); margin-bottom: 12px; border-bottom: 1px solid #f0f3f0; padding-bottom: 5px; }
.month-header.crossed { text-decoration: line-through; opacity: 0.6; color: var(--text-secondary); }

.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; border-radius: 50%; color: #555; position: relative; }
.day-name { color: #aaa; font-size: 0.6rem; font-weight: bold; }

.day-cell.passed { color: #ccc; }
.day-cell.passed::after { 
    content: "✕"; position: absolute; color: var(--danger-color); 
    font-size: 1rem; opacity: 0.6; font-weight: bold; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.day-cell.today { 
    background: var(--today-bg); color: var(--today-border); font-weight: bold; 
    border: 2px solid var(--today-border); box-shadow: 0 0 8px rgba(59, 130, 246, 0.2); z-index: 2;
}

.day-cell.end-point { background: var(--danger-color); color: white; font-size: 0.6rem; border-radius: 8px; }

.status-pulse { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; display: inline-block; margin-left: 6px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }