* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  max-width: 1560px;
  min-width: 1240px;
  width: 100%;
  margin: 20px auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 25px;
}

header h1 {
  font-size: 24px;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
  font-size: 16px;
  max-width: 90%;
  opacity: 0.9;
  margin: auto;
}

.box {
    -width: 100%;
    margin: 0 auto;
    margin-bottom: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.game-container {
    text-align: center;
    margin-bottom: 20px;
}

#gameCanvas {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.status-container {
    text-align: center;
    margin-bottom: 20px;
}

.status {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    padding: 12px 20px;
    background: #ecf0f1;
    border-radius: 8px;
    display: inline-block;
    min-width: 200px;
}

.controls {
    text-align: center;
}

.controls select,
.controls button {
    margin: 0 10px;
    padding: 10px 42px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.controls select {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
}

.controls button {
    background: #3498db;
    color: white;
    font-weight: bold;
}

.controls button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.controls button:active {
    transform: translateY(0);
}

#newGame {
    background: #27ae60;
}

#newGame:hover {
    background: #219a52;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

#showAnswer {
    background: #e74c3c;
}

#showAnswer:hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}



.resttips span {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    display: block;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.resttips p {
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
}

.resttips p:first-of-type {
    font-weight: bold;
    color: #34495e;
    margin-top: 10px;
}

.clear::after {
    content: "";
    display: table;
    clear: both;
}

/* 胜利动画 */
@keyframes celebrate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.celebrating {
    animation: celebrate 0.5s ease-in-out 3;
    background: linear-gradient(45deg, #27ae60, #2ecc71) !important;
    color: white !important;
}

/* 新增的SEO优化内容样式 */
.resttips h2 {
    font-size: 22px;
    color: #2c3e50;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
    position: relative;
}

.resttips h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 80px;
    height: 2px;
    background-color: #e74c3c;
}

.resttips h3 {
    font-size: 20px;
    color: #34495e;
    margin: 20px 0 15px 0;
}

.resttips ol {
    margin: 15px 0 20px 20px;
    padding-left: 15px;
}

.resttips ol li {
    margin-bottom: 10px;
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    position: relative;
    padding-left: 5px;
}

.resttips ol li strong {
    color: #2c3e50;
}

.resttips ul {
    margin: 15px 0 20px 20px;
    padding-left: 15px;
    list-style-type: disc;
}

.resttips ul li {
    margin-bottom: 10px;
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    transition: transform 0.2s ease;
}

.resttips ul li:hover {
    transform: translateX(3px);
    color: #3498db;
}

.resttips strong {
    color: #34495e;
}

/* 行动召唤区域样式 */
.call-to-action {
    padding: 15px;
    text-align: center;
}

.call-to-action h3 {
    color: #3498db;
    margin-top: 0;
    font-size: 24px;
    margin-bottom: 15px;
}

.call-to-action p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .container {
        min-width: auto;
        width: 95%;
        margin: 10px auto;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 100%;
    }
    
    .controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .controls select,
    .controls button {
        margin: 5px 0;
        width: 100%;
        max-width: 300px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    header p {
        font-size: 14px;
    }
}