/* Professional Game Interface Styles */

/* Game Container */
.game-container {
    position: relative;
    width: 100%;
    height: 80vh;
    max-height: 650px;
    background-color: rgba(16, 16, 32, 0.7);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(138, 43, 226, 0.25) inset;
    margin: 0 auto 40px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    backdrop-filter: blur(5px);
}

/* Game Menu */
.game-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: 
        radial-gradient(circle at center, rgba(20, 20, 40, 0.5) 0%, rgba(10, 10, 22, 0.8) 100%),
        linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, transparent 50%);
    z-index: 10;
    backdrop-filter: blur(8px);
}

/* Game UI */
.game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 5;
    background: linear-gradient(to bottom, rgba(10, 10, 20, 0.75), rgba(10, 10, 20, 0));
    backdrop-filter: blur(5px);
}

/* Score Container */
.score-container {
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.8), rgba(30, 30, 50, 0.8));
    padding: 14px 24px;
    border-radius: 15px;
    font-size: 1.2rem;
    color: white;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(138, 43, 226, 0.3);
    backdrop-filter: blur(5px);
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.score-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 0 20px rgba(138, 43, 226, 0.2);
}

.score {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.score span:first-child, 
.best-score span:first-child {
    margin-right: 8px;
    font-weight: 500;
    opacity: 0.9;
}

.score span:last-child, 
.best-score span:last-child {
    font-weight: 700;
    font-size: 1.3rem;
}

.best-score {
    color: #4dff7a;
    text-shadow: 0 0 10px rgba(50, 205, 50, 0.6);
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* Difficulty Container */
.difficulty-container {
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.8), rgba(30, 30, 50, 0.8));
    padding: 14px 24px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    color: white;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(138, 43, 226, 0.3);
    backdrop-filter: blur(5px);
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.difficulty-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 0 20px rgba(138, 43, 226, 0.2);
}

.level-progress-container {
    width: 120px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0 10px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.level-progress {
    height: 100%;
    background: linear-gradient(90deg, #ff8c00, #ffb700);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.7);
}

/* Lives Container */
.lives-container {
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.8), rgba(30, 30, 50, 0.8));
    padding: 10px 14px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: white;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(138, 43, 226, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    margin-right: 15px;
    position: relative;
    right: 25px;
}

.lives-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 0 20px rgba(138, 43, 226, 0.2);
}

#lives {
    display: flex;
    margin-left: 5px;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

#lives span {
    width: 15px;
    height: 15px;
    margin-right: 3px;
    position: relative;
    animation: heartbeat 1.5s infinite alternate ease-in-out;
}

#lives span:last-child {
    margin-right: 0;
}

/* 修改生命心形图标显示方式 */
#lives span::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff3333'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes heartbeat {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* Game Over Screen */
.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: 
        radial-gradient(circle at center, rgba(20, 20, 40, 0.5) 0%, rgba(10, 10, 22, 0.8) 100%),
        linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, transparent 50%);
    z-index: 15;
    backdrop-filter: blur(8px);
}

.game-over-content {
    text-align: center;
    padding: 40px;
    background: linear-gradient(145deg, rgba(25, 25, 45, 0.8), rgba(15, 15, 35, 0.8));
    border-radius: 24px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    max-width: 550px;
    width: 85%;
    border: 1px solid rgba(138, 43, 226, 0.25);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    animation: floatIn 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.game-over-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(138, 43, 226, 0.1), transparent 60%);
    z-index: -1;
}

@keyframes floatIn {
    0% { opacity: 0; transform: translateY(50px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.game-over-content h2 {
    font-size: 3rem;
    background: linear-gradient(135deg, #8a2be2, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    text-shadow: 0 5px 15px rgba(138, 43, 226, 0.5);
    font-weight: 800;
    letter-spacing: 2px;
}

.game-over-content p {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.95);
}

.game-over-content p span {
    font-weight: 700;
    margin-left: 5px;
    font-size: 1.4rem;
}

/* Game Canvas */
#game-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: url('../images/knife-cursor.svg') 16 16, auto;
    z-index: 1;
    background: radial-gradient(circle at center, rgba(30, 30, 60, 0.15), transparent 70%);
}

#game-canvas:active {
    cursor: url('../images/knife-cursor-slash.svg') 16 16, auto;
}

/* Canvas Decoration - energy flows */
.canvas-effects {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.energy-flow {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.15), transparent);
    height: 2px;
    width: 100%;
    animation: flowAcross 8s infinite linear;
    opacity: 0;
}

