/* style.css */
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 导航栏容器 */
.navbar {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 网站标题 */
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.logo span {
    color: #ffde7d;
}

/* 导航链接 */
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

/* 下载链接样式 */
a[download] {
    text-decoration: none;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ffde7d;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主要内容区域 */
.admin-container { max-width: 1200px; margin: 20px auto; }

.user-stat-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    animation: slide-in 0.6s ease-out;
}

.user-stat-card .stat-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    opacity: 0.8;
}

.user-stat-card .stat-content h3 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

.user-stat-card .stat-content p {
    color: #7f8c8d;
    font-size: 1.8rem;
    font-weight: bold;
}

/* 关于页面样式 */
.about-section {
    background: white;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.about-header {
    text-align: center;
    margin-bottom: 2rem;
}

.about-header h1 {
    color: #6e8efb;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* 权限错误提示动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.permission-denied {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6e8efb33, #a777e333);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.6s ease-out;
}

.error-animation {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(231, 76, 60, 0.2);
    transform-origin: center;
    animation: bounce 2s ease-in-out infinite;
}

.error-animation h2 {
    color: #e74c3c;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.super-admin {
    color: #ff6b6b;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.normal-admin {
    color: #4ecdc4;
    font-weight: bold;
}

.about-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.about-card {
    background: #f9f9ff;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #a777e3;
}

.about-card h3 {
    color: #6e8efb;
    margin-bottom: 1rem;
}

.features {
    margin-top: 2rem;
}

.features h2 {
    color: #6e8efb;
    margin-bottom: 1.5rem;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item h3 {
    color: #a777e3;
    margin-bottom: 0.8rem;
}

.feature-item .icon {
    font-size: 2rem;
    color: #6e8efb;
    margin-bottom: 1rem;
}

/* 提交区块样式 */
.submit-section {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(110, 142, 251, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e8e9ff;
}

.submit-section button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background-color: #e9ecef;
}

/* 搜索区块样式 */
.search-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 25px 0;
}

/* 区块分隔线 */
.section-divider {
    margin: 35px 0;
    border: 0;
    border-top: 2px dashed #e8e9ff;
}

/* Toast通知样式 */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    min-width: 280px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #4CAF50;
}

.toast.error {
    border-left: 4px solid #F44336;
}

.toast-icon {
    font-size: 20px;
    margin-right: 12px;
}

.close-btn {
    cursor: pointer;
    margin-left: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.toast.success {
    background: #4CAF50;
    color: white;
}

.toast.error {
    background: #e74c3c;
    color: white;
}

.toast.hide {
    animation: toastOut 0.3s ease forwards;
}

.toast-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.toast-icon {
    font-size: 20px;
    margin-right: 12px;
}

.close-btn {
    margin-left: auto;
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 0.8;
}

.card-content-wrap {
  max-height: 1000px;
  opacity: 1;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  padding-top: 45px;
}

.code-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.author {
    background: linear-gradient(135deg, #4a90e2 0%, #50e3c2 100%);
    padding: 4px 12px;
    border-radius: 15px;
    color: white;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: slideIn 0.5s ease-out;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-size: 200% auto;
}

.author:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(74, 144, 226, 0.2);
    background-position: right center;
}

.section-divider {
  transition: opacity 0.3s ease;
}
/* 下拉菜单样式 */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    max-width: 200px;
    background: rgba(255,255,255,0.98);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    padding: 8px;
    gap: 12px;
    min-width: 120px;
    white-space: nowrap;
    flex-direction: column;
}

.dropdown-container:hover .dropdown-menu {
    display: flex !important;
    animation: slideDown 0.3s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, #E6E6FA, #a777e3);
    color: white !important;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dropdown-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,255,0.2);
    opacity: 0.95;
}

.dropdown-item:hover {
    background: #E6E6FA;
    color: #6e8efb;
}

.dropdown-container:hover .dropdown-menu {
    display: block;
}

.logout-btn {
    cursor: pointer;
    position: relative;
}

.dropdown-arrow {
    font-size: 12px;
    margin-left: 5px;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        max-width: 100%;
        box-shadow: none;
    }
    
    .dropdown-item {
        padding: 10px 15px;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 保持原有toast动画不变 */
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 复制按钮样式 */
.copy-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #6e8efb;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #a777e3;
}

.copy-success {
    position: absolute;
    right: 10px;
    top: 40px;
    background: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s, fadeOut 0.3s 1.7s;
}

.copy-success {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 8px 12px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
    z-index: 100;
}

.toast.error {
    background-color: #f44336;
}

.close-btn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: #ddd;
}

@keyframes slideIn {
    from {transform: translateX(100%);}
    to {transform: translateX(0);}
}

@keyframes fadeOut {
    from {opacity: 1;}
    to {opacity: 0;}
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #6e8efb, #a777e3);
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .menu-btn {
        display: block;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-header h1 {
        font-size: 2rem;
    }
}

/* 添加以下新样式 */
.page-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 外部链接图标提示 */
.nav-link[target="_blank"]::after {
    content: "";
}

.dropdown-menu {
    flex-direction: row;
    flex-wrap: nowrap;
    min-width: max-content;
    padding: 8px 12px;
}

.dropdown-item {
    white-space: nowrap;
    margin: 0 6px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white !important;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dropdown-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 0.95;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #6e8efb;
}

.dropdown-container:hover .dropdown-menu {
    display: block;
}

.logout-btn {
    cursor: pointer;
    position: relative;
}

.dropdown-arrow {
    font-size: 12px;
    margin-left: 5px;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        max-width: 100%;
        box-shadow: none;
    }
    
    .dropdown-item {
        padding: 10px 15px;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 保持原有toast动画不变 */
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 复制按钮样式 */
.copy-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #6e8efb;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #a777e3;
}

.copy-success {
    position: absolute;
    right: 10px;
    top: 40px;
    background: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s, fadeOut 0.3s 1.7s;
}

.copy-success {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 8px 12px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
    z-index: 100;
}

.toast.error {
    background-color: #f44336;
}

.close-btn {
    margin-left: 15px;
    color: white;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: #ddd;
}

@keyframes slideIn {
    from {transform: translateX(100%);}
    to {transform: translateX(0);}
}

@keyframes fadeOut {
    from {opacity: 1;}
    to {opacity: 0;}
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #6e8efb, #a777e3);
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .menu-btn {
        display: block;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-header h1 {
        font-size: 2rem;
    }
}

/* 添加以下新样式 */
.page-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 外部链接图标提示 */
.nav-link[target="_blank"]::after {
    content: "";
}

