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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    overflow-x: hidden;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    color: #495057;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    background: linear-gradient(45deg, #6c757d, #adb5bd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 300;
    color: #6c757d;
}

.detail-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 50px;
}

.detail-btn:hover {
    background: #495057;
    transform: translateY(-1px);
}

.game-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    max-width: 100%;
    width: 100%;
    justify-content: center;
    padding: 0 20px;
}

.info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 360px;
    flex-shrink: 0;
}

.info-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(108, 117, 125, 0.15);
}

.board-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.status {
    font-size: 1.3rem;
    font-weight: 700;
    color: #495057;
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

.status.black-turn::before {
    background: radial-gradient(circle, #2c2c2c, #000);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.status.white-turn::before {
    background: radial-gradient(circle, #fff, #f0f0f0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid #ccc;
}

.winner {
    color: #28a745;
    animation: pulse 1s infinite, glow 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px #28a745; }
    50% { text-shadow: 0 0 20px #28a745, 0 0 30px #28a745; }
}

.board-container {
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 0;
    overflow: visible;
    max-width: 100%;
}

.board {
    position: relative;
    width: 460px;
    height: 460px;
    background: linear-gradient(135deg, #DEB887, #F4A460);
    border: 3px solid #654321;
    border-radius: 15px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
    margin: 0 auto;
    box-sizing: border-box;
}

/* SVG网格 */
.board-grid {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 0;
}

.cell {
    position: absolute;
    width: 26px;
    height: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    background: transparent;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.cell:hover::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(108, 117, 125, 0.3);
    border-radius: 50%;
}

.cell.black {
    background: radial-gradient(circle, #2c2c2c, #000);
    box-shadow: 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.1);
}

.cell.white {
    background: radial-gradient(circle, #fff, #f0f0f0);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
}

.cell.black:hover::before,
.cell.white:hover::before {
    display: none;
}

.controls {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.controls button {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background: white;
    color: #000;
    border: 2px solid #000;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    flex: 0 0 auto;
    min-width: 90px;
}

.controls button:hover {
    background: #000;
    color: white;
    transform: none;
    box-shadow: none;
}

.controls button:active {
    transform: scale(0.98);
}

button {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

button:active {
    transform: translateY(0);
}

.skill-title {
    color: #495057;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.skill-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 技能容器 */
.skill-item {
    position: relative;
    width: 100%;
    height: 50px;
    margin-bottom: 2px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.skill-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* 最后一个技能项不需要下边距 */
.skill-item:last-child {
    margin-bottom: 0;
}

/* 能量条样式 */
.energy-bar-container {
    margin: 10px 0 15px 0;
    position: relative;
    overflow: visible; /* 允许特效溢出 */
}

.energy-bar {
    position: relative;
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #666;
}

.energy-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #2c3e50, #34495e);
    transition: width 0.3s ease;
    z-index: 1;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 能量条文字（动态颜色） */
.energy-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: #495057;
    z-index: 2;
    pointer-events: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* 当能量充足时，文字变白色 */
.energy-text.high-energy {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 棋子图标样式 */
.piece-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.piece-black {
    background: radial-gradient(circle, #2c2c2c, #000);
    box-shadow: 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.1);
}

.piece-white {
    background: radial-gradient(circle, #fff, #f0f0f0);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
}

/* 能量变化特效容器 */
.energy-change-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: visible; /* 允许特效溢出 */
    z-index: 100; /* 确保在最上层 */
}

/* 能量变化浮动文字 */
.energy-change-text {
    position: absolute;
    /* left 和 top 会在 JavaScript 中动态设置 */
    font-size: 0.9rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 101;
    color: #000000; /* 统一黑色 */
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.8), 0 0 6px rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

/* 浮动动画 - 使用CSS变量来实现动态起始位置 */
@keyframes energyFloat {
    0% {
        transform: translate(var(--start-x, -50%), var(--start-y, -50%));
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--start-x, -50%), calc(var(--start-y, -50%) - 70%));
        opacity: 0;
    }
}

/* 技能背景色 - 水墨风格 */
.skill-item[data-skill="sandstone"] {
    background: rgba(255, 255, 255, 0.3); /* 浅色 - CD未恢复的部分 */
}

.skill-item[data-skill="mountain"] {
    background: rgba(255, 255, 255, 0.3); /* 浅色 - CD未恢复的部分 */
}

.skill-item[data-skill="stillness"] {
    background: rgba(255, 255, 255, 0.3); /* 浅色 - CD未恢复的部分 */
}

.skill-item[data-skill="cleaner"] {
    background: rgba(255, 255, 255, 0.3); /* 浅色 - CD未恢复的部分 */
}

/* 技能名称 */
.skill-name {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    z-index: 3;
    pointer-events: none;
}

/* 技能信息文本 */
.skill-info {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    color: #666;
    z-index: 3;
    pointer-events: none;
    font-weight: 500;
}

/* 使用/取消按钮 */
.skill-action-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    background: white;
    color: #000;
    border: 2px solid #000;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 3;
    width: 80px;
    text-align: center;
    box-sizing: border-box;
    /* 防止按钮移动 */
    will-change: background, color;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.skill-action-btn:hover:not(:disabled) {
    background: #000;
    color: white;
    /* 确保hover时不改变transform */
    transform: translateY(-50%);
}

.skill-action-btn:disabled {
    background: #e9ecef;
    color: #adb5bd;
    border-color: #adb5bd;
    cursor: not-allowed;
    /* 确保禁用状态也不移动 */
    transform: translateY(-50%);
}

.skill-action-btn.cancel {
    background: #000;
    color: white;
}

.skill-action-btn.cancel:hover {
    background: #333;
    /* 确保hover时不改变transform */
    transform: translateY(-50%);
}

/* 技能说明包装器 - 固定高度容器 */
.skill-description-wrapper {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    overflow: hidden;
}

/* 技能说明内容 - 可滚动 */
.skill-description {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 0;
}

.skill-desc-item {
    font-size: 0.85rem;
    color: #495057;
    line-height: 1.4;
    margin: 0;
    padding: 6px 8px;
    background: rgba(248, 249, 250, 0.6);
    border-radius: 8px;
    border-left: 3px solid #6c757d;
}

.skill-desc-item strong {
    color: #343a40;
}

/* 规则说明文字样式 */
.skill-rules-text {
    font-size: 1rem;
    color: #495057;
    line-height: 1.8;
    padding: 20px 15px;
    text-align: center;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(233, 236, 239, 0.8));
    border-radius: 12px;
    border: 2px solid rgba(108, 117, 125, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 技能说明hover状态 */
.skill-desc-hover-description {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 15px;
    line-height: 1.6;
    padding: 12px 15px;
    background: rgba(248, 249, 250, 0.6);
    border-radius: 10px;
    border-left: 4px solid #6c757d;
    text-align: left;
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    overflow-y: auto;
    box-sizing: border-box;
}

.skill-desc-hover-description strong {
    color: #343a40;
    font-weight: 700;
}

.skill-desc-hover-stats {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.skill-desc-hover-stats span {
    font-weight: 600;
    background: rgba(248, 249, 250, 0.8);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(108, 117, 125, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 技能说明提示文字 */
.skill-desc-hint {
    font-size: 0.75rem;
    color: #868e96;
    text-align: center;
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(233, 236, 239, 0.5);
    border-radius: 8px;
    border: 1px dashed rgba(108, 117, 125, 0.3);
}

.skill-desc-hint strong {
    font-weight: 700;
    color: #495057;
}

.message-box {
    width: 460px;
    min-height: 80px;
    padding: 15px 20px;
}

.message-box .status {
    margin-bottom: 10px;
}

.message-content {
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.6;
    text-align: center;
    white-space: pre-line; /* 支持换行符 */
}

/* 游戏记录面板 */
.log-panel {
    width: 460px;
    max-height: 400px;
    padding: 0;
    overflow: hidden;
    display: none; /* 默认隐藏 */
    margin-top: 15px;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9), rgba(233, 236, 239, 0.9));
    border-bottom: 2px solid rgba(108, 117, 125, 0.2);
}

.log-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #343a40;
}

.log-clear-btn {
    padding: 4px 12px;
    font-size: 0.8rem;
    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.log-clear-btn:hover {
    background: #dc3545;
    color: #fff;
}

.log-content {
    max-height: 320px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
}

.log-content::-webkit-scrollbar {
    width: 8px;
}

.log-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.log-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.log-empty {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-size: 0.9rem;
}

.log-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #fff;
    border-radius: 6px;
    border-left: 3px solid #6c757d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.log-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateX(2px);
}

.log-item.log-black {
    border-left-color: #343a40;
}

.log-item.log-white {
    border-left-color: #e9ecef;
}

.log-item.log-type-skill {
    background: rgba(255, 235, 59, 0.1);
}

.log-item.log-type-undo {
    background: rgba(255, 152, 0, 0.1);
}

.log-number {
    font-size: 0.75rem;
    color: #6c757d;
    min-width: 35px;
    font-weight: 600;
}

.log-content-text {
    flex: 1;
    color: #495057;
}

.log-icon {
    margin-right: 6px;
    font-size: 1rem;
}

.log-item.log-black .log-icon {
    color: #000;
}

.log-item.log-white .log-icon {
    color: #fff;
    text-shadow: 
        -1px -1px 0 #000,  
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        -1px 0 0 #000,
        1px 0 0 #000,
        0 -1px 0 #000,
        0 1px 0 #000;
}

.message-content .bold-text {
    font-weight: 700;
}

/* 控制面板样式 */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-item {
    padding: 10px;
    background: rgba(248, 249, 250, 0.6);
    border-radius: 8px;
}

/* Toggle开关组 */
.control-item.control-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 按钮组 */
.control-item.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
}

.control-label {
    font-size: 0.95rem;
    color: #495057;
    font-weight: 500;
}

/* 控制面板按钮样式 */
.control-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background: white;
    color: #000;
    border: 2px solid #000;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    white-space: nowrap;
}

.control-btn:hover {
    background: #000;
    color: white;
    transform: none;
    box-shadow: none;
}

.control-btn:active {
    transform: scale(0.98);
}


/* Toggle开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #495057;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* 棋子步数显示 */
.cell .step-number {
    position: absolute;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    pointer-events: none;
    z-index: 2;
}

.cell.white .step-number {
    color: #000;
    text-shadow: 0 0 2px rgba(255,255,255,0.5);
}

/* 分享按钮样式 */
/* 分享网站区域 */
.share-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.share-tip {
    font-size: 0.85rem;
    color: #6c757d;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-tip.show {
    opacity: 1;
}

/* 版本号信息 */
.version-info {
    text-align: center;
    font-size: 0.75rem;
    color: #868e96;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* 移动端优化 */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    h1 {
        font-size: 2rem;
    }
    
    .game-container {
        flex-direction: column;
        align-items: center;
        padding: 0 10px;
    }
    
    .info-panel {
        width: 100%;
        max-width: 400px;
    }
    
    .info-panel-left {
        order: 1;
        margin-bottom: 20px;
    }
    
    .board-area {
        order: 2;
        margin-bottom: 20px;
    }
    
    .info-panel-right {
        order: 3;
    }

    /* 棋盘容器吸顶效果 */
    /* .board-container {
        position: sticky;
        top: 0;
        z-index: 100;
    } */

    .board {
        width: min(410px, 85vw);
        height: min(410px, 85vw);
    }
    
    .board-grid {
        top: 22px;
        left: 22px;
        width: calc(100% - 44px);
        height: calc(100% - 44px);
    }

    .cell {
        width: 24px;
        height: 24px;
    }
    
    .message-box {
        width: min(410px, 85vw);
        min-height: 70px;
    }
    
    .message-box .status {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .message-box .status::before {
        width: 18px;
        height: 18px;
    }
    
    /* 游戏记录面板移动端适配 */
    .log-panel {
        width: 100%;
        max-width: min(410px, 85vw);
        max-height: 350px;
    }
    
    .log-content {
        max-height: 270px;
    }
    
    .log-item {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .log-number {
        font-size: 0.7rem;
        min-width: 30px;
    }
    
    .log-icon {
        font-size: 0.9rem;
    }

}

@media (max-width: 480px) {
    /* 棋盘容器吸顶效果 */
    /* .board-container {
        position: sticky;
        top: 0;
        z-index: 100;
    } */

    .board {
        width: min(350px, 90vw);
        height: min(350px, 90vw);
    }
    
    .board-grid {
        top: 18px;
        left: 18px;
        width: calc(100% - 36px);
        height: calc(100% - 36px);
    }

    .cell {
        width: 22px;
        height: 22px;
    }
    
    .message-box {
        width: min(350px, 90vw);
        min-height: 65px;
    }
    
    .message-box .status {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .message-box .status::before {
        width: 16px;
        height: 16px;
    }
    
    .control-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    /* 小屏幕游戏记录面板优化 */
    .log-panel {
        width: 100%;
        max-width: min(350px, 90vw);
        max-height: 300px;
    }
    
    .log-content {
        max-height: 220px;
        padding: 8px;
    }
    
    .log-item {
        padding: 5px 6px;
        margin-bottom: 4px;
        font-size: 0.75rem;
        border-radius: 4px;
    }
    
    .log-number {
        font-size: 0.65rem;
        min-width: 25px;
    }
    
    .log-icon {
        font-size: 0.85rem;
        margin-right: 4px;
    }
    
    .log-header {
        padding: 10px 12px;
    }
    
    .log-title {
        font-size: 0.85rem;
    }
    
    .log-clear-btn {
        padding: 3px 10px;
        font-size: 0.75rem;
    }

}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .cell:hover::before {
        display: none;
    }
    
    .cell:active::before {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        background: rgba(108, 117, 125, 0.3);
        border-radius: 50%;
    }
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(108, 117, 125, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #495057;
    background: rgba(108, 117, 125, 0.1);
}

.modal-header {
    margin-bottom: 25px;
    text-align: center;
}

.modal-header h2 {
    color: #495057;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    color: #495057;
}

/* 配置弹窗特定样式 */
.config-modal {
    max-width: 600px;
}

.config-section {
    margin-bottom: 25px;
}

.config-section-title {
    color: #343a40;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(108, 117, 125, 0.2);
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.config-item label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

.config-item label.config-disabled {
    color: #adb5bd;
}

.config-item input {
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
}

.config-item input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.config-item input:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
}

.skill-config-item {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(222, 226, 230, 0.6);
}

.skill-config-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.skill-config-info {
    flex: 1;
}

.skill-config-name {
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
    display: block;
    margin-bottom: 4px;
}

.skill-toggle {
    flex-shrink: 0;
    margin-top: 2px;
}

.skill-config-desc {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.config-note {
    padding: 12px 15px;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #856404;
    margin-top: 15px;
}

.config-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.config-action-btn {
    flex: 1;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn {
    background: white;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.reset-btn:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.save-btn {
    background: #000;
    color: white;
    border: 2px solid #000;
}

.save-btn:hover {
    background: white;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.author-main {
    text-align: center;
    padding: 20px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    border: 1px solid rgba(108, 117, 125, 0.1);
}

.author-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 20px;
}

.author-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.link-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.link-icon::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.link-icon:hover::after {
    opacity: 1;
}

.link-icon svg {
    width: 24px;
    height: 24px;
}

/* 统一黑白图标样式 */
.blog-icon,
.github-icon,
.bilibili-icon {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
}

.blog-icon:hover,
.github-icon:hover,
.bilibili-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
}

/* 博客图标字母样式 */
.icon-letter {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(108, 117, 125, 0.1);
}

.info-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
}

.info-value {
    color: #495057;
    font-size: 1.1rem;
}

/* 移动端弹窗优化 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .info-item {
        padding: 12px;
    }
    
    .info-value, .info-link {
        font-size: 1rem;
    }
    
    .subtitle-container {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .detail-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 60px;
    }
    
    .author-name {
        font-size: 1.2rem;
    }
    
    .link-icon {
        width: 44px;
        height: 44px;
    }
    
    .link-icon svg {
        width: 22px;
        height: 22px;
    }
    
    /* 配置弹窗移动端适配 */
    .config-modal {
        max-width: 95%;
    }
    
    .config-section-title {
        font-size: 1.1rem;
    }
    
    .skill-config-item {
        padding: 12px;
    }
    
    .config-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        padding: 15px;
        margin: 10px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .author-info {
        gap: 15px;
    }
    
    .info-item {
        padding: 10px;
    }
    
    .author-name {
        font-size: 1.1rem;
    }
    
    .link-icon {
        width: 40px;
        height: 40px;
    }
    
    .link-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .author-links {
        gap: 15px;
    }
    
    .detail-btn {
        padding: 7px 14px;
        font-size: 0.85rem;
        min-width: 55px;
    }
    
    /* 配置弹窗小屏幕适配 */
    .config-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .config-section-title {
        font-size: 1rem;
    }
    
    .skill-config-item {
        padding: 10px;
    }
    
    .skill-config-name {
        font-size: 0.95rem;
    }
    
    .config-item input {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .config-action-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}
