@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    /* 現代感的漸層深色背景 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    /* 玻璃擬物化 (Glassmorphism) 設計風格 */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    width: 350px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #00ffd5;
    text-shadow: 0 0 10px rgba(0, 255, 213, 0.5);
}

.status {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
    height: 30px;
    color: #e0e0e0;
}

.board {
    /* 使用 Grid 排版建立 3x3 的九宮格 */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.cell {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease; /* 滑鼠移過去的平滑動畫 */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.cell:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* X 與 O 的霓虹發光字體設計 */
.cell.x {
    color: #ff0055;
    text-shadow: 0 0 15px rgba(255, 0, 85, 0.6);
}

.cell.o {
    color: #00e5ff;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
}

/* 獲勝格子的高光特效 */
.cell.winning {
    background: rgba(0, 255, 0, 0.2);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

button {
    background: linear-gradient(45deg, #ff0055, #ff7b00);
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.4);
    font-family: inherit;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 0, 85, 0.6);
}

button:active {
    transform: scale(0.95);
}
