/**
 * 现代化Minecraft服务器发布页面样式
 * 基于2024-2025年设计趋势，采用大地色调和游戏化配色
 */

:root {
    /* 主要配色方案 - 受Minecraft启发的大地色调 */
    --primary-color: #2d5016;          /* 深草绿色 */
    --primary-light: #4a7c25;         /* 浅草绿色 */
    --primary-dark: #1a3009;          /* 更深的草绿色 */

    --secondary-color: #b8860b;        /* 金黄色（类似金块） */
    --secondary-light: #daa520;       /* 浅金色 */
    --secondary-dark: #8b6914;        /* 深金色 */

    --accent-color: #ff6b47;          /* 温暖的橙红色 */
    --accent-light: #ff8a73;         /* 浅橙色 */

    /* 状态颜色 */
    --success-color: #28a745;         /* 在线状态绿色 */
    --danger-color: #dc3545;          /* 离线状态红色 */
    --warning-color: #ffc107;         /* 警告黄色 */
    --info-color: #17a2b8;           /* 信息蓝色 */

    /* 中性色调 */
    --bg-color: #f8f9fa;             /* 浅灰背景 */
    --surface-color: #ffffff;        /* 卡片背景 */
    --text-primary: #2c3e50;         /* 主要文字颜色 */
    --text-secondary: #6c757d;       /* 次要文字颜色 */
    --text-muted: #adb5bd;           /* 静音文字颜色 */

    /* 边框和阴影 */
    --border-color: #dee2e6;         /* 边框颜色 */
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 32px rgba(0,0,0,0.2);

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    --gradient-hero: linear-gradient(135deg,
        rgba(45, 80, 22, 0.9),
        rgba(74, 124, 37, 0.8)),
        url('../head-bg.jpg');

    /* 动画时间 */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 全局样式重置和优化 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* 加载状态样式 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    z-index: 9999;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 现代化头部样式 */
.modern-header {
    position: relative;
    min-height: 70vh;
    background: var(--gradient-hero);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-repeat: no-repeat;
}

/* 背景图片预加载占位符 */
.modern-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 1;
    transition: opacity 1s ease-out;
    z-index: 0;
}

.modern-header.loaded::before {
    opacity: 0;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    transition: all 2s ease-out;
    z-index: 1;
}

/* 清晰状态的覆盖层 */
.modern-header.clear .header-overlay {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(0px) saturate(100%);
    -webkit-backdrop-filter: blur(0px) saturate(100%);
}

/* 毛玻璃效果增强 */
.header-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    opacity: 1;
    transition: opacity 2s ease-out;
    z-index: -1;
}

.modern-header.clear .header-overlay::before {
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 800px;
}

.header-content .project-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    animation: slideInUp 1s ease-out;
    position: relative;
}

.header-content .project-tagline {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    animation: slideInUp 1s ease-out 0.2s both;
    position: relative;
}

/* 当背景变清晰时，为文字添加更强的对比度 */
.modern-header.clear .header-content .project-name {
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.3);
}

.modern-header.clear .header-content .project-tagline {
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.2);
}

.header-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 1s ease-out 0.4s both;
}

/* 背景加载指示器 */
.bg-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 3;
    opacity: 1;
    transition: opacity 0.5s ease-out;
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bg-loading-indicator i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.bg-loading-indicator span {
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-align: center;
}

/* 清晰化指示器 */
.clarity-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
    z-index: 3;
    pointer-events: none;
}

.clarity-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.clarity-indicator i {
    margin-right: 0.5rem;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* 装饰性立方体动画 */
.header-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.floating-cube {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    animation: float 6s ease-in-out infinite;
}

.floating-cube:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-cube:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.floating-cube:nth-child(3) {
    bottom: 30%;
    left: 70%;
    animation-delay: 4s;
    animation-duration: 7s;
}

@keyframes float {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.3;
    }
    50% {
        transform: rotate(45deg) translateY(-20px);
        opacity: 0.8;
    }
}

/* 按钮样式升级 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-medium);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* 当背景变清晰时，调整按钮样式 */
.modern-header.clear .btn-secondary {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
}

.modern-header.clear .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.7);
}

.btn-close {
    background: var(--danger-color);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
}

.btn-warning {
    background: var(--warning-color);
    color: var(--text-primary);
}

/* 主内容区域现代化 */
.modern-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.section-title::after {
    content: '';
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    margin-left: 1rem;
}

.section-title i {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

/* 推荐服务器网格布局 */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* 服务器网格布局 */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* 服务器卡片样式 */
.server-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
}

