/* =================================================================
// styles.css - 最终修复与适配版本 (Final Fixed & Responsive Version)
// ================================================================= */

/* --- 重置和基础样式 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    /* 【已修正】: 修正了图片路径，确保服务器能找到图片 */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/3.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: #4CAF50;
    text-decoration: none;
}

/* --- 导航栏样式 --- */
header {
    background: rgba(27, 38, 59, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(76, 175, 80, 0.5);
    transition: box-shadow 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 5px 0;
    position: relative;
}

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

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

/* --- 移动端汉堡菜单按钮 --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- 英雄区域 --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 0;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: #4CAF50;
}

.hero-content .hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.server-status-container {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(0,0,0,0.3);
    padding: 10px 20px;
    border-radius: 25px;
    margin-bottom: 2rem;
}
.server-status { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; }
.server-status.online .status-dot { background-color: #2ecc71; box-shadow: 0 0 8px #2ecc71; }
.server-status.offline .status-dot { background-color: #e74c3c; }

.cta-button {
    background: linear-gradient(45deg, #4CAF50, #5cb85c);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* --- 通用分区样式 --- */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* --- 关于区域 --- */
.about { background: rgba(27, 38, 59, 0.8); }

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

.about-text p { font-size: 1.1rem; margin-bottom: 1rem; }
.minecraft-list { list-style: none; padding-left: 0; }
.minecraft-list li { margin-bottom: 0.5rem; display: flex; align-items: center; gap: 10px; }
.minecraft-list .fa-check { color: #4CAF50; }

.about-image { text-align: center; font-size: 10rem; color: rgba(76, 175, 80, 0.5); }

.server-specs {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.server-specs h4 { color: #4CAF50; margin-bottom: 1.5rem; text-align: center; font-size: 1.3rem; }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.spec-item { display: flex; flex-direction: column; align-items: center; padding: 1rem; background: rgba(255, 255, 255, 0.05); border-radius: 8px; }
.spec-item i { font-size: 1.8rem; color: #4CAF50; margin-bottom: 0.5rem; }
.spec-label { font-size: 0.9rem; color: #bdc3c7; margin-bottom: 0.3rem; }
.spec-value { font-size: 1rem; color: #fff; font-weight: 500; text-align: center;}


/* --- 规则预览 & 指令大全 & 联系区域 --- */
.rules-preview { background: rgba(33, 47, 69, 0.8); }
.commands { background: rgba(27, 38, 59, 0.8); }
.contact { background: rgba(33, 47, 69, 0.8); }

.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.rule-card { background: rgba(0, 0, 0, 0.2); padding: 2rem; border-radius: 15px; text-align: center; border: 1px solid rgba(76, 175, 80, 0.3); transition: transform 0.3s ease; position: relative; }
.rule-card:hover { transform: translateY(-5px); }
.rule-icon { font-size: 3rem; color: #4CAF50; margin-bottom: 1rem; }
.rule-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: #4CAF50; }
.rule-card p { color: #bdc3c7; }
.rules-cta { text-align: center; }

.cta-button.secondary { background: transparent; border: 2px solid #4CAF50; color: #4CAF50; }
.cta-button.secondary:hover { background: #4CAF50; color: white; }

.commands-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.command-category { background: rgba(0, 0, 0, 0.2); padding: 2rem; border-radius: 10px; border: 1px solid rgba(76, 175, 80, 0.3); position: relative; }
.command-category h3 { color: #4CAF50; margin-bottom: 1.5rem; font-size: 1.3rem; display: flex; align-items: center; gap: 0.5rem; }
.command-list { display: flex; flex-direction: column; gap: 1rem; }
.command-item { display: flex; flex-direction: column; padding: 1rem; background: rgba(255, 255, 255, 0.05); border-radius: 8px; transition: background 0.3s ease; }
.command-item:hover { background: rgba(76, 175, 80, 0.1); }
.command-item code { background: rgba(76, 175, 80, 0.2); color: #4CAF50; padding: 0.3rem 0.6rem; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 0.9rem; margin-bottom: 0.5rem; border: 1px solid rgba(76, 175, 80, 0.3); }
.command-item span { color: #bdc3c7; font-size: 0.9rem; }

.contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form textarea { padding: 15px; border: 2px solid rgba(76, 175, 80, 0.5); border-radius: 8px; background: rgba(0, 0, 0, 0.2); color: white; font-size: 1rem; }
.contact-form textarea::placeholder { color: #aaa; }

/* --- 页脚 --- */
.footer { background: #151c2a; padding: 2rem 0; text-align: center; border-top: 2px solid #4CAF50; }
.footer p { margin-bottom: 1rem; }
.social-links { display: flex; justify-content: center; gap: 1rem; }
.social-links a { color: #4CAF50; font-size: 1.5rem; transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: #fff; transform: scale(1.1); }

/* --- 登录与注册页面样式 --- */
.login-container { background: rgba(27, 38, 59, 0.9); backdrop-filter: blur(10px); border: 1px solid rgba(76, 175, 80, 0.3); border-radius: 15px; padding: 2.5rem 3rem; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); max-width: 450px; margin: 0 auto; }
.login-container h2 { text-align: center; color: #4CAF50; margin-bottom: 2rem; font-size: 2rem; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 0.8rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #bdc3c7; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.login-form input { width: 100%; padding: 12px 15px; background: rgba(0, 0, 0, 0.2); border: 2px solid rgba(255, 255, 255, 0.2); border-radius: 8px; color: #fff; font-size: 1rem; transition: all 0.3s ease; }
.login-form input:focus { outline: none; border-color: #4CAF50; box-shadow: 0 0 15px rgba(76, 175, 80, 0.4); }
.message { font-weight: bold; padding: 10px; border-radius: 5px; text-align: center; }
.login-container p { text-align: center; margin-top: 1.5rem; color: #bdc3c7; }
.login-container p a:hover { text-decoration: underline; }

/* --- 导航栏登录后用户信息样式 --- */
.user-info-pill { display: flex; align-items: center; background-color: rgba(255, 255, 255, 0.1); border-radius: 20px; padding: 5px 12px; gap: 8px; font-weight: 500; font-size: 0.9rem; }
.user-info-pill .fa-user-circle { color: #4CAF50; font-size: 1.2em; }
.logout-btn-small { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 1rem; padding: 5px; margin-left: 5px; transition: color 0.3s ease; }
.logout-btn-small:hover { color: #ff6b6b; }

/* --- 动画效果 --- */
.hero-content h1, .hero-subtitle, .server-status-container, 
.about h2, .about-text, .about-image, 
.rules-preview h2, .rule-card, 
.commands h2, .command-category, 
.contact h2, .contact-form {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.cta-button { /* 让按钮也有动画效果 */
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.hero-content h1 { transform: translateX(-30px); }
.hero-subtitle { transform: translateY(-20px); transition-delay: 0.2s; }
.server-status-container { transform: scale(0.8); transition-delay: 0.4s; }
.cta-button { transform: translateY(30px); transition-delay: 0.6s; }
.about h2, .rules-preview h2, .commands h2, .contact h2 { transform: translateY(30px); }
.about-text { transform: translateX(-30px); }
.about-image { transform: translateX(30px); }
.rule-card, .command-category, .contact-form { transform: translateY(30px); }
.hero-content h1.animate, .hero-subtitle.animate, .cta-button.animate, .server-status-container.animate,
.about h2.animate, .about-text.animate, .about-image.animate,
.rules-preview h2.animate, .rule-card.animate,
.commands h2.animate, .command-category.animate,
.contact h2.animate, .contact-form.animate {
    opacity: 1;
    transform: none;
}

/* --- 自定义表单按钮样式 --- */
.login-form .cta-button, .contact-form .cta-button {
    background: #ffffff;
    color: #4CAF50;
    border: 2px solid #4CAF50;
    width: 100%;
    padding-top: 13px;
    padding-bottom: 13px;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: none;
    transition: all 0.3s ease;
}
.login-form .cta-button:hover, .contact-form .cta-button:hover {
    background-color: #f7fff7;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}
.login-form .cta-button:active, .contact-form .cta-button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* --- 按钮禁用状态美化 --- */
.cta-button:disabled {
    background: linear-gradient(45deg, #5a6e5a, #687a69);
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.login-form .cta-button:disabled, .contact-form .cta-button:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    border-color: #bdbdbd;
}

/* --- 管理员编辑功能样式 --- */
.admin-only-btn { background-color: #2ecc71; color: white; border: none; border-radius: 5px; padding: 8px 15px; font-size: 0.9rem; cursor: pointer; margin-left: 1rem; transition: background-color 0.3s; }
.admin-only-btn:hover { background-color: #27ae60; }
.admin-controls { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.5); border-radius: 5px; padding: 5px; opacity: 0; transition: opacity 0.3s ease; }
.rule-card:hover .admin-controls, .command-category:hover .admin-controls { opacity: 1; }
body.admin-view .admin-controls { display: flex; } /* 只有管理员登录时才显示 */
body:not(.admin-view) .admin-controls { display: none; } /* 确保非管理员绝对看不到 */

.admin-controls button { background: none; border: none; color: white; font-size: 1rem; cursor: pointer; padding: 5px 8px; transition: color 0.3s; }
.admin-controls .edit-btn:hover { color: #3498db; }
.admin-controls .delete-btn:hover { color: #e74c3c; }

/* --- 编辑模态框 (弹窗) 样式 --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 2000; }
.modal-content { background-color: #1b263b; padding: 2rem; border-radius: 10px; width: 90%; max-width: 500px; border: 1px solid #4CAF50; }
#modal-title { color: #4CAF50; margin-bottom: 1.5rem; }
#modal-form-fields .form-group { margin-bottom: 1rem; }
#modal-form-fields label { display: block; margin-bottom: 0.5rem; }
#modal-form-fields input, #modal-form-fields textarea { width: 100%; padding: 10px; background-color: rgba(0,0,0,0.3); border: 1px solid #444; border-radius: 5px; color: white; }
.modal-actions { margin-top: 1.5rem; display: flex; justify-content: flex-end; gap: 1rem; }

/* =================================================================
// 响应式设计: 媒体查询模块
// ================================================================= */
@media (max-width: 768px) {
    section { padding: 60px 0; }
    section h2 { font-size: 2rem; }
    .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: rgba(27, 38, 59, 0.98); padding: 1rem 0; gap: 0; }
    .nav-menu.active { display: flex; }
    .nav-item { width: 100%; text-align: center; }
    .nav-link { display: block; padding: 1rem 0; }
    .nav-link::after { display: none; }
    .menu-toggle { display: flex; }
    .menu-toggle.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content .hero-subtitle { font-size: 1.2rem; }
    .server-status-container { flex-direction: column; gap: 10px; }
    .about-content { grid-template-columns: 1fr; text-align: center; }
    .about-text { order: 2; }
    .about-image { order: 1; font-size: 8rem; }
    .specs-grid { grid-template-columns: repeat(2, 1fr); }
    .rules-grid, .commands-content { grid-template-columns: 1fr; }
    .login-container { padding: 2rem 1.5rem; }
}
/* =================================================================
// 自定义表单按钮样式 (Custom Form Button Style)
// 适用于登录、注册、工单等页面的按钮
// ================================================================= */

.login-form .cta-button,
.contact-form .cta-button,
.login-form .minecraft-btn,
.contact-form .minecraft-btn {
    /* --- 核心样式 (白色主题, 绿色边框) --- */
    background: #ffffff;                 /* 纯白色背景 */
    color: #4CAF50;                       /* 绿色文字 */
    border: 2px solid #4CAF50;           /* 2像素宽的绿色窄边框 */
    
    /* --- 【新增】圆角样式 --- */
    border-radius: 50px;                 /* 让按钮变成圆角胶囊形状 */
    
    /* --- 尺寸匹配 (与输入框等宽同高) --- */
    width: 100%;                         /* 宽度与父容器(表单)一致 */
    padding-top: 13px;                   /* 调整垂直内边距以匹配输入框高度 */
    padding-bottom: 13px;
    
    /* --- 字体与过渡效果 --- */
    font-weight: bold;                   /* 加粗字体 */
    font-size: 1.1rem;                   /* 调整字体大小 */
    text-shadow: none;                   /* 移除可能存在的文字阴影 */
    transition: all 0.3s ease;           /* 平滑的过渡动画 */
}

/* styles.css (在末尾添加) */
body.admin-view .sponsors-header-row {
    grid-template-columns: 60px 1fr 100px 100px; /* 管理员视图下多加一列 */
}
body.admin-view .sponsor-item {
    grid-template-columns: 60px 1fr 100px 100px; /* 管理员视图下多加一列 */
}
.admin-action {
    text-align: right;
}

/* styles.css (在末尾添加) */

/* --- 签到模块样式 --- */
.checkin {
    background: rgba(33, 47, 69, 0.8);
    padding: 60px 0; /* 减小一点上下边距 */
}
.checkin-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.score-display {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}
#player-score-display {
    color: #ffd700; /* 金色积分 */
    font-weight: bold;
}
#checkin-btn {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}
#checkin-message {
    margin-top: 1.5rem;
    font-weight: bold;
    min-height: 24px; /* 防止布局跳动 */
}