/* Main Styles for Habit Tracker Application */

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #00cec9;
    --accent-color: #fdcb6e;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --dark-color: #2d3436;
    --light-color: #f5f6fa;
    --text-color: #2d3436;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f8f9fa;
    padding-bottom: 2rem;
}

/* Custom Card Styling */
.card {
    border-radius: var(--border-radius);
    border: none;
    overflow: hidden;
    transition: var(--transition);
}

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

.card-header {
    padding: 1rem 1.5rem;
    font-weight: bold;
}

/* Habit Item Styling */
.habit-item {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    border-right: 5px solid #6c5ce7;
}

.habit-item:hover {
    box-shadow: var(--box-shadow);
}

.habit-info {
    display: flex;
    align-items: center;
}

.habit-icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: white;
    margin-left: 15px;
}

.habit-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.habit-streak {
    font-size: 0.85rem;
    color: #666;
}

.habit-actions {
    display: flex;
    gap: 10px;
}

.habit-actions button {
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

/* Weekly tracker */
.weekly-tracker {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.day-marker {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    background-color: #e9ecef;
    color: #6c757d;
}

.day-marker.active {
    background-color: var(--success-color);
    color: white;
}

/* Add habit button styling */
.add-habit-btn {
    transition: var(--transition);
    border-radius: 30px;
    padding: 10px 20px;
}

.add-habit-btn:hover {
    transform: scale(1.05);
}

/* Stats cards */
.stats-card {
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

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

/* Empty state */
.empty-state {
    opacity: 0.7;
    transition: var(--transition);
}

/* Custom form controls */
.form-control,
.form-select {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

/* Animation for items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.habit-item {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .habit-actions {
        flex-direction: column;
        gap: 5px;
    }

    .weekly-tracker {
        flex-wrap: wrap;
    }
}