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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 左侧目录固定 */
.sidebar {
    width: 300px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-right: 1px solid rgba(100, 116, 139, 0.3);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
    overflow-y: auto;
}

.sidebar-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #f8fafc;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
}

.gradient-divider {
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    margin-bottom: 25px;
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.5);
}

.cert-list {
    list-style: none;
}

.cert-link {
    display: block;
    padding: 12px 15px;
    margin-bottom: 8px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cert-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-link:hover {
    transform: translateX(5px);
    background: rgba(99, 102, 241, 0.1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.cert-link:hover::before {
    opacity: 1;
}

.cert-link.active {
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.cert-link.active::before {
    opacity: 1;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.4), transparent);
}

/* 主内容区样式 */
.content {
    flex: 1;
    padding: 60px 80px 80px;
    overflow-y: auto;
    height: 100vh;
}

.cert-section {
    margin-bottom: 60px;
    scroll-margin-top: 80px;
}

.cert-card {
    width: 80vw;
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 四周发光边框 */
.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: -3px;
    left: 0;
    height: calc(100% + 3px);
    background: linear-gradient(135deg,
        #6366f1 0%,
        #8b5cf6 25%,
        #a78bfa 50%,
        #ec4899 75%,
        #6366f1 100%
    );
    background-size: 400% 400%;
    border-radius: 24px;
    z-index: -2;
    opacity: 0.4;
    filter: blur(12px);
    animation: borderFlow 4s ease infinite;
}

.cert-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-radius: 24px;
    z-index: -1;
}

@keyframes borderFlow {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.4;
    }
    50% {
        background-position: 100% 50%;
        opacity: 0.8;
    }
}

.cert-card:hover::before {
    opacity: 0.8;
    filter: blur(20px);
}

.cert-card:hover {
    transform: translateY(-8px);
}

.cert-header {
    padding: 25px 30px 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    position: relative;
}

.cert-title {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
    letter-spacing: 1px;
}

.sparkles {
    position: absolute;
    top: -10px;
    right: 20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    filter: blur(20px);
    opacity: 0.1;
    animation: sparkle 3s infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.2);
    }
}

.cert-image {
    padding: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: 12px;
    margin: 0 30px 20px;
}

.cert-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5),
                inset 0 0 30px rgba(255, 255, 255, 0.1);
    display: block;
    transition: all 0.3s ease;
    max-width: 100%;
    object-fit: contain;
}

.cert-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
                inset 0 0 50px rgba(255, 255, 255, 0.2);
}

.cert-info {
    padding: 20px 30px 30px;
}

.cert-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.cert-id {
    font-size: 15px;
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(100, 116, 139, 0.4);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.verify-link {
    margin-top: 10px;
}

.verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.verify-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.copy-btn {
    background: rgba(30, 150, 255, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(30, 150, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 15px rgba(56, 189, 248, 0.3);
}

.copy-btn:active {
    transform: translateY(1px);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6, #a78bfa);
}

/* 粒子效果 */
.particle {
    position: fixed;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    filter: blur(1px);
}

/* 图片放大查看器 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(20px);
}

.image-viewer.active {
    opacity: 1;
    visibility: visible;
}

.image-viewer img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8),
                0 0 60px rgba(99, 102, 241, 0.3);
    transform-origin: center center;
    transform: translate(0, 0) scale(1);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: zoom-in;
}

.image-viewer.active img {
    opacity: 1;
}

.viewer-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid rgba(99, 102, 241, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    z-index: 10001;
}

.viewer-close:hover {
    background: rgba(99, 102, 241, 0.4);
    transform: scale(1.1) rotate(90deg);
}

.viewer-close svg {
    width: 24px;
    height: 24px;
}

.cert-image img {
    cursor: zoom-in;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        display: block;
        overflow-y: auto;
        position: relative;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1000;
        padding-top: 60px;
    }

    .sidebar.active {
        left: 0;
    }

    .menu-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: rgba(99, 102, 241, 0.2);
        border: 2px solid rgba(99, 102, 241, 0.4);
        color: #fff;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
        transition: all 0.3s ease;
    }

    .menu-toggle:hover {
        background: rgba(99, 102, 241, 0.3);
        transform: scale(1.1);
    }

    .menu-toggle svg {
        width: 24px;
        height: 24px;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .content {
        padding: 20px;
        margin-left: 0 !important;
    }

    .cert-card {
        width: 95vw;
        max-width: 100%;
    }

    .viewer-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .viewer-close svg {
        width: 20px;
        height: 20px;
    }

    .image-viewer img {
        max-width: none;
        max-height: none;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .overlay {
        display: none;
    }
}
