/* Splatoon 3 连连看游戏特色样式 */

:root {
    /* Splatoon 3 配色方案 */
    --splatoon-yellow: #FFD700;
    --splatoon-orange: #FF6B35;
    --splatoon-pink: #FF69B4;
    --splatoon-purple: #8A2BE2;
    --splatoon-blue: #00BFFF;
    --splatoon-green: #32CD32;
    --splatoon-cyan: #00FFFF;
    --dark-bg: #1a1a2e;
    --darker-bg: #16213e;
    --light-text: #ffffff;
    --shadow-glow: rgba(255, 215, 0, 0.3);
}

/* 全局样式覆盖 */
body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--light-text);
    font-family: 'Noto Sans SC', 'JetBrains Mono', sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 背景动画效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, var(--splatoon-pink) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--splatoon-blue) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--splatoon-yellow) 0%, transparent 50%);
    opacity: 0.1;
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(0, 191, 255, 0.1));
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    border-radius: 18px;
    z-index: -1;
}

.splash-pattern {
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="3" fill="%23FFD700" opacity="0.3"/><circle cx="80" cy="40" r="2" fill="%2300BFFF" opacity="0.4"/><circle cx="60" cy="80" r="4" fill="%23FF69B4" opacity="0.2"/></svg>');
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-45%, -55%) rotate(180deg); }
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--splatoon-yellow), var(--splatoon-orange), var(--splatoon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: 0 0 20px var(--shadow-glow);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 10px var(--splatoon-yellow)); }
    100% { filter: drop-shadow(0 0 20px var(--splatoon-orange)); }
}

h1 i {
    color: var(--splatoon-yellow);
    margin-right: 15px;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 版本信息样式 - 移到右上角 */
.version-info {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.version-badge {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
}

.feature-tip {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 300;
    box-shadow: none;
}

/* 游戏控件美化样式 */
.game-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--splatoon-orange), var(--splatoon-pink));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
    background: linear-gradient(135deg, var(--splatoon-pink), var(--splatoon-orange));
}

.primary-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.secondary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.secondary-btn:hover::before {
    left: 100%;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.secondary-btn:active {
    transform: translateY(0);
}

.score-display {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.score-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.score-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--splatoon-yellow);
    transform: translateY(-2px);
}

.score-item i {
    color: var(--splatoon-yellow);
    font-size: 1.1rem;
}

.score-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--splatoon-yellow);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.time-display {
    background: linear-gradient(135deg, var(--splatoon-blue), var(--splatoon-cyan)) !important;
    color: white !important;
}

.time-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

/* 游戏区域美化 */
.game-section {
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.game-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 215, 0, 0.05) 0%, 
        rgba(0, 191, 255, 0.05) 50%, 
        rgba(255, 105, 180, 0.05) 100%);
    z-index: -1;
}

.level-1::before {
    background: linear-gradient(45deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        rgba(255, 107, 53, 0.1) 100%);
}

.level-2::before {
    background: linear-gradient(45deg, 
        rgba(0, 191, 255, 0.1) 0%, 
        rgba(255, 105, 180, 0.1) 100%);
}

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

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--splatoon-yellow);
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.section-title i {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite alternate;
}

.level-badge {
    background: linear-gradient(135deg, var(--splatoon-orange), var(--splatoon-pink));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
}

.level-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--splatoon-yellow), var(--splatoon-orange));
    border-radius: 3px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(0, 191, 255, 0.2));
    border-radius: 12px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--light-text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.column-header i {
    color: var(--splatoon-yellow);
}

/* 游戏布局网格 */
.game-columns {
    display: grid;
    grid-template-columns: 1fr 150px 1fr;
    gap: 20px;
    align-items: start;
    position: relative;
    min-height: 400px;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.connection-area {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.connection-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.game-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.connection-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0.7;
}

.connection-guide i {
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

/* 游戏项目美化 */
.game-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    color: var(--light-text);
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.game-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.game-item:hover::before {
    left: 100%;
}

.game-item:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 107, 53, 0.2));
    border-color: var(--splatoon-yellow);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.game-item.selected {
    background: linear-gradient(135deg, var(--splatoon-orange), var(--splatoon-pink));
    color: white;
    border-color: var(--splatoon-yellow);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
    animation: selectedPulse 1s ease-in-out infinite alternate;
}

