/* 鎴块棿澶у巺鏍峰紡 */

#lobby-view {
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative;
}

#lobby-view.active {
    display: flex !important;
    flex-direction: column;
}

/* 鑳屾櫙瑙嗛 */
.lobby-bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.9;
}

/* 瑙嗛閬僵灞?*/
.lobby-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.7) 0%,
        rgba(10, 10, 10, 0.85) 50%,
        rgba(10, 10, 10, 0.9) 100%
    );
    z-index: -1;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: rgba(26, 26, 26, 0.9);
    border: 2px solid var(--accent-gold);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    gap: 15px;
    flex-wrap: wrap;
    animation: slideDown 0.6s ease-out;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.online-players {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background-color: rgba(139, 0, 0, 0.3);
    border: 2px solid var(--accent-gold);
    border-radius: 5px;
    animation: pulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
    }
}

.online-players:hover {
    transform: scale(1.05);
    background-color: rgba(139, 0, 0, 0.5);
}

.online-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.online-count {
    color: var(--accent-gold);
    font-size: 18px;
    font-weight: bold;
    animation: countPulse 1s ease-in-out infinite;
}

@keyframes countPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    object-fit: cover;
    background-color: var(--bg-darker);
}

#player-nickname {
    width: 200px;
}

.lobby-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

.game-title {
    text-align: center;
    font-size: 48px;
    color: var(--accent-gold);
    text-shadow: 
        0 0 20px var(--accent-red),
        0 0 40px var(--accent-red),
        0 0 60px rgba(139, 0, 0, 0.5);
    margin-bottom: 40px;
    font-family: 'Georgia', serif;
    letter-spacing: 4px;
    animation: titleGlow 3s ease-in-out infinite, fadeInScale 0.8s ease-out;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            0 0 20px var(--accent-red),
            0 0 40px var(--accent-red),
            0 0 60px rgba(139, 0, 0, 0.5);
    }
    50% {
        text-shadow: 
            0 0 30px var(--accent-red),
            0 0 60px var(--accent-red),
            0 0 80px rgba(139, 0, 0, 0.8),
            0 0 100px rgba(212, 175, 55, 0.3);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lobby-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lobby-actions button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lobby-actions button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.lobby-actions button:hover::before {
    width: 300px;
    height: 300px;
}

.lobby-actions button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.room-list-container {
    background-color: rgba(26, 26, 26, 0.9);
    border: 2px solid var(--accent-gold);
    padding: 20px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out 0.5s both;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
    transition: box-shadow 0.3s ease;
}

.room-list-container:hover {
    box-shadow: 0 6px 30px rgba(212, 175, 55, 0.4);
}

.room-list-container h2 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    text-align: center;
}

.room-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-darker);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.room-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-gold);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.room-item:hover {
    border-color: var(--accent-gold);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    background-color: rgba(26, 26, 26, 0.8);
}

.room-item:hover::before {
    transform: scaleY(1);
}

.room-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.room-name {
    font-size: 18px;
    color: var(--accent-gold);
    font-weight: bold;
}

.host-id {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: normal;
    margin-left: 8px;
    opacity: 0.8;
}

.room-players {
    font-size: 14px;
    color: var(--text-secondary);
}

.room-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
}


/* 3D鍫嗗彔鎸夐挳缁勬牱寮?- From Uiverse.io by MBerkayHamurcu - Modified */
.stacked-buttons-container {
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.stackedForm {
    --form-btn-color-9: #8b2a3d;
    --form-btn-color-8: #8b2a3d;
    --form-btn-color-7: #8b2a3d;
    --form-btn-color-6: #8b2a3d;
    --form-btn-color-5: #8b2a3d;
    --form-btn-color-4: #8b2a3d;
    --form-btn-color-3: #8b2a3d;
    --form-btn-color-2: #8b2a3d;
    --form-btn-color: #8b2a3d;
    --form-btn-active-color: #dd3355;
}

.stackedForm .wrapper {
    position: relative;
    transform: skewY(4deg);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 40px;
}

.stackedForm button {
    width: 100px;
    height: 40px;
    position: relative;
    padding: 10px;
    background: linear-gradient(135deg, var(--form-btn-color) 0%, rgba(0,0,0,0.3) 100%);
    border: 1px solid rgba(204, 34, 68, 0.5);
    box-shadow: 
        0 0 10px rgba(204, 34, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    cursor: pointer;
    list-style: none;
    z-index: var(--i);
    transition: all 0.3s ease;
    color: #fff;
    display: block;
    margin: 0;
    text-shadow: 0 0 5px rgba(204, 34, 68, 0.8), 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    letter-spacing: 1px;
}

.stackedForm button span {
    display: block;
    position: relative;
    z-index: 2;
}

.stackedForm button::before {
    position: absolute;
    content: "";
    background: linear-gradient(135deg, var(--form-btn-color) 0%, rgba(0,0,0,0.2) 100%);
    top: 0;
    right: -30px;
    width: 30px;
    height: 40px;
    transform-origin: left;
    transform: skewY(-45deg);
    transition: 0.3s;
}

.stackedForm button::after {
    position: absolute;
    content: "";
    background: linear-gradient(135deg, var(--form-btn-color) 0%, rgba(0,0,0,0.2) 100%);
    width: 100px;
    height: 30px;
    top: -30px;
    left: 0;
    transform-origin: bottom;
    transform: skewX(-45deg);
    transition: 0.3s;
}

/* 鎵€鏈夋寜閽娇鐢ㄧ粺涓€鐨勬笎鍙樻牱寮?*/

.stackedForm button:hover,
.stackedForm button:focus {
    transform: translateX(-20px) scale(1.05);
    box-shadow: 
        0 0 20px rgba(221, 51, 85, 0.8),
        0 0 40px rgba(221, 51, 85, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    border-color: rgba(221, 51, 85, 1);
}

.stackedForm button:hover,
.stackedForm button:hover::before,
.stackedForm button:hover::after,
.stackedForm button:focus,
.stackedForm button:focus::before,
.stackedForm button:focus::after {
    background: linear-gradient(135deg, var(--form-btn-active-color) 0%, rgba(139, 26, 61, 0.8) 100%);
    filter: brightness(1.3);
}

.stackedForm button:active {
    transform: translateX(-10px) scale(0.98);
}


/* 鍫嗗彔鎸夐挳鐗瑰畾鑳屾櫙鍥剧墖 */
#announcement-btn {
    background: linear-gradient(135deg, rgba(139, 42, 61, 0.7) 0%, rgba(0,0,0,0.3) 100%), 
                url('/images/gogao.png');
    background-size: cover, 200%;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

#announcement-btn::before {
    background: linear-gradient(135deg, var(--form-btn-color) 0%, rgba(0,0,0,0.2) 100%);
}

#shop-btn {
    background: linear-gradient(135deg, rgba(139, 42, 61, 0.7) 0%, rgba(0,0,0,0.3) 100%), 
                url('/images/shangdian.png');
    background-size: cover, 200%;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

#shop-btn::before {
    background: linear-gradient(135deg, var(--form-btn-color) 0%, rgba(0,0,0,0.2) 100%);
}

#ranking-btn {
    background: linear-gradient(135deg, rgba(139, 42, 61, 0.7) 0%, rgba(0,0,0,0.3) 100%), 
                url('/images/paihang.png');
    background-size: cover, 200%;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

#ranking-btn::before {
    background: linear-gradient(135deg, var(--form-btn-color) 0%, rgba(0,0,0,0.2) 100%);
}
