/* 基础样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f5f7fa;
color: #333;
padding: 20px;
}
.container {
max-width: 800px;
width: 100%;
text-align: center;
padding: 40px;
background-color: white;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
h1 {
color: #2c3e50;
margin-bottom: 10px;
font-size: 2.5rem;
}
.description {
color: #7f8c8d;
margin-bottom: 40px;
font-size: 1.1rem;
line-height: 1.6;
}
.button-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
margin-bottom: 40px;
}
/* 主要按钮样式 */
.main-button {
padding: 16px 32px;
font-size: 1.2rem;
font-weight: 600;
border: none;
border-radius: 12px;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
/* 默认按钮样式 */
.default-btn {
background-color: #3498db;
color: white;
}
.default-btn:hover {
background-color: #2980b9;
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}
.default-btn:active {
transform: translateY(0);
}
/* 成功按钮样式 */
.success-btn {
background-color: #2ecc71;
color: white;
}
.success-btn:hover {
background-color: #27ae60;
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
}
/* 警告按钮样式 */
.warning-btn {
background-color: #f39c12;
color: white;
}
.warning-btn:hover {
background-color: #d68910;
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(243, 156, 18, 0.3);
}
/* 危险按钮样式 */
.danger-btn {
background-color: #e74c3c;
color: white;
}
.danger-btn:hover {
background-color: #c0392b;
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}
/* 动画效果 */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.pulse {
animation: pulse 0.5s ease;
}
/* 结果区域 */
.result-area {
background-color: #f8f9fa;
padding: 25px;
border-radius: 12px;
margin-top: 30px;
min-height: 120px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transition: all 0.3s ease;
}
.result-title {
font-size: 1.4rem;
color: #2c3e50;
margin-bottom: 15px;
}
.result-text {
font-size: 1.8rem;
font-weight: bold;
color: #3498db;
transition: all 0.3s ease;
}
/* 计数器样式 */
.counter-container {
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
margin-top: 30px;
flex-wrap: wrap;
}
.counter-button {
padding: 12px 24px;
font-size: 1.1rem;
background-color: #9b59b6;
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
}
.counter-button:hover {
background-color: #8e44ad;
transform: translateY(-2px);
}
.counter-value {
font-size: 2rem;
font-weight: bold;
color: #9b59b6;
min-width: 60px;
text-align: center;
}
/* 响应式设计 */
@media (max-width: 600px) {
.container {
padding: 25px 20px;
}
h1 {
font-size: 2rem;
}
.button-container {
flex-direction: column;
align-items: center;
}
.main-button {
width: 100%;
max-width: 280px;
}
}
点赞 (0)
回复