.tool-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.tool-title {
    text-align: center;
    color: #2C3E50;
    margin-bottom: 10px;
    font-size: 2.8em;
    font-weight: bold;
    background: linear-gradient(45deg, #3498DB, #9B59B6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-description {
    text-align: center;
    color: #7F8C8D;
    margin-bottom: 30px;
    font-size: 1.2em;
    line-height: 1.6;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #ECF0F1, #BDC3C7);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid #34495E;
}

#gameContainer {
    position: relative;
    width: 1000px;
    height: 800px;
    border: 3px solid #34495E;
    border-radius: 12px;
    overflow: hidden;
    background: radial-gradient(circle at center, #2C3E50, #1A252F);
    box-shadow: 
        inset 0 0 50px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(52, 73, 94, 0.4);
}

#gameCanvas3D {
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
    transition: all 0.3s ease;
}

#gameCanvas3D:active {
    cursor: grabbing;
}

#gameCanvas3D:hover {
    box-shadow: inset 0 0 30px rgba(52, 152, 219, 0.2);
}

.game-ui {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.score-board {
    display: flex;
    gap: 25px;
    background: linear-gradient(135deg, #34495E, #2C3E50);
    color: white;
    padding: 20px 30px;
    border-radius: 30px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #4A6741;
}

.score, .level, .precision {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 80px;
}

.score label, .level label, .precision label {
    font-weight: bold;
    color: #BDC3C7;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score span, .level span, .precision span {
    font-size: 1.4em;
    font-weight: bold;
    text-align: center;
    padding: 5px 10px;
    border-radius: 8px;
    min-width: 60px;
}

.score span {
    color: #F39C12;
    background: rgba(243, 156, 18, 0.1);
}

.level span {
    color: #3498DB;
    background: rgba(52, 152, 219, 0.1);
}

.precision span {
    color: #2ECC71;
    background: rgba(46, 204, 113, 0.1);
}

.game-controls, .camera-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #3498DB, #2980B9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #2980B9, #21618C);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #E74C3C, #C0392B);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #C0392B, #A93226);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #F39C12, #E67E22);
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(45deg, #E67E22, #D68910);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.btn-info {
    background: linear-gradient(45deg, #1ABC9C, #16A085);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.3);
    font-size: 0.9em;
    padding: 10px 20px;
}

.btn-info:hover {
    background: linear-gradient(45deg, #16A085, #138D75);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.camera-controls {
    margin-top: 10px;
}

.help-btn {
    background: linear-gradient(45deg, #3498DB, #2980B9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.help-btn:hover {
    background: linear-gradient(45deg, #2980B9, #21618C);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.game-instructions h3 {
    color: #2C3E50;
    margin-bottom: 20px;
    font-size: 1.4em;
    border-bottom: 3px solid #3498DB;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-instructions h3::before {
    content: "🎮";
    font-size: 1.2em;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.game-instructions li {
    padding: 10px 0;
    color: #5D6D7E;
    position: relative;
    padding-left: 25px;
    line-height: 1.6;
    border-bottom: 1px solid #ECF0F1;
}

.game-instructions li:last-child {
    border-bottom: none;
}

.game-instructions li:before {
    content: "▶";
    color: #3498DB;
    position: absolute;
    left: 0;
    top: 10px;
    font-size: 0.8em;
}

/* 3D特色部分样式 */
.game-instructions h3:last-of-type {
    color: #9B59B6;
    border-bottom-color: #9B59B6;
    margin-top: 25px;
}

.game-instructions h3:last-of-type::before {
    content: "✨";
}

.game-instructions ul:last-of-type li:before {
    color: #9B59B6;
}

/* 响应式设计 */
@media (max-width: 1300px) {
    #gameContainer {
        width: 900px;
        height: 700px;
    }
}

@media (max-width: 1100px) {
    #gameContainer {
        width: 800px;
        height: 650px;
    }
}

@media (max-width: 900px) {
    .tool-container {
        max-width: 850px;
    }
    
    #gameContainer {
        width: 700px;
        height: 600px;
    }
}

@media (max-width: 768px) {
    .tool-title {
        font-size: 2.2em;
    }
    
    .tool-description {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .help-btn {
        margin-left: 0;
    }
    
    #gameContainer {
        width: 600px;
        height: 550px;
    }
    
    .score-board {
        gap: 15px;
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .score, .level, .precision {
        min-width: 60px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .btn-info {
        padding: 8px 16px;
        font-size: 0.8em;
    }
}

@media (max-width: 650px) {
    .tool-container {
        padding: 15px;
    }
    
    .tool-title {
        font-size: 1.8em;
    }
    
    #gameContainer {
        width: 500px;
        height: 500px;
    }
    
    .game-area {
        padding: 20px;
    }
    
    .score-board {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .game-controls, .camera-controls {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.8em;
    }
}

@media (max-width: 550px) {
    #gameContainer {
        width: 450px;
        height: 450px;
    }
    
    .tool-title {
        font-size: 1.6em;
    }
}

@media (max-width: 480px) {
    #gameContainer {
        width: 400px;
        height: 400px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 430px) {
    #gameContainer {
        width: 350px;
        height: 350px;
    }
}

/* 动画效果 */
@keyframes pulse3D {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(52, 152, 219, 0.5); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3); }
}

.btn:hover {
    animation: pulse3D 0.6s ease-in-out;
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(52, 152, 219, 0.2); }
    50% { box-shadow: 0 0 20px rgba(52, 152, 219, 0.6); }
    100% { box-shadow: 0 0 5px rgba(52, 152, 219, 0.2); }
}

#gameContainer:hover {
    animation: glow 2s ease-in-out infinite;
}

