/*
Theme Name: 时光对弈 - Time Chess
Description: 一个包含时钟和五子棋游戏的WordPress主题
Version: 1.4
Author: DayDayUp
*/

/* 主题基础样式 */
.time-chess :root {
    --primary-color: #8B5CF6;
    --secondary-color: #EC4899;
    --neutral-color: #1F2937;
    --board-color: #E6C79C;
    --board-line-color: #8B4513;
}

.time-chess body {
    font-family: 'Inter', system-ui, sans-serif;
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* 导航栏样式 */
.time-chess header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 10;
    transition: all 0.3s ease;
}

.time-chess .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 英雄区域 */
.time-chess .hero-section {
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

.time-chess .hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--neutral-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.time-chess .hero-subtitle {
    font-size: 1.125rem;
    color: #475569;
    max-width: 32rem;
    margin: 0 auto 2.5rem;
}

/* 时钟样式 */
.time-chess .clock-container {
    background: linear-gradient(to bottom right, #f1f5f9, #e2e8f0);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    max-width: 28rem;
}

.time-chess .clock-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--neutral-color);
}

.time-chess .clock-separator {
    color: var(--primary-color);
    animation: pulse 1s infinite;
}

.time-chess .date-display {
    display: flex;
    justify-content: center;
    font-size: 1.25rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* 棋盘样式 */
.time-chess .board {
    width: min(90vw, 500px);
    height: min(90vw, 500px);
    background-color: var(--board-color);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    z-index: 1;
}

.time-chess .board-grid {
    position: absolute;
    inset: 0;
    background-size: calc(100% - 2rem) calc(100% - 2rem);
    background-position: 1rem 1rem;
    z-index: 1 !important;
}

.time-chess .piece {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.time-chess .piece-black {
    background-color: black;
}

.time-chess .piece-white {
    background-color: white;
    border: 1px solid #ccc;
}

/* 棋盘单元格样式 */
.time-chess .board-cell {
    z-index: 2;
}

/* 胜利弹窗样式 */
.time-chess #winMessage {
    z-index: 1000 !important;
    position: absolute !important;
}

.time-chess #winMessage > div {
    z-index: 1001 !important;
}

/* 最后一步棋标记样式 - 落点显示 */
.time-chess .piece.last-piece {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.8), 0 3px 6px rgba(0, 0, 0, 0.2) !important;
    z-index: 4;
}

.time-chess .board-cell.last-move {
    background-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.8) !important;
    z-index: 3;
}

/* 悬停效果 */
.time-chess .board-cell:hover {
    background-color: rgba(139, 92, 246, 0.2);
}

/* 悬停效果增强 */
.time-chess .board > div:not(.board-grid):not(.piece) {
    transition: all 0.2s ease;
    border-radius: 50%;
}

/* 游戏状态卡片 */
.time-chess .game-info-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px 0px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    width: 100%;
}

.time-chess .game-status {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
}

.time-chess .player-turn {
    background: rgba(0, 0, 0, 0.1);
    color: black;
}

.time-chess .ai-thinking {
    background: #dbeafe;
    color: #1e40af;
}

.time-chess .player-wins {
    background: #dcfce7;
    color: #166534;
}

.time-chess .ai-wins {
    background: #fee2e2;
    color: #991b1b;
}

.time-chess .draw-game {
    background: #fef3c7;
    color: #92400e;
}

/* 按钮样式 */
.time-chess .btn-primary {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.time-chess .btn-primary:hover {
    background-color: rgba(139, 92, 246, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.time-chess .btn-secondary {
    padding: 0.75rem 1.5rem;
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.time-chess .btn-secondary:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 排行榜样式 */
.time-chess .ranking-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px 0px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    max-width: 64rem;
    margin: 0 auto;
}

.time-chess .ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.time-chess .ranking-table th,
.time-chess .ranking-table td {
    padding: 0.75rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.time-chess .ranking-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.time-chess .ranking-table tr:hover {
    background-color: #f8fafc;
}

/* 动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 装饰元素 */
.time-chess .decoration-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(3rem);
    opacity: 0.1;
}

.time-chess .primary-decoration {
    background-color: var(--primary-color);
}

.time-chess .secondary-decoration {
    background-color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .time-chess .hero-section {
        padding: 3rem 0;
    }
    
    .time-chess .game-info-card {
        margin-bottom: 1.5rem;
    }
    
    .time-chess .board {
        width: min(90vw, 400px);
        height: min(90vw, 400px);
    }
}

/* 评论表单样式 */
.comment-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 1.625em;
    margin: 1.625em 0;
    border-radius: 3px;
}

.comment-form .comment-notes,
.comment-form .comment-reply-title {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.comment-form textarea {
    height: 120px;
    resize: vertical;
}

.comment-form .form-submit {
    text-align: right;
}

.comment-form .form-submit input[type="submit"] {
    background: #222;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.comment-form .form-submit input[type="submit"]:hover {
    background: #333;
}

/* 验证码样式 */
.comment-form .comment-form-captcha {
    margin: 15px 0;
}

.comment-form .comment-form-captcha img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.comment-form .comment-form-captcha input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