@keyframes selectedPulse {
    from {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    to {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
    }
}

.game-item.connected {
    background: linear-gradient(135deg, var(--splatoon-green), #228b22);
    border-color: var(--splatoon-green);
    color: white;
    cursor: default;
    transform: none;
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.4);
    animation: connectedSuccess 0.8s ease-in-out;
}

@keyframes connectedSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.game-item.wrong {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    border-color: #ff4444;
    animation: errorShake 0.5s ease-in-out, errorGlow 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* 连接线美化 */
.connection-line {
    stroke: var(--splatoon-green);
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    filter: drop-shadow(0 0 8px rgba(50, 205, 50, 0.8));
    animation: drawLine 0.6s ease-in-out, connectionGlow 2s ease-in-out infinite alternate;
}

@keyframes connectionGlow {
    from {
        filter: drop-shadow(0 0 8px rgba(50, 205, 50, 0.8));
    }
    to {
        filter: drop-shadow(0 0 15px rgba(50, 205, 50, 1));
    }
}

/* 时间显示样式 */
.time-display {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    color: #fff8dc;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.3);
}

/* Footer美化 */
footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-content a {
    color: var(--splatoon-yellow);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-content a:hover {
    color: var(--splatoon-orange);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.footer-icons {
    display: flex;
    gap: 15px;
    font-size: 1.2rem;
}

.footer-icons i {
    color: var(--splatoon-yellow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.footer-icons i:hover {
    color: var(--splatoon-orange);
    transform: scale(1.2);
}

.footer-icons i:nth-child(1) { animation-delay: 0s; }
.footer-icons i:nth-child(2) { animation-delay: 0.2s; }
.footer-icons i:nth-child(3) { animation-delay: 0.4s; }

.footer-icons i {
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 特殊视觉效果 */

/* 鼠标光标样式 */
.game-item {
    cursor: pointer;
}

.game-item:hover {
    cursor: pointer;
}

.game-item.connected {
    cursor: default;
}

/* 粒子效果背景 */
.container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--splatoon-yellow), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--splatoon-blue), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--splatoon-pink), transparent),
        radial-gradient(1px 1px at 130px 80px, var(--splatoon-green), transparent),
        radial-gradient(2px 2px at 160px 30px, var(--splatoon-orange), transparent);
    background-repeat: repeat;
    background-size: 200px 150px;
    opacity: 0.1;
    animation: particles 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes particles {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-200px, -150px); }
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid var(--splatoon-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: var(--light-text);
    font-size: 1.2rem;
    font-weight: 600;
}

/* 成功动画增强 */
.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--splatoon-green);
    z-index: 1000;
    animation: successBurst 1s ease-out forwards;
    pointer-events: none;
}

@keyframes successBurst {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

/* 连击效果 */
.combo-display {
    position: fixed;
    top: 20%;
    right: 5%;
    background: linear-gradient(135deg, var(--splatoon-orange), var(--splatoon-pink));
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.combo-display.show {
    transform: translateX(0);
    opacity: 1;
}

/* 错误提示美化 */
.error-hint {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 68, 68, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    animation: errorHint 2s ease-out;
    pointer-events: none;
    z-index: 100;
}

@keyframes errorHint {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-15px);
    }
}

/* 完成庆祝特效 */
.celebration-fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: firework 2s ease-out forwards;
}

@keyframes firework {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* 音效可视化 */
.sound-wave {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 2px;
    align-items: end;
}

.sound-bar {
    width: 3px;
    background: var(--splatoon-yellow);
    border-radius: 2px;
    opacity: 0.6;
    transition: height 0.1s ease;
}

.sound-bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.sound-bar:nth-child(2) { height: 15px; animation-delay: 0.1s; }
.sound-bar:nth-child(3) { height: 20px; animation-delay: 0.2s; }
.sound-bar:nth-child(4) { height: 15px; animation-delay: 0.3s; }
.sound-bar:nth-child(5) { height: 10px; animation-delay: 0.4s; }

.sound-wave.active .sound-bar {
    animation: soundPulse 0.5s ease-in-out;
}

@keyframes soundPulse {
    0%, 100% { height: 5px; }
    50% { height: 25px; }
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--splatoon-yellow);
    transform: scale(1.1);
}

.theme-toggle i {
    color: var(--splatoon-yellow);
    font-size: 1.2rem;
}

