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

html {
    scroll-behavior: smooth;
}

*:focus {
    outline: none;
}

/* 为需要的元素提供自定义焦点样式 */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #EF4444;
    outline-offset: 2px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.7;
    color: #1F2937;
    background-color: #FAFAFA;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 通用工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.p-10 {
    padding: 10px;
}

.p-20 {
    padding: 20px;
}

.p-30 {
    padding: 30px;
}

/* 按钮基础样式 */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

.btn-secondary {
    background: #4A90E2;
    color: white;
}

.btn-secondary:hover {
    background: #357ABD;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

.btn-outline:hover {
    background: #e74c3c;
    color: white;
}

/* 卡片基础样式 */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 网格系统 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Flex工具类 */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

/* 动画关键帧 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.2); 
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 响应式断点 */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .flex-between {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .card {
        border-radius: 5px;
    }
}