.server-card.featured {
    border: 2px solid var(--secondary-color);
    background: linear-gradient(145deg, #fff, #f8f9fa);
}

.server-card.featured::before {
    background: var(--gradient-secondary);
    height: 6px;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.server-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    flex-grow: 1;
}

.server-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.server-status.online {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.server-status.offline {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-item {
    text-align: center;
    padding: 0.5rem;
    background: rgba(45, 80, 22, 0.05);
    border-radius: 8px;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.server-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.server-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.copy-btn {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

.download-btn {
    background: var(--success-color);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: #1e7e34;
    transform: translateY(-1px);
    text-decoration: none;
}

/* 服务器统计表格现代化 */
.server-stats {
    margin-top: 4rem;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.current-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    box-shadow: var(--shadow-light);
}

/* 桌面端表格样式 */
.table-container {
    background: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 0.9rem;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:hover {
    background: rgba(45, 80, 22, 0.03);
    transition: background-color var(--transition-fast);
}

/* 移动端卡片式统计布局 */
.stats-cards {
    display: none;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.stats-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-medium);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.stats-card-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.stats-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.stats-card-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stats-card-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stats-card-value {
    color: var(--text-primary);
    font-weight: 500;
}

.stats-card-address {
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-style: dotted;
}

.stats-card-address:hover {
    color: var(--primary-dark);
}

.stats-card-uptime {
    grid-column: 1 / -1;
    text-align: center;
    padding: 0.5rem;
    background: rgba(45, 80, 22, 0.05);
    border-radius: 6px;
    margin-top: 0.5rem;
}

/* 管理面板样式 */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    overflow-y: auto;
    padding: 2rem;
}

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    animation: slideInDown 0.5s ease-out;
}

.admin-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-tabs {
    display: flex;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all var(--transition-medium);
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
    background: var(--surface-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.tab-btn:hover:not(.active) {
    background: rgba(45, 80, 22, 0.05);
}

.tab-content {
    display: none;
    padding: 2rem;
}

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

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* 水平布局表单组 */
.form-group.form-horizontal {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-group.form-horizontal label {
    display: inline-block;
    margin-bottom: 0;
    min-width: 80px;
    flex-shrink: 0;
}

.form-group.form-horizontal input,
.form-group.form-horizontal select,
.form-group.form-horizontal textarea {
    flex: 1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: var(--surface-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* 页脚现代化 */
.modern-footer {
    background: var(--primary-dark);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    position: relative;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info a {
    color: var(--secondary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-info a:hover {
    color: white;
    text-decoration: underline;
}

.icp-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-actions .qq-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Toast 通知样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--success-color);
    color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    transform: translateX(400px);
    transition: transform var(--transition-medium);
    z-index: 10001;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: var(--danger-color);
}

.toast.warning {
    background: var(--warning-color);
    color: var(--text-primary);
}

/* 动画定义 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .modern-header {
        min-height: 60vh;
        background-attachment: scroll; /* 移动端禁用固定背景 */
    }

    .header-content {
        padding: 1.5rem;
        max-width: 100%;
    }

    .header-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .modern-content {
        padding: 2rem 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .section-title::after {
        width: 50px;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .featured-grid,
    .servers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .server-card {
        padding: 1.25rem;
        margin-bottom: 0;
    }

    .server-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .server-info {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .server-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .server-actions .btn,
    .copy-btn,
    .download-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .stats-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .current-time {
        order: -1;
        text-align: center;
    }

    /* 移动端隐藏表格，显示卡片 */
    .table-container {
        display: none;
    }

    .stats-cards {
        display: grid;
    }

    .stats-card {
        margin-bottom: 0;
    }

    .stats-card-body {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .stats-card-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .stats-card-item:last-child {
        border-bottom: none;
    }

    .stats-card-label {
        margin-bottom: 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-info {
        order: 1;
    }

    .footer-actions {
        order: 0;
    }

    .admin-panel {
        padding: 0.5rem;
    }

    .admin-container {
        margin: 0.5rem 0;
        max-height: 95vh;
        overflow-y: auto;
    }

    .admin-header {
        padding: 1.5rem 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .admin-header h2 {
        font-size: 1.25rem;
    }

    .admin-header-actions {
        justify-content: center;
        width: 100%;
    }

    .admin-tabs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .tab-btn.active::after {
        height: 3px;
        left: 0;
        right: 0;
        width: auto;
        top: auto;
        bottom: 0;
    }

    .tab-content {
        padding: 1.5rem 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    /* 移动端表单水平布局调整 */
    .form-group.form-horizontal {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .form-group.form-horizontal label {
        min-width: auto;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-actions .btn {
        width: 100%;
        max-width: none;
    }

    .server-form h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .servers-list h3 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .admin-server-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .server-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .server-item-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .server-item-actions {
        width: 100%;
    }

    .server-item-actions .btn {
        flex: 1;
    }

    .backup-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .backup-actions .btn {
        width: 200px;
        max-width: 100%;
    }

    .bg-loading-indicator {
        padding: 1.5rem 1rem;
        gap: 0.75rem;
    }

    .bg-loading-indicator i {
        font-size: 1.5rem;
    }

    .bg-loading-indicator span {
        font-size: 0.75rem;
        text-align: center;
    }

    .clarity-indicator {
        bottom: 10px;
        left: 10px;
        right: 10px;
        text-align: center;
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .floating-cube {
        display: none; /* 移动端隐藏装饰性元素 */
    }

    .toast {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .modern-header {
        min-height: 50vh;
    }

    .header-content {
        padding: 1rem;
    }

    .header-content .project-name {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .header-content .project-tagline {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .header-actions .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
        max-width: 180px;
    }

    .modern-content {
        padding: 1.5rem 0.75rem;
    }

    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .section-title i {
        font-size: 1.125rem;
    }

    .server-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .server-name {
        font-size: 1.125rem;
        line-height: 1.3;
    }

    .server-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .info-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 0.5rem 0.75rem;
    }

    .info-label {
        margin-bottom: 0;
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.875rem;
        text-align: right;
    }

    .server-description {
        font-size: 0.875rem;
        line-height: 1.4;
    }

    .server-actions {
        gap: 0.375rem;
    }

    .server-actions .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .modern-table {
        font-size: 0.7rem;
        min-width: 550px;
    }

    .modern-table th,
    .modern-table td {
        padding: 0.375rem 0.125rem;
    }

    .modern-table th:first-child,
    .modern-table td:first-child {
        max-width: 100px;
        font-size: 0.65rem;
    }

    .server-status {
        font-size: 0.7rem;
        padding: 0.125rem 0.5rem;
    }

    .current-time {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .modern-footer {
        padding: 1.5rem 0;
    }

    .footer-content {
        padding: 0 1rem;
        font-size: 0.875rem;
    }

    .icp-info {
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .footer-actions .qq-group {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }

    .admin-header {
        padding: 1rem;
    }

    .admin-header h2 {
        font-size: 1.125rem;
    }

    .admin-header-actions .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .tab-btn {
        font-size: 0.8rem;
        min-width: 100px;
        padding: 0.625rem 0.375rem;
    }

    .tab-content {
        padding: 1rem 0.75rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 0.625rem;
    }

    .admin-server-item {
        padding: 0.75rem;
    }

    .server-item-header h4 {
        font-size: 1rem;
        line-height: 1.3;
    }

    .server-item-info {
        font-size: 0.8rem;
    }

    .server-item-actions .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.125rem 0.375rem;
    }

    .backup-info {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .backup-info ul {
        padding-left: 1rem;
    }

    .backup-info li {
        font-size: 0.8rem;
    }

    .auth-dialog {
        width: 95%;
        margin: 1rem;
    }

    .auth-dialog-header {
        padding: 1rem;
    }

    .auth-dialog-header h3 {
        font-size: 1.125rem;
    }

    .auth-dialog-body {
        padding: 1rem;
    }

    .bg-loading-indicator {
        padding: 1.25rem 0.75rem;
        gap: 0.5rem;
    }

    .bg-loading-indicator i {
        font-size: 1.25rem;
    }

    .bg-loading-indicator span {
        font-size: 0.7rem;
    }

    .clarity-indicator {
        bottom: 10px;
        left: 10px;
        right: 10px;
        text-align: center;
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* 安全设置页面样式 */
.security-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.security-section:last-child {
    border-bottom: none;
}

.security-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all var(--transition-medium);
}

.status-item i {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

.status-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-content p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.status-success {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.status-warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--warning-color);
    color: #856404;
}

.status-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.device-info {
    margin-bottom: 1rem;
}

.device-info code {
    display: block;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 4px;
    word-break: break-all;
    font-size: 0.8rem;
}

.devices-header {
    margin-bottom: 1rem;
}

.devices-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all var(--transition-medium);
}

.device-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.device-item.current-device {
    background: rgba(40, 167, 69, 0.05);
    border-color: var(--success-color);
}

.device-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.device-info i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.device-details strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.device-details code {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: transparent;
    padding: 0;
}

.current-label {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.danger-zone {
    background: rgba(220, 53, 69, 0.02);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
}

.danger-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.danger-actions .btn {
    border: 2px solid currentColor;
}

.btn-warning {
    background: transparent;
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-warning:hover {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: transparent;
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: white;
}

@media (max-width: 768px) {
    .status-grid {
        grid-template-columns: 1fr;
    }

    .status-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .device-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .device-item .btn {
        width: 100%;
    }

    .danger-actions {
        flex-direction: column;
    }

    .danger-actions .btn {
        width: 100%;
    }
}

/* 打印样式 */
@media print {
    .header-decoration,
    .admin-panel,
    .btn,
    .server-actions,
    .footer-actions {
        display: none !important;
    }

    .modern-header {
        background: none;
        color: black;
        min-height: auto;
        padding: 2rem 0;
    }

    .header-overlay {
        display: none;
    }

    .server-card {
        border: 2px solid #ddd;
        break-inside: avoid;
        margin-bottom: 1rem;
    }

    .modern-table {
        border: 1px solid #ddd;
    }

    .modern-table th {
        background: #f5f5f5 !important;
        color: black !important;
    }
}