/* 全局样式 */
:root {
    --theme-color: #64B4FF;
    --theme-color-rgb: 100,180,255;
}

body {
    margin: 0;
    padding: 100px 40px 40px;
    font-family: "Segoe UI", sans-serif;

    /* 背景图，可替换路径或用网络图片 */
    background: url("assets/bg.png") no-repeat center center fixed;
    background-size: cover;

    color: #fff;
}

/* 标题：自适应优化 */
h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: clamp(20px, 6vw, 36px); /* 自动缩放 */
    line-height: 1.3;
    color: #fff;
    word-break: break-word; /* 长标题自动换行 */
    white-space: normal;
}

.navbar {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #f5f5f5;
    padding: 12px 20px;
    border-radius: 0;
    background: rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-wide {
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.nav-meta {
    color: #f5f5f5;
    font-size: 14px;
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
}

.logout-btn {
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
}

.logout-btn:hover {
    background: rgba(255,255,255,0.22);
}

/* 容器：竖列布局 */
.container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 首页介绍区域 */
.homepage-intro {
    max-width: 800px;
    margin: -20px auto 30px;
    padding: 20px 24px;
    background: rgba(var(--theme-color-rgb), 0.08);
    border: 1.5px solid rgba(var(--theme-color-rgb), 0.2);
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.homepage-intro p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    line-height: 1.6;
}

.refresh-stats-btn {
    padding: 8px 16px;
    background: rgba(var(--theme-color-rgb), 0.2);
    color: var(--theme-color);
    border: 1px solid rgba(var(--theme-color-rgb), 0.4);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.refresh-stats-btn:hover:not(:disabled) {
    background: rgba(var(--theme-color-rgb), 0.3);
    border-color: rgba(var(--theme-color-rgb), 0.6);
    transform: scale(1.05);
}

.refresh-stats-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounce 2s infinite;
}

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

.empty-title {
    margin: 16px 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.empty-desc {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.empty-link {
    color: var(--theme-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.empty-link:hover {
    color: #96d4ff;
    text-decoration: underline;
}

/* 卡片 */
.card {
    position: relative;
    background: rgba(var(--theme-color-rgb), 0.08);
    border: 1.5px solid rgba(var(--theme-color-rgb), 0.2);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.1), transparent);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    background: rgba(var(--theme-color-rgb), 0.12);
    border-color: rgba(var(--theme-color-rgb), 0.35);
    box-shadow: 0 12px 28px rgba(var(--theme-color-rgb), 0.15);
}

/* 波纹效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.4);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 卡片内容结构 */
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex: 1;
    word-break: break-word;
    line-height: 1.4;
}

.card-badge {
    flex-shrink: 0;
    background: rgba(var(--theme-color-rgb), 0.2);
    color: var(--theme-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(var(--theme-color-rgb), 0.3);
    transition: all 0.2s ease;
}

.card-badge.update-anim {
    animation: statsUpdate 0.4s ease;
}

@keyframes statsUpdate {
    0% {
        transform: scale(1);
        background: rgba(100, 180, 255, 0.2);
    }
    50% {
        transform: scale(1.15);
        background: rgba(76, 175, 80, 0.3);
        border-color: rgba(76, 175, 80, 0.5);
    }
    100% {
        transform: scale(1);
        background: rgba(100, 180, 255, 0.2);
    }
}

.card-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--theme-color-rgb), 0.1);
    position: relative;
    z-index: 1;
}

.card-arrow {
    font-size: 18px;
    color: rgba(var(--theme-color-rgb), 0.6);
    transition: all 0.2s ease;
}

.card:hover .card-arrow {
    color: var(--theme-color);
    transform: translateX(4px);
}

.auth-wrap {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: min(92vw, 420px);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 26px;
}

.auth-card label {
    font-size: 14px;
    color: #f8f8f8;
}

.auth-card input {
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    background: rgba(0,0,0,0.25);
    color: #fff;
    outline: none;
}

.auth-card input:focus {
    border-color: rgba(255,255,255,0.7);
}

.auth-card button {
    margin-top: 8px;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    cursor: pointer;
    background: rgba(255,255,255,0.9);
    color: #222;
}

.auth-card button:hover {
    background: #fff;
}

.auth-error {
    border: 1px solid rgba(255,80,80,0.5);
    background: rgba(255,80,80,0.16);
    color: #ffd6d6;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
}

.auth-hint {
    margin: 4px 0 0;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

.auth-success {
    border: 1px solid rgba(87, 255, 143, 0.45);
    background: rgba(87, 255, 143, 0.15);
    color: #dcffe7;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
}

.admin-wrap {
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.admin-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 14px;
    padding: 18px;
}

.admin-card h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.admin-form {
    display: grid;
    gap: 10px;
}

.admin-form label {
    font-size: 14px;
}

.admin-form input {
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    background: rgba(0,0,0,0.25);
    color: #fff;
    outline: none;
}

.admin-form button,
.danger-btn {
    width: fit-content;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    background: rgba(255,255,255,0.9);
    color: #222;
}

.danger-btn {
    background: rgba(255,80,80,0.9);
    color: #fff;
}

.btn-reset-stats {
    background: rgba(255, 160, 0, 0.85) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 160, 0, 0.5) !important;
    transition: all 0.2s ease;
}

.btn-reset-stats:hover {
    background: rgba(255, 160, 0, 0.95) !important;
    transform: translateY(-1px);
}

.admin-list {
    display: grid;
    gap: 10px;
}

.admin-row {
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.link-admin-row {
    display: block;
}

.link-form-new,
.link-form-edit {
    display: grid;
    gap: 10px;
}

.link-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 8px;
}

.link-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

/* 透明风格的链接操作按钮 */
.btn-link-action {
    padding: 7px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.btn-link-action:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-save {
    border-color: rgba(var(--theme-color-rgb), 0.5);
    background: rgba(var(--theme-color-rgb), 0.12);
    color: var(--theme-color);
}

.btn-save:hover {
    border-color: rgba(var(--theme-color-rgb), 0.8);
    background: rgba(var(--theme-color-rgb), 0.25);
    box-shadow: 0 4px 12px rgba(var(--theme-color-rgb), 0.3);
}

.btn-reset {
    border-color: rgba(255, 160, 0, 0.5);
    background: rgba(255, 160, 0, 0.12);
    color: #ffa726;
}

.btn-reset:hover {
    border-color: rgba(255, 160, 0, 0.8);
    background: rgba(255, 160, 0, 0.25);
    box-shadow: 0 4px 12px rgba(255, 160, 0, 0.3);
}

.btn-delete {
    border-color: rgba(255, 80, 80, 0.5);
    background: rgba(255, 80, 80, 0.12);
    color: #ff6b6b;
}

.btn-delete:hover {
    border-color: rgba(255, 80, 80, 0.8);
    background: rgba(255, 80, 80, 0.25);
    box-shadow: 0 4px 12px rgba(255, 80, 80, 0.3);
}

.btn-move {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

.btn-move:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.15);
}

/* 链接管理行容器 */
.link-admin-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.reset-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reset-form input {
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 14px;
    background: rgba(0,0,0,0.25);
    color: #fff;
    outline: none;
}

/* 圆角玻璃风右键/长按菜单 */
#customMenu {
    position: fixed;
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    display: none;
    z-index: 99999;

    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);

    transition: 0.2s ease;

    /* 防止超出屏幕 */
    max-width: 90vw;
    max-height: 90vh;
    overflow-wrap: break-word;
    word-break: break-word;
}

