/* 按钮管理页面样式 */
.button-management {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 防止文本自动换行 */
.button-management * {
    white-space: nowrap;
}

.button-management h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 20px;
}

.add-button-btn {
    background-color: #0071e3;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.add-button-btn:hover {
    background-color: #0077ed;
}

.button-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    min-width: 1200px;
}

.button-table th {
    background-color: #f5f5f7;
    font-weight: 600;
    color: #1d1d1f;
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #d2d2d7;
}

.button-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #d2d2d7;
}

.button-table td img {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.button-table tr:hover {
    background-color: #f9f9f9;
}

.button-table button {
    margin-right: 8px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.button-table button:hover {
    opacity: 0.9;
}

.button-table button:first-child {
    background-color: #0071e3;
    color: #ffffff;
    border: none;
}

.button-table button:nth-child(2) {
    background-color: #ffcc00;
    color: #1d1d1f;
    border: none;
}

.button-table button:last-child {
    background-color: #ff3b30;
    color: #ffffff;
    border: none;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid #ddd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .button-management {
        padding: 15px;
    }
    
    .button-management h2 {
        font-size: 18px;
    }
    
    .add-button-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .button-table th,
    .button-table td {
        padding: 10px;
        font-size: 13px;
    }
    
    .button-table td img {
        width: 30px;
        height: 30px;
    }
    
    .button-table button {
        padding: 4px 8px;
        font-size: 12px;
        margin-right: 4px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group.half {
        width: 100%;
    }
}

/* 表单行样式 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group.half {
    flex: 1;
}

.form-group.third {
    flex: 1;
}

.form-group.full {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1d1d1f;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

.form-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    cursor: pointer;
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.modal-content {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    width: 100%;
    max-width: 600px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-lg);
    animation: appleModalIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes appleModalIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-content.closing {
    animation: appleModalOut 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

@keyframes appleModalOut {
    from { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
}

.modal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions button {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-actions button:first-child {
    background-color: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.modal-actions button:first-child:hover {
    background-color: #e8e8ed;
}

.modal-actions button:last-child {
    background-color: #0071e3;
    color: white;
    border: none;
}

.modal-actions button:last-child:hover {
    background-color: #0077ed;
}