.energy-flow:nth-child(1) {
    top: 20%;
    animation-delay: 0s;
}

.energy-flow:nth-child(2) {
    top: 40%;
    animation-delay: 2s;
}

.energy-flow:nth-child(3) {
    top: 60%;
    animation-delay: 4s;
}

.energy-flow:nth-child(4) {
    top: 80%;
    animation-delay: 6s;
}

@keyframes flowAcross {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Game Menu Content */
.menu-content {
    text-align: center;
    padding: 45px;
    background: linear-gradient(145deg, rgba(25, 25, 45, 0.8), rgba(15, 15, 35, 0.8));
    border-radius: 24px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 0 30px rgba(138, 43, 226, 0.1) inset;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(138, 43, 226, 0.25);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.menu-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(138, 43, 226, 0.1), transparent 50%);
    z-index: -1;
}

.menu-content:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 0 30px rgba(138, 43, 226, 0.2) inset;
}

.menu-content h2 {
    font-size: 2.6rem;
    background: linear-gradient(135deg, #8a2be2, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0 15px;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
    letter-spacing: 1px;
    font-weight: 700;
    position: relative;
}

.menu-content h2::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    -webkit-text-stroke: 4px rgba(75, 0, 130, 0.1);
    -webkit-text-fill-color: transparent;
    filter: blur(6px);
}

.menu-content p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-size: 1.05rem;
}

.menu-content .logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 
        0 0 30px rgba(138, 43, 226, 0.6),
        0 0 0 3px rgba(138, 43, 226, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 3px;
    background: rgba(20, 20, 35, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-content .logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 
        0 0 40px rgba(138, 43, 226, 0.8),
        0 0 0 4px rgba(138, 43, 226, 0.4);
}

/* Button Styles */
.btn-primary, .btn-secondary {
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 10px;
    letter-spacing: 1.2px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, #8a2be2, #6a1db4);
    color: white;
    box-shadow: 
        0 8px 25px rgba(138, 43, 226, 0.4),
        0 0 0 1px rgba(138, 43, 226, 0.5) inset;
    font-size: 0.95rem;
}

.btn-primary::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: all 0.5s ease;
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 35px rgba(138, 43, 226, 0.6),
        0 0 0 1px rgba(138, 43, 226, 0.6) inset;
}

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

.btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(138, 43, 226, 0.5),
        0 0 0 1px rgba(138, 43, 226, 0.6) inset;
}

.btn-secondary {
    background-color: rgba(20, 20, 35, 0.3);
    color: #a85af7;
    border: 2px solid rgba(138, 43, 226, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background-color: rgba(138, 43, 226, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(138, 43, 226, 0.6);
    color: #bb7aff;
}

.btn-secondary:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.btn-submit {
    padding: 16px 32px;
    background: linear-gradient(135deg, #ff8c00, #e67e00);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 25px rgba(255, 140, 0, 0.4),
        0 0 0 1px rgba(255, 140, 0, 0.5) inset;
    width: 100%;
    margin-top: 20px;
    letter-spacing: 1.2px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.btn-submit::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: all 0.5s ease;
}

.btn-submit:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 35px rgba(255, 140, 0, 0.6),
        0 0 0 1px rgba(255, 140, 0, 0.6) inset;
}

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

.btn-submit:active {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(255, 140, 0, 0.5),
        0 0 0 1px rgba(255, 140, 0, 0.6) inset;
}

/* Wallet Input Styles */
.wallet-input {
    margin: 25px 0;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.wallet-notice {
    color: #ff9d2f;
    font-size: 0.95rem;
    margin-bottom: 12px;
    text-align: left;
    opacity: 1;
    text-shadow: 0 0 5px rgba(255, 140, 0, 0.4);
    display: flex;
    align-items: center;
    font-weight: 500;
}

.wallet-notice::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #ff8c00, #ff6a00);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.6);
}

.wallet-input input {
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid rgba(138, 43, 226, 0.5);
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.8), rgba(30, 30, 50, 0.8));
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 15px rgba(138, 43, 226, 0.3);
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.wallet-input input::placeholder {
    color: rgba(255, 255, 255, 0.75);
    opacity: 1;
}

.wallet-input input:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 
        0 0 20px rgba(138, 43, 226, 0.5), 
        inset 0 2px 5px rgba(0, 0, 0, 0.3);
    background: linear-gradient(145deg, rgba(25, 25, 45, 0.8), rgba(35, 35, 60, 0.8));
}