#customMenu:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

/* 响应式优化：手机端 */
@media (max-width: 900px) {
    .container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 600px) {
    body {
        padding: 85px 16px 20px;
    }
    .container {
        max-width: 100%;
        padding: 0;
        grid-template-columns: 1fr;
    }
    .card {
        padding: 18px;
        margin-bottom: 0;
    }
    .homepage-intro {
        margin: 0 0 24px;  /* 移除负边距，增加与标题的间距 */
        padding: 16px 18px;
        gap: 10px;
    }
    
    .homepage-intro p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .refresh-stats-btn {
        width: 100%;
        font-size: 13px;
        padding: 10px 14px;
    }
    
    h1 {
        font-size: 22px;
        margin-bottom: 24px;  /* 增加底部间距 */
        line-height: 1.3;
        padding: 0 8px;  /* 添加左右内边距，避免贴边 */
    }

    .navbar {
        width: 100%;
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 10px 12px;
        gap: 8px;
    }

    .top-actions {
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .navbar a,
    .navbar button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* 卡片在手机端优化 */
    .card-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .card-title {
        font-size: 16px;
        flex: 1 1 100%;
    }
    
    .card-badge {
        font-size: 12px;
    }
    
    .card-desc {
        font-size: 13px;
        line-height: 1.5;
    }

    .auth-card {
        padding: 18px;
    }

    .admin-card {
        padding: 14px;
    }

    .admin-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }

    .admin-row-actions,
    .reset-form {
        width: 100%;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-badge {
        align-self: flex-start;
    }
    
    /* 链接管理按钮手机端优化 */
    .link-actions {
        justify-content: flex-start;
        gap: 6px;
    }
    
    .btn-link-action {
        padding: 8px 12px;
        font-size: 12px;
        flex: 0 1 auto;
    }
    
    /* 表单输入框手机端优化 */
    .link-grid input {
        font-size: 14px;
        padding: 10px;
    }
    
    /* 链接统计区域手机端优化 */
    .link-stats {
        gap: 8px;
        margin-bottom: 6px;
    }
    
    .stat-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .stat-time {
        font-size: 11px;
    }
    
    /* 表单组手机端优化 */
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    /* 管理卡片手机端优化 */
    .admin-wrap {
        padding: 16px;
    }
    
    /* 空状态手机端优化 */
    .empty-state {
        padding: 30px 20px;
    }
    
    .empty-icon {
        font-size: 48px;
    }
    
    .empty-title {
        font-size: 16px;
    }
    
    .empty-desc {
        font-size: 13px;
    }
    
    /* 表格手机端优化 - 横向滚动 */
    .logs-panel {
        padding: 12px;
        max-height: 400px;
    }
    
    .logs-table {
        font-size: 11px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .logs-table thead,
    .logs-table tbody,
    .logs-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .logs-table th,
    .logs-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    /* IP 黑名单表格手机端优化 */
    .blacklist-table {
        font-size: 11px;
        display: block;
        overflow-x: auto;
    }
    
    .blacklist-table th,
    .blacklist-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
}

/* 访问统计徽章 */
.link-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.stat-badge {
    background: rgba(var(--theme-color-rgb), 0.3);
    color: var(--theme-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid rgba(var(--theme-color-rgb), 0.5);
}

.stat-count {
    font-weight: 700;
    display: inline-block;
    min-width: 20px;
    text-align: center;
    transition: all 0.1s ease;
}

.stat-count.stat-update {
    animation: statUpdate 0.4s ease;
}

@keyframes statUpdate {
    0% {
        transform: scale(1);
        color: #64b5ff;
    }
    50% {
        transform: scale(1.3);
        color: #4caf50;
    }
    100% {
        transform: scale(1);
        color: #64b5ff;
    }
}

.stat-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* 操作日志面板 */
.logs-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.logs-panel h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #fff;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.logs-table thead {
    background: rgba(255, 255, 255, 0.1);
}

.logs-table th {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    font-weight: 600;
}

.logs-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.logs-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* 空日志状态 */
.empty-logs {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-logs p {
    font-size: 16px;
    margin: 0;
}

/* 管理员控制按钮组 */
.admin-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-controls form {
    margin: 0;
}

.admin-controls button {
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s ease;
    border: none;
    outline: none;
}

/* 按钮样式 - 主色 */
.btn-primary {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.5), rgba(var(--theme-color-rgb), 0.35));
    color: #fff;
    border: 1.5px solid rgba(var(--theme-color-rgb), 0.7);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.7), rgba(var(--theme-color-rgb), 0.55));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--theme-color-rgb), 0.3);
}

