.challenge-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 60px;
}

.habit-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.habit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.habit-header h2 {
    font-size: 2rem;
    color: #1f2937;
}

.day-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.habit-content {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
}

.habit-icon {
    font-size: 4rem;
    min-width: 80px;
    text-align: center;
}

.habit-details h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.habit-description {
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.6;
}

.habit-meta {
    display: flex;
    gap: 15px;
}

.difficulty,
.duration {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.difficulty {
    background: #fef3c7;
    color: #92400e;
}

.duration {
    background: #dbeafe;
    color: #1e40af;
}

.habit-benefits {
    background: #f0fdf4;
    padding: 20px;
    border-left: 4px solid #10b981;
    border-radius: 8px;
    margin-bottom: 30px;
}

.habit-benefits h4 {
    color: #065f46;
    margin-bottom: 10px;
}

.habit-benefits p {
    color: #047857;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.action-buttons .btn {
    flex: 1;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stats-box,
.calendar-box,
.tips-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.stats-box h3,
.calendar-box h3,
.tips-box h3 {
    margin-bottom: 15px;
    color: #1f2937;
    font-size: 1.1rem;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.progress-item span {
    color: #6b7280;
    font-size: 0.9rem;
}

.progress-item strong {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 700;
}

.day-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.day-square {
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: #e5e7eb;
    color: #6b7280;
}

.day-square.completed {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.day-square.skipped {
    background: #fecaca;
    color: #991b1b;
}

.tips-box p {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .challenge-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-template-columns: repeat(3, 1fr);
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .habit-card {
        padding: 20px;
    }

    .habit-content {
        flex-direction: column;
        gap: 15px;
    }

    .habit-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .action-buttons {
        flex-direction: column;
    }

    .sidebar {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}