/* Game Instructions Modal */
.how-to-play-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: 
        radial-gradient(circle at center, rgba(20, 20, 40, 0.5) 0%, rgba(10, 10, 22, 0.8) 100%),
        linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, transparent 50%);
    z-index: 20;
    backdrop-filter: blur(8px);
}

.modal-content {
    text-align: center;
    padding: 40px;
    background: linear-gradient(145deg, rgba(25, 25, 45, 0.8), rgba(15, 15, 35, 0.8));
    border-radius: 24px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    max-width: 550px;
    width: 90%;
    border: 1px solid rgba(138, 43, 226, 0.25);
    transform: translateY(0);
    animation: floatIn 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(138, 43, 226, 0.1), transparent 60%),
        radial-gradient(circle at 70% 30%, rgba(255, 140, 0, 0.05), transparent 60%);
    z-index: -1;
}

.modal-content h2 {
    font-size: 2.6rem;
    background: linear-gradient(135deg, #8a2be2, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    text-shadow: 0 5px 15px rgba(138, 43, 226, 0.5);
    font-weight: 700;
    letter-spacing: 1px;
}

.instructions {
    text-align: left;
    margin-bottom: 25px;
    background: rgba(15, 15, 25, 0.4);
    padding: 25px 30px;
    border-radius: 16px;
    border: 1px solid rgba(138, 43, 226, 0.2);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.instructions p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    line-height: 1.6;
    position: relative;
    padding-left: 30px;
}

.instructions p:last-child {
    margin-bottom: 0;
}

.instructions p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #8a2be2, #a85af7);
    border-radius: 50%;
    margin-right: 12px;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

/* Leaderboard Styles */
.leaderboard-container {
    background: linear-gradient(145deg, rgba(20, 20, 35, 0.7), rgba(15, 15, 30, 0.7));
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(138, 43, 226, 0.25);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}

.leaderboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(138, 43, 226, 0.1), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(255, 140, 0, 0.05), transparent 60%);
    z-index: -1;
}

.leaderboard-container h2 {
    text-align: center;
    background: linear-gradient(135deg, #8a2be2, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    font-size: 2.4rem;
    text-shadow: 0 5px 15px rgba(138, 43, 226, 0.5);
    letter-spacing: 1px;
    font-weight: 700;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: rgba(15, 15, 25, 0.4);
    padding: 8px;
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(138, 43, 226, 0.2);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.leaderboard-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 28px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.leaderboard-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leaderboard-tab:hover {
    color: white;
    transform: translateY(-3px);
}

.leaderboard-tab:hover::before {
    opacity: 1;
}

.leaderboard-tab.active {
    background: linear-gradient(135deg, #8a2be2, #a85af7);
    color: white;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

#leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: white;
    margin-top: 15px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    table-layout: fixed;
}

#leaderboard-table th {
    background: linear-gradient(145deg, rgba(35, 35, 60, 0.8), rgba(25, 25, 45, 0.8));
    padding: 18px 22px;
    text-align: left;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.25);
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
}

#leaderboard-table th:nth-child(1) {
    width: 8%;
    text-align: center;
}

#leaderboard-table th:nth-child(2) {
    width: 62%;
}

#leaderboard-table th:nth-child(3) {
    width: 15%;
    text-align: center;
}

#leaderboard-table th:nth-child(4) {
    width: 15%;
    text-align: center;
}

#leaderboard-table td {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    background: rgba(20, 20, 35, 0.3);
    transition: all 0.3s ease;
    word-break: break-all;
    white-space: normal;
}

/* 针对钱包地址的特殊样式 */
#leaderboard-table td:nth-child(2) {
    font-family: monospace;
    letter-spacing: -0.8px;
    font-weight: 500;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.95);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    padding: 18px 5px;
    text-overflow: initial;
    max-width: none;
    overflow: visible;
    text-align: left;
    width: 100%;
}

#leaderboard-table tr:hover td {
    background: rgba(138, 43, 226, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#leaderboard-table tr:nth-child(1) td {
    background: rgba(255, 215, 0, 0.1);
    font-weight: 700;
    border-left: 3px solid #ffd700;
}

#leaderboard-table tr:nth-child(1) td:first-child::before {
    content: '🏆';
    margin-right: 8px;
    font-size: 1.2rem;
}

