/* Problem / comparison — glass cards, same language as pricing */
.problem-section {
    padding: 100px 0;
    background: transparent;
}

.problem-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.problem-label {
    color: var(--primary);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 1rem;
    display: block;
    font-weight: 600;
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 980px;
    margin: 0 auto;
}

.problem-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem 1.6rem 1.35rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    pointer-events: none;
}

.problem-card.bad::before {
    background: linear-gradient(90deg, transparent, rgba(248, 113, 113, 0.85), transparent);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.35);
}

.problem-card.good::before {
    background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.85), transparent);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
}

.problem-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.problem-card-title {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.problem-card-title > span {
    color: inherit;
}

.wpm-badge {
    font-family: var(--font-sans);
    font-weight: 600;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.bad .wpm-badge {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.good .wpm-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.code-block-preview {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.15rem 1.2rem;
    border-radius: 12px;
    min-height: 168px;
    color: #e2e8f0;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.8rem;
    position: relative;
    line-height: 1.65;
    letter-spacing: -0.01em;
    flex: 1;
}

html:not([data-theme="dark"]) .code-block-preview {
    background: rgba(15, 23, 42, 0.88);
}

.preview-meta {
    color: #94a3b8;
}

.preview-line,
.code-block-preview .preview-line {
    color: #e2e8f0;
}

.cursor-blink {
    display: inline-block;
    width: 1.5px;
    height: 0.95em;
    background: #60a5fa;
    border-radius: 1px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 1px;
}

.voice-cursor {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    margin-left: 6px;
    height: 13px;
    vertical-align: -2px;
}

.voice-cursor i {
    display: block;
    width: 2px;
    border-radius: 999px;
    background: #38bdf8;
    transform-origin: center bottom;
    animation: voice-pulse 1s ease-in-out infinite;
}

.voice-cursor i:nth-child(1) { height: 6px; animation-delay: 0s; }
.voice-cursor i:nth-child(2) { height: 12px; animation-delay: 0.12s; }
.voice-cursor i:nth-child(3) { height: 8px; animation-delay: 0.24s; }
.voice-cursor i:nth-child(4) { height: 10px; animation-delay: 0.36s; }

@keyframes voice-pulse {
    0%, 100% { transform: scaleY(0.45); opacity: 0.55; }
    50% { transform: scaleY(1); opacity: 1; }
}

.problem-footer {
    margin-top: 1rem;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    display: flex;
    gap: 0.45rem;
    align-items: center;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.problem-card.bad .problem-footer {
    color: #f87171;
}

.problem-card.good .problem-footer {
    color: #34d399;
}

.problem-footer svg {
    flex-shrink: 0;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .problem-grid {
        grid-template-columns: 1fr;
    }
}
