/* 
 * 星辰加密系统 - 星座选择模态窗口样式
 * 版本: v1.0.1
 * 最后更新: 2024-06-07
 */

/* 星座选择弹窗样式 */
.constellation-modal {
    position: fixed;
    overflow: hidden;
    touch-action: none;
    max-width: 100vw;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: opacity;
    visibility: hidden;
    transform: translateZ(0);
}

.constellation-modal.show {
    opacity: 1;
    visibility: visible;
}

.constellation-modal-content {
    background: rgba(40, 42, 54, 0.95);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    box-shadow: 0 0 30px rgba(139, 233, 253, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    will-change: transform;
}

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

.constellation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.constellation-btn {
    background: rgba(68, 71, 90, 0.7);
    border: 1px solid rgba(139, 233, 253, 0.3);
    color: #f8f8f2;
    padding: 15px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.constellation-btn:hover {
    background: rgba(68, 71, 90, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(139, 233, 253, 0.7);
}

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

.constellation-btn i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #8be9fd;
    transition: transform 0.3s ease;
}

.constellation-btn span {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 简化按钮背景效果，减少渲染压力 */
.constellation-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(139, 233, 253, 0.3), rgba(80, 250, 123, 0.3));
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.constellation-btn:hover::before {
    opacity: 0.5;
}

/* 简化其他过渡动画 */
@keyframes btn-pulse {
    0% { box-shadow: 0 0 8px rgba(139, 233, 253, 0.5); }
    100% { box-shadow: 0 0 15px rgba(139, 233, 253, 0.8); }
}

@keyframes starlight {
    0% { opacity: 0.7; filter: blur(1px); }
    100% { opacity: 1; filter: blur(0); }
}

/* 简化模态框动画 */
@keyframes modalFadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 关闭按钮 */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: #f8f8f2;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #ff5555;
    transform: rotate(90deg);
}

/* 标题样式 */
.modal-title {
    text-align: center;
    color: #8be9fd;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(139, 233, 253, 0.5);
}

/* 响应式布局 */
@media (max-width: 480px) {
    .constellation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .constellation-modal-content {
        padding: 20px;
    }
    
    .constellation-btn {
        padding: 10px;
    }
    
    .constellation-btn i {
        font-size: 20px;
    }
    
    .constellation-btn span {
        font-size: 12px;
    }
}

.constellation-select-btn {
    position: relative;
    padding: 12px 24px;
    background: rgba(13, 17, 23, 0.8);
    border: 2px solid transparent;
    border-radius: 8px;
    color: #f8f8f2;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 15px rgba(139, 233, 253, 0.1);
    display: block;
    margin: 0 auto;
}

.constellation-select-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8be9fd, #bd93f9, #ff79c6);
    border-radius: 8px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

.constellation-select-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 233, 253, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: starPulse 2s ease-in-out infinite;
}

.constellation-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(139, 233, 253, 0.2);
    text-shadow: 0 0 8px rgba(248, 248, 242, 0.5);
}

.constellation-select-btn:active {
    transform: translateY(1px);
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes starPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
}

.constellation-container {
    max-width: 100%;
    overflow-x: hidden;
}