/**
 * 通用样式文件 - common.css
 * 用于所有页面的基础样式
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-bottom: 60px;
}

/* 基础容器 */
.container {
    padding: 20px 15px;
}

/* 卡片基础样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .icon {
    font-size: 20px;
}

/* 按钮基础样式 */
.btn {
    background: linear-gradient(135deg, #d42323 0%, #b71c1c 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 35, 35, 0.4);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

/* 表单基础样式 */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #d42323;
    box-shadow: 0 0 0 3px rgba(212, 35, 35, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: white;
}

/* 提示信息样式 */
.error-message {
    background: #fff2e8;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.success-message {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.warning-message {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #faad14;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.empty-state .text {
    font-size: 14px;
}

/* 返回按钮 */
.back-btn {
    position: fixed;
    top: 20px;
    left: 15px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    z-index: 10;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: #d42323;
    transition: all 0.3s;
}

a:hover {
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 768px) {
    .card {
        padding: 15px;
    }
    
    .btn {
        width: 100%;
    }
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