/* 按钮分组样式 */
.btn-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 响应式设计改进 */
@media (max-width: 768px) {
    header {
        padding: 20px 15px;
        margin-bottom: 30px;
    }
    
    h1 {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
        line-height: 1.4;
    }
      .version-info {
        position: static;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        margin-bottom: 15px;
        margin-top: 10px;
    }
      .version-badge, .feature-tip {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }
    
    .primary-btn, .secondary-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
      .score-display {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        max-width: 300px;
        margin: 0 auto;    }
    
    .score-item {
        padding: 8px 15px;
        font-size: 0.9rem;
        justify-content: center;
        min-width: 150px;
        text-align: center;
    }
    
    .game-columns {
        grid-template-columns: 1fr 120px 1fr;
        gap: 15px;
        min-height: 350px;
    }
    
    .connection-area {
        min-height: 350px;
    }
    
    .game-section {
        padding: 20px;
    }
    
    .game-item {
        padding: 12px 15px;
        font-size: 0.9rem;
        min-height: 45px;
    }
    
    .section-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .column-header {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .connection-guide {
        font-size: 0.8rem;
    }
}

/* 触摸友好的交互优化 */
@media (max-width: 768px) {
    .game-item {
        min-height: 48px; /* 提供足够的触摸目标尺寸 */
        font-size: 0.9rem;
        line-height: 1.3;
        padding: 12px 16px;
    }
    
    .btn {
        min-height: 44px; /* iOS推荐的最小触摸目标 */
        font-size: 0.9rem;
        padding: 12px 20px;
    }
    
    /* 增加触摸区域的视觉反馈 */
    .game-item:active {
        transform: scale(0.98);
        background: rgba(255, 215, 0, 0.3) !important;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* 防止双击缩放 */
.game-item, .btn {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

@media (max-width: 480px) {
    header {
        padding: 15px 10px;
        margin-bottom: 25px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 15px;
        line-height: 1.3;
        padding: 0 10px;
    }
      .version-info {
        position: static;
        flex-direction: row;
        justify-content: center;
        gap: 6px;
        margin-bottom: 12px;
        margin-top: 8px;
    }
      .version-badge, .feature-tip {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
        padding: 0 10px;
    }
    
    .primary-btn, .secondary-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 100%;
        max-width: 220px;
        justify-content: center;
    }
    
    .score-display {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;    }
    
    .score-item {
        padding: 6px 12px;
        font-size: 0.8rem;
        justify-content: center;
        min-width: auto;
        text-align: center;
    }
    
    .container {
        padding: 15px;
    }
    
    .game-columns {
        grid-template-columns: 1fr 80px 1fr;
        gap: 10px;
        min-height: 300px;
    }
    
    .connection-area {
        min-height: 300px;
    }
    
    .game-item {
        padding: 10px 12px;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .column-header {
        font-size: 0.8rem;
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .footer-content {
        font-size: 0.9rem;
    }
}

/* 超小屏幕优化 (360px以下) */
@media (max-width: 360px) {
    header {
        padding: 12px 8px;
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
      .subtitle {
        font-size: 0.85rem;
        margin-bottom: 12px;
        padding: 0 5px;
    }
    
    .version-info {
        position: static;
        flex-direction: row;
        justify-content: center;
        gap: 4px;
        margin-bottom: 10px;
        margin-top: 5px;
    }
    
    .version-badge, .feature-tip {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .game-controls {
        gap: 10px;
        padding: 0 5px;
    }
    
    .primary-btn, .secondary-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        max-width: 200px;
    }
    
    .score-item {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .game-columns {
        grid-template-columns: 1fr 70px 1fr;
        gap: 8px;
    }
    
    .game-item {
        padding: 8px 10px;
        font-size: 0.75rem;
        min-height: 35px;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    :root {
        --shadow-glow: rgba(255, 215, 0, 0.4);
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .game-item {
        border-width: 3px;
    }
    
    .connection-line {
        stroke-width: 5;
    }
    
    .score-item {
        border-width: 3px;
    }
}

/* 移动端专用布局优化 */
@media (max-width: 480px) {
    .game-controls {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 250px;
    }
      .score-display {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        max-width: 300px;
        justify-self: center;
        margin: 0 auto;
    }
    
    .score-item {
        font-size: 0.75rem;
        padding: 6px 10px;
        text-align: center;
    }
    
    .score-item:last-child {
        grid-column: span 2;
        max-width: 150px;
        margin: 0 auto;
    }
}

/* 移动端可读性优化 */
@media (max-width: 480px) {
    /* 增强文字对比度 */
    h1 {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
        margin-bottom: 10px;
    }
    
    .subtitle {
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
        color: rgba(255, 255, 255, 0.95);
    }
    
    /* 增强按钮视觉效果 */
    .btn {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    /* 改善分数显示 */
    .score-item {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 215, 0, 0.4);
        backdrop-filter: blur(8px);
    }
    
    /* 增强游戏项目的视觉反馈 */
    .game-item {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
        border: 2px solid rgba(255, 215, 0, 0.4);
    }
    
    .game-item.selected {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.8);
        border-color: var(--splatoon-yellow);
    }
    
    .game-item.connected {
        box-shadow: 0 4px 15px rgba(50, 205, 50, 0.6);
    }
    
    .game-item.wrong {
        box-shadow: 0 4px 15px rgba(255, 68, 68, 0.6);
    }
}

/* 版本切换区域 - 位于footer */
.version-switch {
    margin: 10px 0;
}

.version-switch .secondary-btn {
    font-size: 0.8rem;
    padding: 8px 16px;
    border-radius: 20px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.version-switch .secondary-btn:hover {
    opacity: 1;
}