#leaderboard-table tr:nth-child(2) td {
    background: rgba(192, 192, 192, 0.1);
    font-weight: 600;
    border-left: 3px solid #c0c0c0;
}

#leaderboard-table tr:nth-child(2) td:first-child::before {
    content: '🥈';
    margin-right: 8px;
    font-size: 1.2rem;
}

#leaderboard-table tr:nth-child(3) td {
    background: rgba(205, 127, 50, 0.1);
    font-weight: 600;
    border-left: 3px solid #cd7f32;
}

#leaderboard-table tr:nth-child(3) td:first-child::before {
    content: '🥉';
    margin-right: 8px;
    font-size: 1.2rem;
}

#leaderboard-table tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}

#leaderboard-table tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

/* Additional Animations */
@keyframes glowingBorder {
    0% { border-color: rgba(138, 43, 226, 0.3); }
    50% { border-color: rgba(138, 43, 226, 0.6); }
    100% { border-color: rgba(138, 43, 226, 0.3); }
}

.glow-border {
    animation: glowingBorder 2s infinite alternate ease-in-out;
}

/* Responsive Design Adjustments */
@media (max-width: 1200px) {
    .game-container {
        height: 70vh;
    }
    
    .game-ui {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .score-container, .difficulty-container, .lives-container {
        margin: 0 10px;
    }
    
    .leaderboard-container {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .game-container {
        height: 60vh;
        border-radius: 15px;
    }
    
    .game-ui {
        padding: 15px;
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .score-container, .difficulty-container, .lives-container {
        padding: 10px 15px;
        font-size: 1rem;
        margin: 5px;
        flex-grow: 1;
    }
    
    .score span:last-child, 
    .best-score span:last-child {
        font-size: 1.1rem;
    }
    
    .menu-content, .game-over-content, .modal-content {
        width: 90%;
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .menu-content h2, .game-over-content h2, .modal-content h2 {
        font-size: 2.2rem;
    }
    
    .leaderboard-container {
        padding: 25px 15px;
        border-radius: 20px;
    }
    
    .leaderboard-tab {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    #leaderboard-table th, #leaderboard-table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    #leaderboard-table td:nth-child(2) {
        font-size: 0.7rem;
        word-break: break-all;
        white-space: normal;
        padding: 12px 4px;
        letter-spacing: -0.9px;
    }
    
    #leaderboard-table th:nth-child(1) {
        width: 12%;
    }
    
    #leaderboard-table th:nth-child(2) {
        width: 48%;
    }
    
    .btn-primary, .btn-secondary, .btn-submit {
        padding: 12px 24px;
    }
    
    .wallet-input input {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .lives-container {
        padding: 8px 12px;
        min-width: 95px;
        max-width: 95px;
        width: 95px;
        position: relative;
        right: 20px;
    }
    
    #lives span {
        width: 13px;
        height: 13px;
        margin-right: 2px;
    }
}

@media (max-width: 480px) {
    .difficulty-container {
        display: none; /* Hide on very small screens */
    }
    
    .game-ui {
        padding: 10px;
        gap: 8px;
    }
    
    .score-container, .lives-container {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .leaderboard-container h2 {
        font-size: 2rem;
    }
    
    .instructions {
        padding: 15px;
    }
    
    .instructions p {
        font-size: 0.95rem;
        padding-left: 25px;
    }
    
    .instructions p::before {
        width: 14px;
        height: 14px;
    }
    
    #leaderboard-table th {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    
    #leaderboard-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    #leaderboard-table td:nth-child(2) {
        font-size: 0.64rem;
        padding: 10px 3px;
        word-break: break-all;
        white-space: normal;
        letter-spacing: -1px;
    }
    
    #leaderboard-table th:nth-child(1) {
        width: 15%;
    }
    
    #leaderboard-table th:nth-child(2) {
        width: 45%;
    }
    
    .wallet-input input {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .game-over-content {
        padding: 25px 15px;
    }
    
    .lives-container {
        padding: 6px 10px;
        min-width: 85px;
        max-width: 85px;
        width: 85px;
        right: 15px;
    }
    
    #lives span {
        width: 12px;
        height: 12px;
        margin-right: 2px;
    }
}

#leaderboard-table td:nth-child(1),
#leaderboard-table td:nth-child(3),
#leaderboard-table td:nth-child(4) {
    text-align: center;
} 