.content-error {
    color: #ef5350;
    text-align: center;
    padding: 20px;
}

.markdown-content {
    color: #eaeaea;
    line-height: 1.65;
    font-size: 15px;
    word-break: break-word;
}

.markdown-content ::selection {
    background: rgba(30, 136, 229, 0.35);
}

.markdown-content ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.markdown-content ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.35);
}

.markdown-content ::-webkit-scrollbar-thumb {
    background: rgba(30, 136, 229, 0.55);
    border-radius: 6px;
}

.markdown-content ::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 136, 229, 0.8);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #fff;
    margin: 24px 0 12px;
    line-height: 1.3;
}

.markdown-content h1 { font-size: 2em; border-bottom: 1px solid rgba(30, 136, 229, 0.25); padding-bottom: 8px; }
.markdown-content h2 { font-size: 1.7em; border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 6px; }
.markdown-content h3 { font-size: 1.4em; color: #90caf9; }
.markdown-content h4 { font-size: 1.2em; }

.markdown-content p {
    margin-bottom: 14px;
    color: #ccc;
}

.markdown-content strong {
    color: #fff;
}

.markdown-content em {
    font-style: italic;
    color: #bbb;
}

.markdown-content del {
    opacity: 0.7;
}

.markdown-content mark {
    background: rgba(30, 136, 229, 0.25);
    padding: 2px 4px;
    border-radius: 4px;
    color: #fff;
}

.markdown-content a {
    color: #1e88e5;
    text-decoration: none;
    border-bottom: 1px solid rgba(30, 136, 229, 0.4);
    transition: color 0.2s, border-color 0.2s;
}

.markdown-content a:hover {
    color: #64b5f6;
    border-bottom-color: #64b5f6;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 22px;
    margin-bottom: 14px;
    color: #ccc;
}

.markdown-content li {
    margin-bottom: 6px;
}

.markdown-content input[type="checkbox"] {
    accent-color: #1e88e5;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.markdown-content blockquote {
    margin: 20px 0;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-left: 4px solid #1e88e5;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #bbb;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    border-radius: 8px;
    overflow: hidden;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
}

.markdown-content th {
    background: rgba(30, 136, 229, 0.15);
    color: #90caf9;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.05em;
}

.markdown-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.markdown-content hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 24px 0;
}

.markdown-content img {
    max-width: 100%;
    border-radius: 10px;
    display: block;
    margin: 16px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s;
}

.markdown-content img:hover {
    transform: scale(1.02);
}

.markdown-content details {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 14px 0;
}

.markdown-content summary {
    cursor: pointer;
    color: #1e88e5;
    font-weight: bold;
}

.markdown-content code {
    background: rgba(30, 136, 229, 0.12);
    color: #c792ea;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Fira Code', monospace;
    font-size: 0.9em;
}

.markdown-alert-title {
    color: #1e88e5 !important;
    fill: #1e88e5 !important;

    display: flex;
    align-items: center;
    gap: 8px;
}

.markdown-content pre {
    position: relative;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(14, 14, 14, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 36px 14px 14px 50px;
    margin: 18px 0;
    overflow-x: auto;
    font-size: 0.95em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 20px rgba(0, 0, 0, 0.35);
}

.markdown-content pre code {
    background: none;
    color: #ffcb6b;
    padding: 0;
}

.code-lang {
    position: absolute;
    top: 6px;
    left: 10px;
    font-size: 11px;
    letter-spacing: 1px;
    color: #90caf9;
    background: rgba(30, 136, 229, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(30, 136, 229, 0.25);
    text-transform: uppercase;
}

.copy-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 12px;
    padding: 4px 8px;
    background: rgba(30, 136, 229, 0.15);
    color: #90caf9;
    border: 1px solid rgba(30, 136, 229, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(30, 136, 229, 0.35);
}

.code-lines {
    position: absolute;
    left: 0;
    top: 36px;
    width: 36px;
    text-align: right;
    padding-right: 8px;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.85em;
    user-select: none;
    line-height: 1.5;
}

.code-lines span {
    display: block;
}

.token.comment { color: #7a6f60; font-style: italic; }
.token.keyword { color: #90caf9; }
.token.string { color: #a6e3a1; }
.token.number { color: #f2a272; }
.token.function { color: #8ec6ff; }
.token.operator { color: #64b5f6; }
.token.class-name { color: #8ec6ff; }
.token.punctuation { color: #888; }