/* 按钮样式 - 次色 */

/* ========== 自定义确认对话框 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 30, 35, 0.98), rgba(25, 25, 30, 0.98));
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-width: 380px;
    max-width: 500px;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.2s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.2s ease;
    min-width: 80px;
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.modal-btn-ok {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.5), rgba(var(--theme-color-rgb), 0.35));
    border: 1.5px solid rgba(var(--theme-color-rgb), 0.7);
    color: #fff;
}

.modal-btn-ok:hover {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.7), rgba(var(--theme-color-rgb), 0.55));
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--theme-color-rgb), 0.4);
}

/* 响应式 */
@media (max-width: 768px) {
    .modal-content {
        min-width: auto;
        width: 90%;
        max-width: 400px;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-btn {
        width: 100%;
    }
}
.btn-secondary {
    background: rgba(100, 150, 200, 0.3);
    color: #96b4ff;
    border: 1px solid rgba(100, 150, 200, 0.5);
}

.btn-secondary:hover {
    background: rgba(100, 150, 200, 0.5);
    transform: translateY(-1px);
}

/* 按钮样式 - 危险操作 */
.btn-danger {
    background: rgba(255, 80, 80, 0.3);
    color: #ff6b6b;
    border: 1px solid rgba(255, 80, 80, 0.5);
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s ease;
}

.btn-danger:hover {
    background: rgba(255, 80, 80, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 80, 80, 0.3);
}

/* 新增链接表单 */
.link-form-new {
    background: rgba(var(--theme-color-rgb), 0.08);
    border: 1.5px solid rgba(var(--theme-color-rgb), 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    display: none;
}

.link-form-new:not(.hidden) {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.form-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-title::before {
    content: "✨";
    font-size: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
}

.required {
    color: #ff6b6b;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(var(--theme-color-rgb), 0.4);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 14px;
    transition: 0.2s ease;
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(var(--theme-color-rgb), 0.8);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 8px rgba(var(--theme-color-rgb), 0.2);
}

.btn-add-link {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.5), rgba(var(--theme-color-rgb), 0.35));
    color: #fff;
    border: 1.5px solid rgba(var(--theme-color-rgb), 0.7);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    margin-top: 8px;
}

.btn-add-link:hover {
    background: linear-gradient(135deg, rgba(var(--theme-color-rgb), 0.7), rgba(var(--theme-color-rgb), 0.55));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--theme-color-rgb), 0.3);
}

/* 隐藏类 */
.hidden {
    display: none !important;
}
