/* Minecraft 服务器配置页样式 */

/* 配置分组 */
.config-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.config-group:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.dark .config-group {
    background-color: rgba(0, 0, 0, 0.2);
}

.dark .config-group:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* 分组标题 */
.config-group-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(209, 213, 219, 0.5);
    color: #4B5563;
    display: flex;
    align-items: center;
}

.config-group-title i {
    margin-right: 0.5rem;
}

.dark .config-group-title {
    color: #E5E7EB;
    border-bottom-color: rgba(75, 85, 99, 0.5);
}

/* 配置项样式 */
.config-item {
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.config-item:hover {
    transform: translateX(0.25rem);
}

/* 配置标签 */
.config-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #4B5563;
}

.dark .config-label {
    color: #E5E7EB;
}

/* 配置说明 */
.config-description {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #6B7280;
}

.dark .config-description {
    color: #9CA3AF;
}

/* 输入框样式 */
.config-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    background-color: #FFFFFF;
    color: #1F2937;
    transition: all 0.2s ease;
}

.config-input:focus {
    outline: none;
    border-color: #60A5FA;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.dark .config-input {
    background-color: #374151;
    border-color: #4B5563;
    color: #F9FAFB;
}

.dark .config-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* 下拉选择框样式 */
.config-select {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    background-color: #FFFFFF;
    color: #1F2937;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.dark .config-select {
    background-color: #374151;
    border-color: #4B5563;
    color: #F9FAFB;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* Checkbox样式 */
.config-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    accent-color: #3B82F6;
}

/* 配置搜索框样式 */
.config-search {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    background-color: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 1rem;
}

.dark .config-search {
    background-color: #374151;
    border-color: #4B5563;
    color: #F9FAFB;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
}

/* 保存按钮 */
.save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    color: white;
    background-color: #3B82F6;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.save-button:hover {
    background-color: #2563EB;
}

.save-button i {
    margin-right: 0.5rem;
}

.save-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 0.25rem solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 分类列表样式 */
.category-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-item {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #D1D5DB;
    transition: all 0.2s ease;
}

.category-item:hover {
    background-color: #F3F4F6;
}

.category-item.active {
    background-color: #EFF6FF;
    border-color: #93C5FD;
    color: #1D4ED8;
}

.dark .category-item {
    border-color: #4B5563;
}

.dark .category-item:hover {
    background-color: #374151;
}

.dark .category-item.active {
    background-color: #1F2937;
    border-color: #3B82F6;
    color: #60A5FA;
}

/* 切换按钮样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #D1D5DB;
    transition: .4s;
    border-radius: 1.5rem;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 1rem;
    width: 1rem;
    left: 0.25rem;
    bottom: 0.25rem;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #3B82F6;
}

input:checked + .toggle-slider:before {
    transform: translateX(1.5rem);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 4rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    max-width: 24rem;
    transition: all 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    background-color: #D1FAE5;
    border-left: 4px solid #10B981;
}

.notification.error {
    background-color: #FEE2E2;
    border-left: 4px solid #EF4444;
}

.dark .notification {
    background-color: #1F2937;
}

.dark .notification.success {
    background-color: #064E3B;
    border-left: 4px solid #10B981;
}

.dark .notification.error {
    background-color: #7F1D1D;
    border-left: 4px solid #EF4444;
}

/* 响应式布局调整 */
@media (min-width: 768px) {
    .config-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .config-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 配置值标签 */
.config-value-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem;
    border-radius: 0.25rem;
    background-color: #E5E7EB;
    font-size: 0.75rem;
}

.config-value-tag .remove-tag {
    margin-left: 0.25rem;
    cursor: pointer;
}

.dark .config-value-tag {
    background-color: #374151;
}

/* 配置分类按钮 */
.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.dark .category-btn {
    background-color: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}

.category-btn:hover {
    background-color: #e2e8f0;
    color: #334155;
}

.dark .category-btn:hover {
    background-color: #334155;
    color: #cbd5e1;
}

.category-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.dark .category-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #1d4ed8;
}

/* 配置容器 */
.config-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .config-container {
        grid-template-columns: 1fr;
    }
}

/* 配置项样式 */
.config-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark .config-item {
    background-color: #1e293b;
    border-color: #334155;
}

.config-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* 配置标题和标签 */
.config-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.config-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.dark .config-title {
    color: #e2e8f0;
}

.config-key {
    font-size: 0.75rem;
    color: #64748b;
    background-color: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
}

.dark .config-key {
    color: #94a3b8;
    background-color: #0f172a;
}

/* 配置描述 */
.config-description {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.dark .config-description {
    color: #94a3b8;
}

/* 配置输入控件 */
.config-input {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 文本输入框 */
.text-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: white;
    color: #1e293b;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.dark .text-input {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.text-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.dark .text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* 下拉选择框 */
.select-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: white;
    color: #1e293b;
    font-size: 0.875rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

.dark .select-input {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

.select-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.dark .toggle-slider {
    background-color: #475569;
}

input:checked + .toggle-slider {
    background-color: #3b82f6;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #3b82f6;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* 保存按钮 */
.save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    background-color: #3b82f6;
    color: white;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.save-button:hover {
    background-color: #2563eb;
}

.save-button:disabled {
    background-color: #93c5fd;
    cursor: not-allowed;
}

.dark .save-button:disabled {
    background-color: #1e40af;
    opacity: 0.7;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    color: white;
    font-weight: 500;
    z-index: 50;
    max-width: 24rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 媒体查询 - 移动设备 */
@media (max-width: 768px) {
    .config-container {
        grid-template-columns: 1fr;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}