/**
 * 捏泡泡纸模拟器样式
 * 模拟真实的泡泡纸手感和视觉效果
 */

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

body {
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header with language selector */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.language-selector {
    margin-left: 10px;
}

#language-select {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 14px;
    color: #333;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

#language-select:hover {
    border-color: #4a90e2;
}

.bubble-wrap {
    width: 100%;
    height: 550px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bubble-grid {
    display: grid;
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(10, 40px);
    grid-gap: 10px;
    width: fit-content;
    height: fit-content;
}

.bubble {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.bubble::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.8),
        inset -2px -2px 4px rgba(0, 0, 0, 0.2),
        1px 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.bubble.popped::after {
    background: linear-gradient(145deg, #e6e6e6, #d0d0d0);
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
}

.bubble.popping::after {
    animation: pop 0.2s ease forwards;
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(0.95);
    }
}

.combo-popover {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #4a90e2, #357abd);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.combo-increase {
    position: absolute;
    color: #4a90e2;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    z-index: 10;
    animation: float-up 1.2s ease-out forwards;
}

@keyframes float-up {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    10% {
        opacity: 1;
        transform: translateY(-5px) scale(1.2);
    }

    80% {
        opacity: 1;
        transform: translateY(-30px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
}

.completion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    animation: fade-in 0.5s ease;
}

.completion-card {
    width: 80%;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.completion-title {
    font-size: 24px;
    font-weight: bold;
    color: #4a90e2;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.completion-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
    font-size: 16px;
    color: #666;
}

.completion-button {
    background: linear-gradient(145deg, #4a90e2, #357abd);
    color: white;
    padding: 10px 30px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.completion-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.completion-button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 双进度条样式 */
.progress-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin: 10px 0 20px;
    gap: 10px;
}

.progress-block {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.progress-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    text-align: center;
}

.progress-bar {
    height: 18px;
    background-color: #e0e0e0;
    border-radius: 9px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 9px;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.combo-fill {
    background: linear-gradient(90deg, #50c878, #4a90e2);
}

.completion-fill {
    background: linear-gradient(90deg, #ff9966, #ff5e62);
}

/* Footer styles */
.footer {
    width: 100%;
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #888;
    padding: 10px 0;
}

.footer a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #357abd;
    text-decoration: underline;
}

/* Game description section styles */
.game-description {
    width: 100%;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.game-description p {
    color: #444;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: left;
}

.game-features h2 {
    font-size: 18px;
    color: #4a90e2;
    margin-bottom: 10px;
    text-align: left;
}

.game-features ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.game-features li {
    color: #666;
    font-size: 14px;
    padding: 8px 12px;
    background: rgba(74, 144, 226, 0.05);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-features li:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateX(2px);
    transition: all 0.2s ease;
}