        /* Hero Section Styles */
        .subjects-hero {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 24px;
            padding: 2.5rem;
            color: white;
            position: relative;
            overflow: hidden;
        }

        .subjects-hero::before {
            content: '';
            position: absolute;
            top: -20%;
            right: -10%;
            width: 300px;
            height: 300px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            backdrop-filter: blur(20px);
        }

        .hero-title {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        .hero-subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            margin-bottom: 2rem;
        }

        .hero-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 1.5rem;
            margin-top: 2rem;
        }

        .stat-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            background: rgba(255, 255, 255, 0.1);
            padding: 1.25rem;
            border-radius: 16px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.3s ease;
        }

        .stat-item:hover {
            transform: translateY(-4px);
            background: rgba(255, 255, 255, 0.15);
        }

        .stat-icon {
            width: 48px;
            height: 48px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
        }

        .stat-number {
            font-size: 1.75rem;
            font-weight: 700;
            line-height: 1;
        }

        .stat-label {
            font-size: 0.875rem;
            opacity: 0.8;
        }

        .subjects-hero .stat-item,
        .subjects-hero .stat-info,
        .subjects-hero .stat-number {
            color: white;
        }

        .subjects-hero .stat-label {
            color: rgba(255, 255, 255, 0.9);
        }

        /* Hero Card */
        .hero-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 2rem;
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            text-align: center;
        }

        .progress-overview-card h5 {
            margin-bottom: 1.5rem;
            font-weight: 600;
        }

        .subjects-hero .progress-circle-large {
            position: relative;
            display: inline-block;
            margin-bottom: 1rem;
        }

        .subjects-hero .progress-circle-large .progress-percentage,
        .subjects-hero .hero-card .progress-percentage {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 1.5rem;
            font-weight: 700;
        }

        .subjects-hero .progress-details p {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        /* Controls */
        .subjects-controls {
            background: white;
            border-radius: 16px;
            padding: 1.5rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        .control-label {
            font-weight: 600;
            color: var(--dark-color);
            margin-bottom: 0.75rem;
            display: block;
        }

        .sort-selector {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .sort-btn {
            background: rgba(102, 126, 234, 0.1);
            border: 1px solid rgba(102, 126, 234, 0.2);
            color: var(--primary-color);
            padding: 0.75rem 1rem;
            border-radius: 10px;
            font-weight: 500;
            transition: all 0.3s ease;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .sort-btn:hover,
        .sort-btn.active {
            background: var(--gradient-primary);
            color: white;
            transform: translateY(-1px);
        }

        .search-input-wrapper {
            position: relative;
        }

        .modern-input {
            border: 2px solid #e9ecef;
            border-radius: 12px;
            padding: 0.75rem 1rem 0.75rem 3rem;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .modern-input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.2rem rgba(108, 99, 255, 0.25);
        }

        .search-icon {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: #666;
            pointer-events: none;
        }

        /* Section Headers */
        .section-header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .section-title {
            font-size: 2rem;
            font-weight: 700;
            color: var(--dark-color);
            margin-bottom: 0.5rem;
        }

        .section-subtitle {
            font-size: 1.1rem;
            color: #666;
            max-width: 600px;
            margin: 0 auto;
        }

        .subject-detail-page {
            display: grid;
            gap: 1.5rem;
        }

        .subject-detail-hero {
            position: relative;
            overflow: hidden;
            border-radius: 28px;
            padding: 2rem;
            background: linear-gradient(135deg, var(--subject-accent, #667eea) 0%, #764ba2 100%);
            color: #fff;
            box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
        }

        .subject-detail-hero-backdrop {
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.22), transparent 28%),
                radial-gradient(circle at 10% 100%, rgba(255, 255, 255, 0.12), transparent 22%);
            pointer-events: none;
        }

        .subject-detail-hero-content {
            position: relative;
            z-index: 1;
        }

        .subject-detail-back {
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;
            text-decoration: none;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .subject-detail-back:hover {
            color: #fff;
        }

        .subject-detail-topline {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
        }

        .subject-detail-chip {
            display: inline-flex;
            align-items: center;
            padding: 0.42rem 0.85rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.16);
            border: 1px solid rgba(255, 255, 255, 0.22);
            backdrop-filter: blur(10px);
            font-size: 0.82rem;
            font-weight: 700;
        }

        .subject-detail-chip.muted {
            background: rgba(15, 23, 42, 0.14);
        }

        .subject-detail-heading {
            display: flex;
            gap: 1.15rem;
            align-items: flex-start;
            margin-bottom: 1.4rem;
        }

        .subject-detail-icon {
            width: 72px;
            height: 72px;
            border-radius: 22px;
            background: rgba(255, 255, 255, 0.18);
            border: 1px solid rgba(255, 255, 255, 0.24);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            flex-shrink: 0;
            backdrop-filter: blur(16px);
        }

        .subject-detail-copy h1 {
            font-size: 2.3rem;
            font-weight: 800;
            margin-bottom: 0.45rem;
        }

        .subject-detail-copy p {
            margin: 0;
            max-width: 720px;
            font-size: 1.02rem;
            color: rgba(255, 255, 255, 0.9);
        }

        .subject-detail-actions {
            display: flex;
            gap: 0.85rem;
            flex-wrap: wrap;
        }

        .btn-detail-primary,
        .btn-detail-secondary {
            border-radius: 14px;
            padding: 0.85rem 1.25rem;
            font-weight: 700;
        }

        .subject-detail-stats-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 1rem;
        }

        .subject-detail-stat-card {
            background: #fff;
            border-radius: 22px;
            padding: 1.2rem 1.3rem;
            border: 1px solid rgba(148, 163, 184, 0.16);
            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
            display: grid;
            gap: 0.3rem;
        }

        .subject-detail-stat-card.highlight {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(102, 126, 234, 0.07));
            border-color: rgba(102, 126, 234, 0.18);
        }

        .subject-detail-stat-card strong {
            font-size: 1.8rem;
            line-height: 1;
            color: #1f2937;
        }

        .subject-detail-stat-card span:last-child {
            color: #64748b;
            font-size: 0.88rem;
        }

        .subject-detail-stat-label {
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-size: 0.73rem;
            font-weight: 800;
            color: var(--subject-accent, #667eea);
        }

        .subject-detail-panel {
            background: #fff;
            border-radius: 24px;
            padding: 1.5rem;
            border: 1px solid rgba(148, 163, 184, 0.14);
            box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
        }

        .subject-detail-panel.compact {
            padding: 1.35rem;
        }

        .subject-detail-panel-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 1.25rem;
        }

        .subject-detail-panel-head h2 {
            font-size: 1.25rem;
            font-weight: 700;
            color: #1f2937;
            margin: 0 0 0.2rem;
        }

        .subject-detail-panel-head p {
            margin: 0;
            color: #64748b;
            font-size: 0.92rem;
        }

        .subject-detail-count {
            display: inline-flex;
            align-items: center;
            padding: 0.45rem 0.8rem;
            border-radius: 999px;
            background: rgba(102, 126, 234, 0.08);
            color: var(--subject-accent, #667eea);
            font-weight: 700;
            font-size: 0.82rem;
        }

        .subject-detail-chapters {
            display: grid;
            gap: 1rem;
        }

        .subject-detail-chapter-card {
            padding: 1.15rem 1.2rem;
            border-radius: 20px;
            background: linear-gradient(145deg, #fff 0%, #f8fbff 100%);
            border: 1px solid rgba(148, 163, 184, 0.16);
        }

        .subject-detail-chapter-main {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            align-items: flex-start;
            margin-bottom: 0.9rem;
        }

        .subject-detail-chapter-copy h3 {
            font-size: 1rem;
            font-weight: 700;
            color: #1f2937;
            margin: 0 0 0.45rem;
        }

        .subject-detail-chapter-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.85rem;
            color: #64748b;
            font-size: 0.85rem;
        }

        .subject-detail-chapter-meta span {
            display: inline-flex;
            align-items: center;
            gap: 0.38rem;
        }

        .subject-detail-chapter-action {
            flex-shrink: 0;
            border-radius: 12px;
            padding: 0.75rem 1rem;
            font-weight: 700;
        }

        .subject-detail-chapter-progress {
            display: grid;
            gap: 0.55rem;
        }

        .subject-detail-chapter-progress-bar {
            height: 10px;
            border-radius: 999px;
            background: #e5e7eb;
            overflow: hidden;
        }

        .subject-detail-chapter-progress-fill {
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, var(--subject-accent, #667eea), #22c1c3);
        }

        .subject-detail-chapter-progress-text {
            display: flex;
            justify-content: space-between;
            gap: 0.75rem;
            color: #64748b;
            font-size: 0.82rem;
        }

        .subject-detail-summary-ring {
            display: flex;
            justify-content: center;
            margin-bottom: 1.4rem;
        }

        .subject-detail-summary-ring-track {
            width: 196px;
            height: 196px;
            border-radius: 50%;
            background: conic-gradient(var(--subject-accent, #667eea) calc(var(--subject-progress, 0) * 1%), rgba(226, 232, 240, 0.92) 0);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
        }

        .subject-detail-summary-ring-core {
            width: 146px;
            height: 146px;
            border-radius: 50%;
            background: linear-gradient(145deg, #ffffff 0%, #eef2ff 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            box-shadow: inset 0 0 24px rgba(102, 126, 234, 0.08);
        }

        .subject-detail-summary-ring-core strong {
            font-size: 2.2rem;
            line-height: 1;
            color: var(--subject-accent, #667eea);
        }

        .summary-label,
        .summary-sub {
            color: #64748b;
        }

        .summary-label {
            font-size: 0.82rem;
            font-weight: 700;
            margin-bottom: 0.2rem;
        }

        .summary-sub {
            font-size: 0.86rem;
            margin-top: 0.25rem;
        }

        .subject-detail-summary-list {
            display: grid;
            gap: 0.75rem;
        }

        .summary-list-item {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            align-items: center;
            padding: 0.9rem 1rem;
            border-radius: 16px;
            background: #f8fafc;
            color: #475569;
        }

        .summary-list-item strong {
            color: #1f2937;
            font-size: 1rem;
        }

        .subject-detail-recent-list {
            display: grid;
            gap: 0.85rem;
        }

        .subject-detail-recent-item {
            display: flex;
            justify-content: space-between;
            gap: 1rem;
            align-items: center;
            padding: 0.95rem 1rem;
            border-radius: 16px;
            background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
            border: 1px solid rgba(148, 163, 184, 0.14);
            text-decoration: none;
            color: inherit;
        }

        .subject-detail-recent-item strong {
            display: block;
            color: #1f2937;
            margin-bottom: 0.22rem;
        }

        .subject-detail-recent-item span {
            color: #64748b;
            font-size: 0.84rem;
        }

        .subject-detail-recent-score {
            text-align: right;
            flex-shrink: 0;
        }

        .subject-detail-recent-score span {
            display: block;
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--subject-accent, #667eea);
        }

        .subject-detail-recent-score small {
            color: #64748b;
            font-size: 0.78rem;
            font-weight: 700;
        }

        .subject-detail-empty {
            padding: 1.5rem;
            border-radius: 18px;
            border: 1px dashed rgba(148, 163, 184, 0.42);
            background: #f8fafc;
            display: grid;
            place-items: center;
            gap: 0.55rem;
            text-align: center;
            color: #64748b;
        }

        .subject-detail-empty.small {
            padding: 1.2rem;
        }

        /* Modern Subject Cards */
        .subject-card-modern {
            background: white;
            border-radius: 24px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            overflow: hidden;
            transition: all 0.4s ease;
            height: 100%;
            cursor: pointer;
            position: relative;
            display: flex;
            flex-direction: column;
            animation: fadeInUp 0.6s ease var(--delay);
            opacity: 0;
            transform: translateY(30px);
            animation-fill-mode: forwards;
        }

        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .subject-card-modern:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
        }

        .subject-header {
            padding: 2rem;
            color: white;
            position: relative;
            overflow: hidden;
            background-size: cover;
            background-position: center;
        }

        .subject-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -25%;
            width: 150px;
            height: 150px;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
            backdrop-filter: blur(20px);
        }

        .subject-icon-wrapper {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1rem;
        }

        .subject-icon {
            width: 64px;
            height: 64px;
            background: rgba(255,255,255,0.2);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            position: relative;
            z-index: 1;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.3);
        }

        .difficulty-badge {
            z-index: 1;
            position: relative;
        }

        .difficulty-label {
            background: rgba(255,255,255,0.2);
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.3);
        }

        .difficulty-label.easy { background: rgba(76, 175, 80, 0.2); }
        .difficulty-label.medium { background: rgba(255, 152, 0, 0.2); }
        .difficulty-label.hard { background: rgba(244, 67, 54, 0.2); }

        .subject-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            position: relative;
            z-index: 1;
        }

        .subject-description {
            opacity: 0.9;
            margin-bottom: 0;
            position: relative;
            z-index: 1;
            font-size: 0.95rem;
        }

        .subject-body {
            padding: 2rem;
            display: flex;
            flex-direction: column;
            flex: 1;
        }

        .subject-metrics {
            margin-bottom: 2rem;
        }

        .metric-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 1rem;
        }

        .metric-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem;
            background: rgba(102, 126, 234, 0.05);
            border-radius: 12px;
            border: 1px solid rgba(102, 126, 234, 0.1);
            transition: all 0.3s ease;
            min-width: 0;
        }

        .metric-item:hover {
            background: rgba(102, 126, 234, 0.1);
            transform: translateY(-2px);
        }

        .metric-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            color: white;
        }

        .metric-icon.questions { background: linear-gradient(135deg, #667eea, #764ba2); }
        .metric-icon.chapters { background: linear-gradient(135deg, #f093fb, #f5576c); }
        .metric-icon.accuracy { background: linear-gradient(135deg, #4facfe, #00f2fe); }

        .metric-info {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .metric-value {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--dark-color);
            line-height: 1;
        }

        .metric-label {
            font-size: 0.75rem;
            color: #666;
            margin-top: 0.25rem;
        }

        .subject-progress-section {
            margin-bottom: 2rem;
            display: grid;
            gap: 0.65rem;
        }

        .progress-info {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.75rem;
            gap: 1rem;
        }

        .progress-heading {
            min-width: 0;
            display: grid;
            gap: 0.2rem;
            flex: 1;
        }

        .progress-label {
            font-weight: 600;
            color: var(--dark-color);
            font-size: 0.95rem;
        }

        .progress-subtitle {
            font-size: 0.78rem;
            color: #94a3b8;
            line-height: 1.35;
        }

        .progress-summary {
            display: grid;
            justify-items: end;
            gap: 0.55rem;
            flex-shrink: 0;
        }

        .progress-stats {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            font-weight: 600;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .progress-stats .answered {
            color: var(--primary-color);
            font-size: 1.1rem;
        }

        .progress-stats .separator {
            color: #ccc;
        }

        .progress-stats .total {
            color: #666;
            font-size: 1.1rem;
        }

        .progress-chip {
            display: inline-flex;
            align-items: baseline;
            gap: 0.38rem;
            padding: 0.42rem 0.78rem;
            border-radius: 999px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(102, 126, 234, 0.08));
            color: var(--subject-accent, #667eea);
            border: 1px solid rgba(102, 126, 234, 0.16);
            box-shadow: inset 3px 0 0 var(--subject-accent, #667eea), 0 8px 20px rgba(15, 23, 42, 0.05);
            line-height: 1;
        }

        .progress-chip-value {
            font-size: 0.95rem;
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        .progress-chip-label {
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            opacity: 0.78;
        }

        .progress-bar-custom {
            height: 10px;
            background: #f1f1f1;
            border-radius: 5px;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }

        .progress-fill {
            height: 100%;
            border-radius: 5px;
            transition: width 0.8s ease;
            position: relative;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .subject-actions {
            display: flex;
            gap: 0.75rem;
            margin-top: auto;
        }

        .btn-action {
            flex: 1;
            padding: 0.875rem 1rem;
            border-radius: 12px;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .btn-action:hover {
            transform: translateY(-2px);
        }

        .subject-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(180deg, transparent, rgba(0,0,0,0.8));
            padding: 1rem 2rem;
            transform: translateY(100%);
            transition: all 0.3s ease;
        }

        .subject-card-modern:hover .subject-overlay {
            transform: translateY(0);
        }

        .quick-stats {
            display: flex;
            justify-content: space-between;
            color: white;
        }

        .quick-stat {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .quick-stat i {
            opacity: 0.8;
        }

        @media (min-width: 1200px) {
            .metric-item {
                flex-direction: column;
                align-items: center;
                justify-content: center;
                text-align: center;
                gap: 0.55rem;
                padding: 1rem 0.75rem;
            }

            .metric-info {
                align-items: center;
                text-align: center;
            }

            .metric-label {
                margin-top: 0;
                line-height: 1.2;
            }
        }

        /* Quick Quiz Section */
        .quick-quiz-section {
            background: white;
            padding: 2.5rem;
            border-radius: 24px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        .quick-quiz-card {
            background: white;
            border: 2px solid #f1f1f1;
            border-radius: 20px;
            padding: 2rem;
            cursor: pointer;
            transition: all 0.4s ease;
            height: 100%;
            position: relative;
            overflow: hidden;
        }

        .quick-quiz-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, transparent, rgba(0,0,0,0.02));
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .quick-quiz-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
        }

        .quick-quiz-card:hover::before {
            opacity: 1;
        }

        .quiz-icon {
            width: 64px;
            height: 64px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: white;
            margin-bottom: 1.5rem;
            position: relative;
            z-index: 1;
        }

        .quiz-icon.random { background: linear-gradient(135deg, #667eea, #764ba2); }
        .quiz-icon.daily { background: linear-gradient(135deg, #f093fb, #f5576c); }
        .quiz-icon.revision { background: linear-gradient(135deg, #4facfe, #00f2fe); }
        .quiz-icon.custom { background: linear-gradient(135deg, #43e97b, #38f9d7); }

        .quiz-info h5 {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--dark-color);
            margin-bottom: 0.75rem;
        }

        .quiz-info p {
            color: #666;
            margin-bottom: 1.5rem;
            font-size: 0.95rem;
        }

        .quiz-meta {
            display: flex;
            justify-content: space-between;
            margin-bottom: 1rem;
        }

        .quiz-meta span {
            font-size: 0.85rem;
            color: #888;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        .quiz-action {
            position: absolute;
            top: 1.5rem;
            right: 1.5rem;
            width: 40px;
            height: 40px;
            background: rgba(102, 126, 234, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-color);
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .quick-quiz-card:hover .quiz-action {
            background: var(--primary-color);
            color: white;
            transform: scale(1.1);
        }

        @media (max-width: 991.98px) {
            .hero-title {
                font-size: 2rem;
            }

            .subject-detail-stats-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .subject-detail-heading {
                flex-direction: column;
            }
            
            .hero-stats {
                grid-template-columns: repeat(2, 1fr);
                gap: 1rem;
            }
            
            .sort-selector {
                justify-content: center;
            }
            
            .metric-row {
                grid-template-columns: repeat(2, 1fr);
            }

            .progress-info {
                flex-direction: column;
                align-items: stretch;
            }

            .progress-summary {
                justify-items: start;
            }
        }

        @media (max-width: 767.98px) {
            .subjects-hero {
                text-align: center;
                padding: 2rem 1.5rem;
            }

            .subject-detail-hero {
                padding: 1.5rem;
            }

            .subject-detail-stats-grid {
                grid-template-columns: 1fr;
            }

            .subject-detail-panel-head,
            .subject-detail-chapter-main,
            .subject-detail-chapter-progress-text,
            .subject-detail-recent-item {
                flex-direction: column;
                align-items: flex-start;
            }

            .subject-detail-summary-ring-track {
                width: 176px;
                height: 176px;
            }

            .subject-detail-summary-ring-core {
                width: 132px;
                height: 132px;
            }
            
            .hero-stats {
                grid-template-columns: 1fr;
            }
            
            .subjects-controls {
                padding: 1rem;
            }
            
            .metric-row {
                grid-template-columns: 1fr;
                gap: 0.75rem;
            }
            
            .subject-actions {
                flex-direction: column;
                gap: 0.5rem;
            }
            
            .quick-quiz-section {
                padding: 1.5rem;
            }
            
            .quick-quiz-card {
                padding: 1.5rem;
            }
        }
        
        /* Styles pour la carte de progression globale améliorée */
        .progress-card {
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(20px);
            border-radius: 24px;
            padding: 28px;
            position: relative;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
            transition: all 0.4s ease;
            animation: cardEntry 0.8s ease-out;
        }
        
        @keyframes cardEntry {
            from {
                opacity: 0;
                transform: translateY(40px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        .progress-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 50px rgba(102, 126, 234, 0.25);
        }
        
        /* Background pattern */
        .progress-card::before {
            content: '';
            position: absolute;
            top: -100px;
            right: -100px;
            width: 300px;
            height: 300px;
            background: radial-gradient(circle, #7c8af0 0%, transparent 70%);
            opacity: 0.1;
            border-radius: 50%;
            z-index: 0;
        }
        
        .progress-card::after {
            content: '';
            position: absolute;
            bottom: -50px;
            left: -50px;
            width: 200px;
            height: 200px;
            background: radial-gradient(circle, #764ba2 0%, transparent 70%);
            opacity: 0.08;
            border-radius: 50%;
            z-index: 0;
        }
        
        .global-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: linear-gradient(135deg, #17a2b8, #138496);
            color: white;
            padding: 7px 14px;
            border-radius: 22px;
            font-size: 0.8rem;
            font-weight: 500;
            box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
            animation: slideDown 0.5s ease-out;
            z-index: 2;
            flex: 0 0 auto;
            white-space: nowrap;
        }
        
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .card-content {
            position: relative;
            z-index: 1;
        }

        .header-section {
            margin-bottom: 26px;
            min-height: 0;
        }

        .header-top-row {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 0.75rem;
            margin-bottom: 0.65rem;
        }

        .card-title {
            font-size: 1.55rem;
            font-weight: 700;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin: 0;
            animation: fadeIn 0.8s ease-out;
            max-width: none;
            line-height: 1.08;
            width: 100%;
        }

        .header-top-row .global-badge {
            align-self: flex-end;
            order: -1;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        .score-display {
            display: flex;
            align-items: baseline;
            gap: 8px;
            margin-bottom: 6px;
            animation: countUp 1s ease-out;
        }
        
        @keyframes countUp {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        .score-number {
            font-size: 2.4rem;
            font-weight: 700;
            color: #5a67d8;
            line-height: 1;
        }

        .score-label {
            font-size: 0.92rem;
            color: #6c757d;
            font-weight: 400;
        }

        .subjects-info {
            color: #8b92a0;
            font-size: 0.88rem;
            margin-bottom: 22px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .subjects-info i {
            color: #667eea;
        }
        
        .circular-progress {
            margin: 0 auto 22px;
            text-align: center;
            display: flex;
            justify-content: center;
        }

        .subjects-progress-ring-container {
            position: relative;
            display: grid;
            place-items: center;
            width: 160px;
            height: 160px;
            margin-bottom: 4px;
            flex: 0 0 auto;
            line-height: 0;
            isolation: isolate;
        }

        .subjects-progress-ring-container::after {
            content: '';
            position: absolute;
            inset: 14px;
            border-radius: 50%;
            background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
            box-shadow: inset 0 0 24px rgba(102, 126, 234, 0.08);
            z-index: 0;
        }

        .subjects-progress-ring-svg {
            position: relative;
            z-index: 1;
            display: block;
            width: 100%;
            height: 100%;
            overflow: visible;
            transform: rotate(-90deg);
            transform-origin: center;
        }

        .subjects-progress-ring-track {
            fill: none;
            stroke: #e2e8f0;
            stroke-width: 8;
            vector-effect: non-scaling-stroke;
        }

        .subjects-progress-ring-progress {
            fill: none;
            stroke-width: 8;
            stroke-linecap: round;
            transition: stroke-dashoffset 2s ease;
            filter: drop-shadow(0 3px 10px rgba(118, 75, 162, 0.18));
            vector-effect: non-scaling-stroke;
        }

        .subjects-progress-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.15rem;
            width: 104px;
            text-align: center;
            z-index: 2;
        }

        .subjects-progress-percentage {
            font-size: 2.15rem;
            font-weight: 700;
            color: #667eea;
            line-height: 1;
            animation: zoomIn 1s ease-out 0.5s both;
        }

        .subjects-progress-label {
            font-size: 0.78rem;
            color: #718096;
            line-height: 1.1;
            white-space: nowrap;
        }

        .subjects-progress-target {
            font-size: 0.92rem;
            font-weight: 600;
            color: #718096;
            line-height: 1;
        }
        
        @keyframes zoomIn {
            from {
                opacity: 0;
                transform: scale(0);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        .stats-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-bottom: 18px;
        }

        .stat-card {
            background: linear-gradient(135deg, #e0e7ff 0%, #f3e7ff 100%);
            padding: 16px;
            border-radius: 14px;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .stat-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
        }
        
        .stat-icon {
            width: 40px;
            height: 40px;
            background: white;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 8px;
            font-size: 1.1rem;
            color: #667eea;
            box-shadow: 0 4px 10px rgba(102, 126, 234, 0.2);
        }
        
        .stat-value {
            font-size: 1.2rem;
            font-weight: 600;
            color: #5a67d8;
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: 0.8rem;
            color: #6c757d;
        }

        .subjects-hero .progress-card .stats-container .stat-label {
            color: #5a67d8;
            opacity: 1;
        }
        
        .remaining-questions {
            background: linear-gradient(135deg, #fff5f5, #ffeded);
            border: 1px solid #fee;
            padding: 14px 16px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.3s ease;
        }
        
        .remaining-questions:hover {
            box-shadow: 0 5px 15px rgba(255, 107, 107, 0.1);
            transform: translateX(5px);
        }
        
        .question-icon {
            width: 42px;
            height: 42px;
            background: linear-gradient(135deg, #ff6b6b, #ee5a24);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.2rem;
            flex-shrink: 0;
            animation: shake 2s ease-in-out infinite;
        }
        
        @keyframes shake {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-5deg); }
            75% { transform: rotate(5deg); }
        }
        
        .question-info {
            flex: 1;
        }
        
        .question-count {
            font-size: 1.1rem;
            font-weight: 600;
            color: #d63031;
            margin-bottom: 2px;
        }

        .question-label {
            font-size: 0.82rem;
            color: #636e72;
        }
        
        /* Particules animées */
        .particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: #667eea;
            border-radius: 50%;
            opacity: 0.6;
            animation: float-particle 10s infinite ease-in-out;
        }
        
        .particle:nth-child(1) { left: 10%; animation-delay: 0s; }
        .particle:nth-child(2) { left: 30%; animation-delay: 2s; }
        .particle:nth-child(3) { left: 50%; animation-delay: 4s; }
        .particle:nth-child(4) { left: 70%; animation-delay: 6s; }
        .particle:nth-child(5) { left: 90%; animation-delay: 8s; }
        
        @keyframes float-particle {
            0%, 100% {
                transform: translateY(0) scale(1);
                opacity: 0;
            }
            10% {
                opacity: 0.6;
            }
            50% {
                transform: translateY(-100px) scale(1.5);
                opacity: 0.3;
            }
            90% {
                opacity: 0;
            }
        }
        
        /* Responsive */
        @media (max-width: 480px) {
            .progress-card {
                padding: 25px;
            }

            .global-badge {
                padding: 6px 12px;
                font-size: 0.74rem;
            }

            .header-section {
                min-height: 0;
            }

            .header-top-row {
                flex-direction: column;
                align-items: stretch;
                gap: 0.75rem;
            }

            .header-top-row .global-badge {
                align-self: flex-start;
            }
            
            .card-title {
                font-size: 1.5rem;
                max-width: none;
            }
            
            .score-number {
                font-size: 2.5rem;
            }
            
            .circular-progress {
                margin-bottom: 18px;
            }

            .subjects-progress-ring-container {
                width: 150px;
                height: 150px;
            }

            .subjects-progress-ring-svg {
                width: 100%;
                height: 100%;
            }

            .subjects-progress-ring-container::after {
                inset: 12px;
            }

            .subjects-progress-content {
                width: 96px;
            }
            
            .subjects-progress-percentage {
                font-size: 2rem;
            }
            
            .stats-container {
                grid-template-columns: 1fr;
            }
        }
