html {
    pointer-events: none;
}

html * {
    pointer-events: auto;
}

#devtools-detect {
    display: none;
}

@media screen and (min-width: 0px) and (max-width: 1000px) {
    #devtools-detect {
        display: block;
    }
}

#encrypted-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

#loader {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.alert {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px;
    margin: 15px 0;
    color: #5d4037;
    border-radius: 0 4px 4px 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
        'Open Sans', 'Helvetica Neue', sans-serif;
    color: #424242;
    background-color: #fafafa;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: #1565c0;
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 1em 0 0.8em;
    color: #2c3e50;
    line-height: 1.3;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 600;
}

h1 {
    font-size: 2rem;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 0.5em;
    font-weight: 700;
    color: #1a237e;
    margin-top: 0;
}

h2 {
    font-size: 1.7rem;
    color: #283593;
    padding-left: 0;
}

h3 {
    font-size: 1.4rem;
    color: #303f9f;
}

h4 {
    font-size: 1.2rem;
    color: #3949ab;
}

h5 {
    font-size: 1rem;
    color: #3f51b5;
}

h6 {
    font-size: 0.9rem;
    color: #5c6bc0;
}

p {
    margin: 0.8em 0;
    word-wrap: break-word;
    color: #455a64;
}

ul,
ol {
    margin: 0.8rem 0;
    padding-left: 1.8rem;
}

li {
    margin: 0.4rem 0;
    font-weight: 400;
    color: #455a64;
}

blockquote {
    border-left: 4px solid #2196f3;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    color: #37474f;
    background-color: #e3f2fd;
    font-size: 1em;
    font-weight: 400;
    border-radius: 0 6px 6px 0;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    margin: 0;
}

th,
td {
    border: 1px solid #e0e0e0;
    padding: 14px 16px;
    text-align: left;
}

th {
    background-color: #f5f7ff;
    font-weight: 600;
    color: #1a237e;
    white-space: nowrap;
    border-bottom: 2px solid #c5cae9;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

tr:hover {
    background-color: #f3f5ff;
}

pre {
    background-color: #f8f9fa;
    padding: 1.2rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    overflow-x: auto;
    line-height: 1.6;
    position: relative;
    border: 1px solid #e1e5e9;
}

code {
    font-family: 'SF Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    background-color: #f1f3f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    line-height: 1.6;
    vertical-align: baseline;
    color: #d32f2f;
}

pre code {
    background: none;
    padding: 0;
    color: #37474f;
}

details {
    margin: 1.2rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem;
    background: #fafafa;
}

summary {
    cursor: pointer;
    padding: 0.8rem 1rem;
    font-weight: 600;
    color: #1a237e;
    list-style: none;
    position: relative;
    background: #f5f7ff;
    border-radius: 4px;
    margin: -0.5rem;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '▶';
    position: absolute;
    right: 1rem;
    color: #5c6bc0;
    transition: transform 0.2s;
}

details[open]>summary::after {
    transform: rotate(90deg);
}

details[open] {
    background: white;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.2rem auto;
    border-radius: 6px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

p img,
li img,
td img {
    max-width: 90%;
    max-height: 300px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

:not(p):not(li):not(td)>img {
    max-width: 80%;
    max-height: 500px;
}

a img {
    max-width: 200px;
}

a:hover img {
    transform: scale(1.03);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.code-wrapper {
    position: relative;
}

.copy-btn {
    background: white;
    border: 1px solid #c5cae9;
    color: #3949ab;
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 500;
    transition: all 0.2s;
    opacity: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.copy-btn:hover {
    background: #3949ab;
    color: white;
    border-color: #3949ab;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(57, 73, 171, 0.3);
}

.copy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.copy-alert {
    position: fixed;
    top: 24px;
    right: 24px;
    background: white;
    color: #1a237e;
    padding: 12px 18px;
    border-radius: 6px;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #c5cae9;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    max-width: 220px;
}

.copy-alert.copy-success {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.copy-alert.copy-error {
    background: #f44336;
    color: white;
    border-color: #f44336;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* 图片放大覆盖层样式 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay.active {
    opacity: 1;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.image-overlay.active img {
    transform: scale(1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        margin: 0 12px;
        border-radius: 6px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .copy-alert {
        top: 16px;
        right: 16px;
        max-width: 180px;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .copy-btn {
        right: 8px;
        top: 8px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
        margin: 0 8px;
    }

    ul,
    ol {
        padding-left: 1.5rem;
    }

    th,
    td {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    pre {
        padding: 1rem;
    }
    
    blockquote {
        padding: 0.8rem 1rem;
        margin: 1.2rem 0;
    }
}

/* 添加一些微妙的动画效果 */
.container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 选中文本样式 */
::selection {
    background: #e3f2fd;
    color: #1a237e;
}

::-moz-selection {
    background: #e3f2fd;
    color: #1a237e;
}