/* 游戏数值测试系统 - 苹果风格样式 */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* 通用工具类 */
.hidden {
    display: none !important;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056CC, #4A47B8);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 登录页面样式 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.login-box h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.login-form {
    transition: all 0.3s ease;
}

.login-form.hidden {
    display: none;
}

/* 主应用页面样式 */
.page {
    min-height: 100vh;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.header h1 {
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 240px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
}

.nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(0, 122, 255, 0.2);
    color: white;
    border-right: 3px solid #007AFF;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.main-content {
    margin-left: 240px;
    margin-top: 60px; /* 页面整体往上移 */
    padding: 24px;
    min-height: calc(80vh - 40px);
}

/* 内容区的内容整体往下移动一些，所有栏目统一风格 */
.projects-grid {
    padding-top: 32px; /* 项目卡片整体往下移 */
}

.content-page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 去除header右上角的装饰色块（如有） */
.header::after {
    display: none !important;
}

/* 让新建项目按钮绝对定位在内容区左上角，始终可见 */
#create-project-btn {
    position: static;
    left: auto;
    top: auto;
    z-index: auto;
    min-width: 120px;
    margin-left: 0;
    margin-top: 0;
}

/* 让页面头部整体下移，避免被header遮挡 */
.page-header {
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-header h2 {
    margin-left: 0;
}

.page-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.select {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    min-width: 150px;
}

.select option {
    background: #333;
    color: white;
}

/* 项目管理样式 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.15);
}

.project-card h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.project-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* 数值管理样式 */
.values-table {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.values-table table {
    width: 100%;
    border-collapse: collapse;
}

.values-table th,
.values-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.values-table th {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.values-table td {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.values-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    padding: 24px;
    color: rgba(255, 255, 255, 0.9);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-content {
        padding: 12px 16px;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .page-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        margin: 20px;
        max-width: none;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.message.success {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.message.error {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.message.warning {
    background: rgba(255, 149, 0, 0.2);
    color: #FF9500;
    border: 1px solid rgba(255, 149, 0, 0.3);
} 

/* 优化数值类型/技能类型配置区的排版和输入框尺寸 */
.value-type-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}
.value-type-block input[type="text"] {
    width: 120px;
    min-width: 80px;
    max-width: 180px;
    padding: 6px 10px;
    font-size: 13px;
    margin-right: 0;
    margin-bottom: 0;
}
.value-type-block button {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 6px;
    margin: 0 2px;
}
.value-type-block span {
    font-size: 13px;
    margin: 0 2px;
}
.value-type-block .btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #007AFF;
    border: none;
}
.value-type-block .btn-secondary:hover {
    background: rgba(0,122,255,0.12);
} 

.field-input-wrap {
    position: relative;
    display: inline-block;
}
.remove-field-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    color: #ff3b30;
    background: white;
    border: 1px solid #ff3b30;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 16px;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: background 0.2s;
}
.remove-field-btn:hover {
    background: #ff3b30;
    color: #fff;
} 