.diff-hero {
    background: linear-gradient(135deg, #f1f5ff 0%, #eef2ff 50%, #f8fafc 100%);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 24px;
    padding: 42px 36px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}

.diff-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.12), transparent 55%),
                radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.08), transparent 60%);
    pointer-events: none;
}

.diff-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.diff-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(37, 99, 235, 0.18);
    color: #1d4ed8;
    font-weight: 600;
    margin-bottom: 18px;
}

.diff-hero h1 {
    font-size: 2.4rem;
    margin-bottom: 16px;
    color: #0f172a;
}

.diff-hero-subtitle {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 24px;
    line-height: 1.75;
}

.diff-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

.diff-hero-actions .btn-secondary {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    border-color: transparent;
}

.diff-hero-actions .btn-secondary:hover {
    background: rgba(37, 99, 235, 0.16);
}

.diff-hero-cards {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

@media (min-width: 992px) {
    .diff-hero {
        display: flex;
        justify-content: space-between;
        gap: 32px;
    }

    .diff-hero-cards {
        max-width: 360px;
    }
}

.diff-hero-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.diff-hero-card h2 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: #1e293b;
}

.diff-hero-card p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
}

.diff-feature-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 36px;
}

@media (min-width: 768px) {
    .diff-feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.diff-feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.diff-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(14, 165, 233, 0.2));
    display: grid;
    place-items: center;
    font-size: 1.4rem;
}

.diff-feature-card h3 {
    font-size: 1.2rem;
    margin: 0;
    color: #0f172a;
}

.diff-feature-card p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
}

.diff-workbench {
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.18);
    margin-bottom: 32px;
}

.diff-workbench-header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.diff-workbench h2 {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #0f172a;
}

.diff-workbench p {
    color: #64748b;
    margin: 0;
}

.diff-chip {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.12));
    color: #1d4ed8;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}

.diff-chip.is-info {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.12));
    color: #1d4ed8;
}

.diff-chip.is-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(59, 130, 246, 0.12));
    color: #0f766e;
}

.diff-chip.is-warning {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(251, 191, 36, 0.16));
    color: #b45309;
}

.diff-chip.is-danger {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.2), rgba(190, 24, 93, 0.18));
    color: #be123c;
}

.diff-input-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 992px) {
    .diff-input-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.diff-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.diff-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.diff-card-header h3 {
    margin-bottom: 6px;
    font-size: 1.3rem;
    color: #1e293b;
}

.diff-card-header p {
    margin: 0;
    color: #64748b;
}

.diff-metrics {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    padding: 8px 16px;
    border-radius: 999px;
}

.diff-textarea {
    min-height: 240px;
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #fff;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Menlo, monospace;
    font-size: 0.98rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.diff-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background: #fff;
}

.diff-textarea.is-dragging {
    border-style: dashed;
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.08);
}

.diff-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.diff-button-group {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.diff-hint {
    font-size: 0.85rem;
}

.diff-ghost-btn {
    background: rgba(148, 163, 184, 0.15);
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.diff-ghost-btn:hover {
    background: rgba(148, 163, 184, 0.25);
}

.diff-outline-btn {
    background: transparent;
    border: 1px solid rgba(37, 99, 235, 0.35);
    color: #2563eb;
}

.diff-outline-btn:hover {
    background: rgba(37, 99, 235, 0.08);
}

.diff-action-card {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 20px;
    border: none;
    gap: 18px;
}

.diff-action-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.diff-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.diff-action-buttons .btn {
    border-radius: 12px;
}

.diff-action-options {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.diff-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.diff-toggle input {
    accent-color: #38bdf8;
    transform: scale(1.1);
}

.diff-action-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.diff-result-section {
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
    margin-bottom: 36px;
}

.diff-result-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.diff-result-header h2 {
    margin-bottom: 6px;
    color: #0f172a;
}

.diff-result-header p {
    margin: 0;
    color: #64748b;
}

.diff-summary {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

.diff-summary-badge {
    background: rgba(148, 163, 184, 0.18);
    color: #1e293b;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.diff-summary-positive {
    background: rgba(22, 163, 74, 0.16);
    color: #166534;
}

.diff-summary-negative {
    background: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}

.diff-summary-modified {
    background: rgba(37, 99, 235, 0.16);
    color: #1d4ed8;
}

.diff-summary-neutral {
    background: rgba(14, 165, 233, 0.18);
    color: #0f766e;
}

.diff-result-body {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: #f8fafc;
    min-height: 220px;
    overflow: hidden;
}

.diff-lines {
    max-height: 520px;
    overflow: auto;
}

.diff-line {
    display: grid;
    grid-template-columns: 70px 70px 1fr;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    align-items: flex-start;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Menlo, monospace;
    font-size: 0.95rem;
}

.diff-line:last-child {
    border-bottom: none;
}

.diff-line-number {
    font-weight: 600;
    color: #94a3b8;
}

.diff-line-content {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
}

.diff-line--equal {
    background: rgba(241, 245, 249, 0.6);
}

.diff-line--added {
    background: rgba(187, 247, 208, 0.4);
}

.diff-line--removed {
    background: rgba(254, 202, 202, 0.4);
}

.diff-line--modified {
    background: rgba(191, 219, 254, 0.45);
}

.diff-char-added {
    background: rgba(34, 197, 94, 0.32);
}

.diff-char-removed {
    background: rgba(248, 113, 113, 0.35);
    text-decoration: line-through;
}

.diff-char-neutral {
    background: transparent;
}

.diff-empty-state {
    padding: 48px 24px;
    text-align: center;
    color: #94a3b8;
    display: grid;
    place-items: center;
    gap: 12px;
}

.diff-empty-icon {
    font-size: 2.4rem;
}

.diff-guide {
    margin-bottom: 36px;
}

.diff-guide h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #0f172a;
}

.diff-guide-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 992px) {
    .diff-guide-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.diff-guide-card {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.diff-guide-card h3 {
    margin-bottom: 14px;
}

.diff-guide-card ol,
.diff-guide-card ul {
    margin: 0;
    padding-left: 20px;
    color: #475569;
    line-height: 1.6;
}

.diff-guide-card li {
    margin-bottom: 8px;
}

.diff-recommendations {
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .diff-hero {
        padding: 32px 24px;
    }

    .diff-workbench {
        padding: 24px;
    }

    .diff-result-section {
        padding: 24px;
    }

    .diff-line {
        grid-template-columns: 56px 56px 1fr;
        font-size: 0.88rem;
        padding: 12px 14px;
    }
}
