.progress-ring {
    transform: rotate(-90deg);
}

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Enhanced UI utilities */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth transitions for all interactive elements */
.transition-all {
    transition: all 0.2s ease;
}

/* Enhanced hover effects */
.hover-scale:hover {
    transform: scale(1.02);
}

/* Custom scrollbar */
.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Improved focus states */
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Analytics chart container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }

    .weekly-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* PWA app-like styling */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Enhanced animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Calendar styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
}

.calendar-day {
    background: white;
    min-height: 80px;
    padding: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendar-day.today {
    background: #dbeafe;
    border: 2px solid #3b82f6;
}

.calendar-day.has-session {
    background: #fef3c7;
}

.calendar-day.completed {
    background: #d1fae5;
}

/* Calendar day hover effects */
.calendar-day:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* AI prompt styling */
.ai-prompt {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    padding: 16px;
    border-radius: 8px;
    margin: 8px 0;
}

/* Week navigation styles */
.weekly-grid {
    gap: 4px;
}

.weekly-grid>div {
    min-height: 40px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.weekly-grid>div:hover {
    transform: scale(1.05);
}

/* Problem difficulty badges */
.difficulty-easy {
    background-color: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.difficulty-medium {
    background-color: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.difficulty-hard {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Session cards */
.session-card {
    transition: all 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Progress bars */
.progress-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
    transition: width 0.3s ease;
}

/* Error and success states */
.error-state {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.success-state {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Text utilities */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation tabs */
.nav-tab {
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.nav-tab.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-tab:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Phase cards */
.phase-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.phase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Enhanced responsive design */
@media (max-width: 640px) {
    .calendar-day {
        min-height: 50px;
        font-size: 10px;
        padding: 2px;
    }

    .weekly-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .phase-card {
        padding: 16px;
    }
}

/* Print styles */
@media print {
    .gradient-bg {
        background: #667eea !important;
        color: white !important;
    }

    .chart-container {
        display: none;
    }

    .nav-tab,
    .weekly-grid {
        display: none;
    }
}