body {
    margin: 0;
    overflow: hidden;
    background: #2c3e50;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 0;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 5px;
}

#minesweeper {
    display: grid;
    grid-template-columns: repeat(10, minmax(30px, 3.5vw));
    grid-template-rows: repeat(10, minmax(30px, 3.5vw));
    gap: 1px;
    background: #34495e;
    padding: 20px;
    width: 35vw;
    height: 35vw;
    box-sizing: border-box;
    position: relative;
    border: 15px solid transparent;
    border-image: linear-gradient(45deg, 
        #846c4d,
        #a88c64,
        #c4a77d,
        #a88c64,
        #846c4d
    ) 1;
    background-clip: padding-box;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.3),
        0 0 30px rgba(0,0,0,0.4);
    margin: 0 auto;
}

/* 添加装饰性边框 */
#minesweeper::before,
#minesweeper::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: 
        linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%) repeat,
        linear-gradient(-45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%) repeat;
    background-size: 10px 10px;
    z-index: -1;
    border: 2px solid #846c4d;
    border-radius: 5px;
}

/* 添加角落装饰 */
#minesweeper::after {
    content: '';
    border: none;
    background: none;
    top: -25px;
    left: -25px;
    right: -25px;
    bottom: -25px;
    z-index: -2;
    background-image: 
        radial-gradient(circle at 0 0, #846c4d 8px, transparent 0),
        radial-gradient(circle at 100% 0, #846c4d 8px, transparent 0),
        radial-gradient(circle at 0 100%, #846c4d 8px, transparent 0),
        radial-gradient(circle at 100% 100%, #846c4d 8px, transparent 0);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

/* 添加装饰性花纹 */
.decorative-border {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid #846c4d;
    border-radius: 10px;
    z-index: -3;
    background: 
        repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(132, 108, 77, 0.1) 10px,
            rgba(132, 108, 77, 0.1) 20px
        );
}

/* 添加花边装饰元素 */
.corner-decoration {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid #846c4d;
    z-index: -2;
}

.corner-decoration:nth-child(1) { top: -20px; left: -20px; border-radius: 0 0 100% 0; }
.corner-decoration:nth-child(2) { top: -20px; right: -20px; border-radius: 0 0 0 100%; }
.corner-decoration:nth-child(3) { bottom: -20px; left: -20px; border-radius: 0 100% 0 0; }
.corner-decoration:nth-child(4) { bottom: -20px; right: -20px; border-radius: 100% 0 0 0; }

.cell {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: calc(1.5vw);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 3px;
    box-shadow: 
        inset 1px 1px 2px rgba(255,255,255,0.2),
        inset -1px -1px 2px rgba(0,0,0,0.2);
}

.cell:hover {
    transform: scale(1.1);
    z-index: 1;
    box-shadow: 
        inset 1px 1px 2px rgba(255,255,255,0.3),
        inset -1px -1px 2px rgba(0,0,0,0.3),
        0 0 10px rgba(52,152,219,0.5);
}

.revealed {
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    box-shadow: 
        inset -2px -2px 4px rgba(0,0,0,0.1),
        inset 2px 2px 4px rgba(255,255,255,0.1);
}

.mine {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    box-shadow: 
        inset -2px -2px 4px rgba(0,0,0,0.2),
        inset 2px 2px 4px rgba(255,255,255,0.1);
}

.flag {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 
        inset -2px -2px 4px rgba(0,0,0,0.2),
        inset 2px 2px 4px rgba(255,255,255,0.1);
}

#particle-canvas, #cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 100;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

#restart {
    background: #2ecc71;
    color: white;
}

#close {
    background: #e74c3c;
    color: white;
}

button:hover {
    transform: scale(1.1);
}

.game-header {
    text-align: center;
    margin-bottom: 10px;
    color: #ecf0f1;
}

.game-header h1 {
    font-size: 2.2em;
    margin: 0;
    padding: 2px 0;
}

.game-header p {
    margin: 1px 0;
    font-size: 1em;
}

#minesweeper-wrapper {
    position: relative;
    margin: 10px auto;
    padding: 15px;
    display: flex;
    justify-content: center;
} 