/* GMTPet Auth CSS - Optimized Layout v5.0 */

/* 登录框容器 */
#gmt-overlay { 
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100% !important; 
    height: 100% !important; 
    background: rgba(0,0,0,0.95) !important; 
    z-index: 2147483647 !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    opacity: 1 !important; 
    visibility: visible !important;
    animation: gmtFadeIn 0.3s ease !important;
}

@keyframes gmtFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 登录成功后隐藏 */
html.gmt-auth-verified #gmt-overlay,
body.gmt-auth-verified #gmt-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -9999 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* 模态框 */
#gmt-modal { 
    background: #f1f8e9; 
    padding: 30px; 
    border-radius: 15px; 
    width: 92%; 
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7); 
    animation: gmtSlideUp 0.4s ease !important;
    transform: translateZ(0);
}

@keyframes gmtSlideUp {
    from { 
        transform: translateY(20px) translateZ(0);
        opacity: 0; 
    }
    to { 
        transform: translateY(0) translateZ(0);
        opacity: 1; 
    }
}

/* 标题 */
.gmt-header { 
    color: #2e7d32; 
    text-align: center; 
    margin-bottom: 25px; 
    font-weight: bold; 
    font-size: 19px; 
    line-height: 1.4;
}

/* 输入框 */
.gmt-input { 
    width: 100% !important; 
    padding: 12px 15px !important; 
    margin-bottom: 15px !important; 
    border: 1px solid #a5d6a7 !important; 
    border-radius: 6px !important; 
    height: 48px !important; 
    box-sizing: border-box !important;
    background: white !important;
    font-size: 16px !important;
    font-family: inherit !important;
}

.gmt-input:focus {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
    outline: none !important;
}

/* 验证码区域 */
.gmt-otp-section {
    margin-bottom: 15px !important;
}

/* 验证码输入框 */
.otp-input {
    letter-spacing: 2px;
    text-align: center;
    font-weight: bold;
    font-size: 18px !important;
}

/* 验证码按钮 - 单行全宽 */
.send-otp-btn.gmt-full-width {
    width: 100% !important;
    background: #81c784 !important; 
    color: white !important; 
    border-radius: 6px !important; 
    border: none !important; 
    height: 48px !important; 
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 16px !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    margin-top: 5px !important;
    padding: 0 15px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}

/* 按钮悬停效果 */
.send-otp-btn:hover { 
    background: #4caf50 !important; 
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

.send-otp-btn:active { 
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* 按钮禁用状态 */
.send-otp-btn:disabled { 
    background: #cccccc !important; 
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 登录按钮 */
.main-log-btn { 
    width: 100%; 
    background: #4caf50; 
    color: white; 
    border: none; 
    padding: 12px; 
    border-radius: 6px; 
    font-size: 18px; 
    cursor: pointer; 
    font-weight: bold; 
    height: 52px; 
    transition: all 0.3s ease;
    font-family: inherit;
    margin-top: 5px;
}

.main-log-btn:hover { 
    background: #388e3c; 
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.main-log-btn:active { 
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.main-log-btn:disabled { 
    background: #cccccc; 
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 状态显示 */
#gmt-status { 
    text-align: center; 
    margin-top: 15px; 
    font-weight: bold; 
    min-height: 40px; 
    font-size: 14px;
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* 底部链接 */
.footer-links { 
    text-align: center; 
    margin-top: 20px; 
    font-size: 14px;
}

.footer-links a { 
    color: #2e7d32; 
    text-decoration: none; 
    font-weight: bold; 
    transition: color 0.3s;
    padding: 0 5px;
}

.footer-links a:hover { 
    color: #1b5e20; 
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 480px) {
    #gmt-modal {
        width: 95%;
        padding: 20px;
        margin: 0 10px;
    }
    
    .gmt-header {
        font-size: 17px;
        margin-bottom: 20px;
    }
    
    .gmt-input {
        height: 46px !important;
        font-size: 15px !important;
    }
    
    .send-otp-btn.gmt-full-width {
        height: 46px !important;
        font-size: 15px !important;
    }
    
    .main-log-btn {
        height: 48px;
        font-size: 16px;
    }
    
    .footer-links {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    #gmt-modal {
        padding: 15px;
    }
    
    .gmt-header {
        font-size: 16px;
    }
    
    .send-otp-btn.gmt-full-width {
        font-size: 14px !important;
        padding: 0 10px !important;
    }
}