body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.container > * {
    position: relative;
    z-index: 1;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.game-info {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 12px 20px;
    background: linear-gradient(to right, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 100px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background: linear-gradient(to right, #1976D2, #0d47a1);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rules {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.rules h3 {
    margin-top: 0;
    color: #1976D2;
}

.rules ul {
    padding-left: 25px;
}

.rules li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    background: #e8f5e9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat {
    text-align: center;
}

.stat-label {
    font-weight: bold;
    color: #2e7d32;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #1b5e20;
}

.game-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(8, 40px);
    gap: 0;
    background-color: #e0f7fa;
    border: 3px solid #00838f;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cell {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid #b2ebf2;
    box-sizing: border-box;
}

.cell.number {
    background-color: #4caf50;
    color: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}

.cell.number:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.cell.path {
    background-color: #ff9800;
}

.cell.path-1 {
    background-color: #ff9800;
}

.cell.path-2 {
    background-color: #f57c00;
}

.cell.path-3 {
    background-color: #ef6c00;
}

.cell.path-current {
    background-color: #7cb342;
    opacity: 0.7;
}

.status {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    min-height: 30px;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.status.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.status.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 250px;
    }
    
    #game-board {
        grid-template-columns: repeat(8, 30px);
        grid-template-rows: repeat(8, 30px);
    }
    
    .cell {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .rules {
        padding: 15px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    #game-board {
        grid-template-columns: repeat(8, 25px);
        grid-template-rows: repeat(8, 25px);
    }
    
    .cell {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .controls {
        gap: 10px;
    }
}