/* 加载动画 */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.game-area, .game-instructions {
    animation: fadeInUp 0.8s ease-out;
}

/* 分数更新动画 */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #F39C12; }
    100% { transform: scale(1); }
}

.score span.update {
    animation: scoreUpdate 0.3s ease-out;
}

/* 精确度颜色渐变 */
.precision span {
    transition: all 0.3s ease;
}

.precision span.high {
    color: #27AE60 !important;
    background: rgba(39, 174, 96, 0.15) !important;
}

.precision span.medium {
    color: #F39C12 !important;
    background: rgba(243, 156, 18, 0.15) !important;
}

.precision span.low {
    color: #E74C3C !important;
    background: rgba(231, 76, 60, 0.15) !important;
}

/* 弹出框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    border: 2px solid #3498DB;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #3498DB, #2980B9);
    color: white;
    padding: 20px 30px;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
}

.close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.instructions-section {
    margin-bottom: 30px;
}

.instructions-section:last-child {
    margin-bottom: 0;
}

.instructions-section h3 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-left: 4px solid #3498DB;
    padding-left: 15px;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1), transparent);
    padding: 10px 0 10px 15px;
    border-radius: 0 10px 10px 0;
}

.instructions-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions-section li {
    padding: 12px 0;
    color: #5D6D7E;
    position: relative;
    padding-left: 30px;
    line-height: 1.6;
    border-bottom: 1px solid #ECF0F1;
    transition: all 0.3s ease;
}

.instructions-section li:last-child {
    border-bottom: none;
}

.instructions-section li:hover {
    background: rgba(52, 152, 219, 0.05);
    color: #2C3E50;
    padding-left: 35px;
}

.instructions-section li:before {
    content: "▶";
    color: #3498DB;
    position: absolute;
    left: 8px;
    top: 12px;
    font-size: 0.8em;
    transition: all 0.3s ease;
}

.instructions-section li:hover:before {
    color: #2980B9;
    transform: translateX(3px);
}

kbd {
    background: linear-gradient(135deg, #34495E, #2C3E50);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #4A5568;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 页脚样式 */
.footer {
    background-color: #111827;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    padding: 0;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 10px;
}

.footer-bottom a {
    color: #9ca3af;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
    text-decoration: underline;
}