/* Learn page styles */

.learn-page {
    max-width: 700px;
    margin: 0 auto;
}

.learn-header {
    margin-bottom: 1.5rem;
}

.learn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.difficulty-section {
    margin-bottom: 2rem;
}

.difficulty-section:last-child {
    margin-bottom: 0;
}

.difficulty-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

.difficulty-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    white-space: nowrap;
}

.difficulty-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.difficulty-section--beginner .difficulty-label { color: #22c55e; }

.difficulty-section--intermediate .difficulty-label { color: #eab308; }

.difficulty-section--advanced .difficulty-label { color: #ef4444; }

.categories-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-card {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.category-card.locked {
    opacity: 0.7;
    position: relative;
}

.category-card.locked .lessons-list {
    position: relative;
}

.premium-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border-radius: 0 0 0.75rem 0.75rem;
    z-index: 10;
}

.premium-lock-icon {
    font-size: 2rem;
    color: var(--accent);
}

.premium-lock-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 200px;
}

.premium-upgrade-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.premium-upgrade-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.premium-upgrade-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.category-card.locked .category-header {
    cursor: pointer;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
    color: white;
    border-radius: 1rem;
    font-weight: 600;
    vertical-align: middle;
}

.category-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
}

.category-header:hover {
    background: rgba(255,255,255,0.04);
}

.progress-ring {
    width: 56px;
    height: 56px;
    position: relative;
    flex-shrink: 0;
}

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

.progress-ring-bg {
    fill: none;
    stroke: #1f2937;
    stroke-width: 6;
}

.progress-ring-fill {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-fill.red { stroke: #ef4444; }

.progress-ring-fill.yellow { stroke: #eab308; }

.progress-ring-fill.green { stroke: #22c55e; }

.progress-ring-fill.gray { stroke: #6b7280; }

.progress-ring-fill.locked { stroke: #374151; }

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
    font-weight: 700;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.category-goal {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.category-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.category-expand {
    color: var(--text-muted);
    transition: transform 0.3s;
}

.category-card.expanded .category-expand {
    transform: rotate(180deg);
}

.lessons-list {
    display: none;
    padding: 0 1.25rem 1.25rem;
}

.category-card.expanded .lessons-list {
    display: block;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    margin-top: 0.5rem;
    background: rgba(255,255,255,0.03);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.lesson-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--border);
}

.lesson-ring {
    width: 40px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
}

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

.lesson-ring .progress-ring-bg {
    stroke-width: 4;
}

.lesson-ring .progress-ring-fill {
    stroke-width: 4;
}

.lesson-ring-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
}

.lesson-info {
    flex: 1;
    min-width: 0;
}

.lesson-name {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
}

.lesson-description {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.lesson-tag {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-weight: 500;
}

.lesson-tag.street {
    background: #3b82f6;
    color: white;
}

.lesson-tag.street.preflop { background: #8b5cf6; }

.lesson-tag.street.flop { background: #3b82f6; }

.lesson-tag.street.turn { background: #f59e0b; }

.lesson-tag.street.river { background: #ef4444; }

.lesson-tag.street.all { background: #6b7280; }

.lesson-tag.decayed {
    background: #6b7280;
    color: white;
}

.lesson-score {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.learn-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    flex: 1;
}

.learn-btn-primary {
    background: var(--accent);
    color: white;
}

.learn-btn-primary:hover {
    background: var(--accent-hover);
}

.learn-btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}

.learn-btn-secondary:hover {
    background: rgba(255,255,255,0.15);
}

.learn-empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    #lesson-modal.learn-modal-overlay {
        z-index: 1100;
    }
}

@media (max-width: 480px) {
    .summary-section {
        padding: 10px;
    }
    .summary-section h4 {
        font-size: 0.8rem;
    }
    .summary-section p {
        font-size: 0.8rem;
    }
}
