/**
 * 政务钱包登记页面样式
 */

/* 页面容器 */
.wallet-registration-page {
    position: relative;
    width: 375px;
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: 80px;
    background-image: url('../../tupian/897.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 响应式支持 */
@media (max-width: 374px) {
    .wallet-registration-page {
        transform: scale(0.9);
        transform-origin: top center;
    }
}

@media (min-width: 768px) {
    .wallet-registration-page {
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
}

/* 标题区域动画 */
.title-section {
    animation: slideInDown 0.8s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮通用样式 */
.wallet-registration-page button {
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.wallet-registration-page button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2) !important;
}

.wallet-registration-page button:active {
    transform: translateY(0);
}

/* 图片按钮区域 */
.image-buttons {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 表单区域 */
.form-section {
    animation: slideInUp 0.8s ease-out 0.4s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表单输入框样式 */
.form-group input,
.form-group select,
.form-group textarea {
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c61f0d;
    box-shadow: 0 0 0 2px rgba(198,31,13,0.2);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #999;
}

/* 提交按钮特殊效果 */
.form-section button[type="submit"] {
    position: relative;
    overflow: hidden;
}

.form-section button[type="submit"]:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.form-section button[type="submit"]:hover:before {
    left: 100%;
}

/* 底部按钮区域 */
.bottom-buttons {
    animation: slideInRight 0.8s ease-out 0.6s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 成功页面动画 */
.success-section {
    animation: successSlideIn 0.8s ease-out;
}

@keyframes successSlideIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) rotateY(90deg);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05) rotateY(0deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
    }
}

/* 成功图标弹跳动画 */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-20px);
    }
    70% {
        transform: translateY(-10px);
    }
    90% {
        transform: translateY(-4px);
    }
}

/* 进度条展开动画 */
@keyframes expandWidth {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 60px;
        opacity: 1;
    }
}

/* 成功页面按钮悬停效果 */
.success-section button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3) !important;
}

/* 图片弹窗样式 */
#imageModal {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

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

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

#imageModal > div {
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 图片容器样式 */
#imageContainer img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* 关闭按钮悬停效果 */
#imageModal button:hover,
#groupChatModal button:hover {
    background: #a01810 !important;
    transform: scale(1.1);
}

/* 群聊弹窗样式 */
#groupChatModal {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

#groupChatModal > div {
    animation: zoomIn 0.3s ease-out;
}

/* 群聊按钮悬停效果 */
#groupChatModal button[onclick="joinGroupChat()"]:hover {
    background: linear-gradient(135deg, #7d3c98, #8e44ad) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142,68,173,0.4) !important;
}

/* 联系方式弹窗样式 */
#contactModal {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

#contactModal > div {
    animation: zoomIn 0.3s ease-out;
}

/* 联系方式按钮悬停效果 */
#contactModal button[onclick="addContact()"]:hover {
    background: linear-gradient(135deg, #1e8449, #27ae60) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39,174,96,0.4) !important;
}

/* 表单验证错误样式 */
.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #e74c3c;
}

.form-group input:invalid:focus,
.form-group select:invalid:focus,
.form-group textarea:invalid:focus {
    box-shadow: 0 0 0 2px rgba(231,76,60,0.2);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 移动端优化 */
@media (max-width: 480px) {
    .wallet-registration-page {
        width: 100%;
        padding: 0 10px;
    }
    
    .title-section,
    .form-section {
        width: calc(100% - 20px) !important;
        left: 10px !important;
    }
    
    .image-buttons,
    .bottom-buttons {
        width: calc(100% - 20px) !important;
        left: 10px !important;
    }
    
    .image-buttons button,
    .bottom-buttons button {
        width: calc(50% - 5px) !important;
        font-size: 12px !important;
    }
    
    /* 成功页面移动端优化 */
    .success-section {
        width: calc(100% - 40px) !important;
        padding: 40px 20px !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .success-section h2 {
        font-size: 20px !important;
    }
    
    .success-section p {
        font-size: 14px !important;
    }
    
    .success-section button {
        font-size: 12px !important;
        height: 40px !important;
    }
}

/* 平板端优化 */
@media (min-width: 768px) and (max-width: 1024px) {
    .wallet-registration-page {
        width: 500px;
    }
    
    .title-section,
    .form-section,
    .image-buttons,
    .bottom-buttons {
        width: 480px !important;
    }
    
    .image-buttons button,
    .bottom-buttons button {
        width: 230px !important;
    }
    
    /* 成功页面平板端优化 */
    .success-section {
        width: 450px !important;
        padding: 60px 40px !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .success-section h2 {
        font-size: 28px !important;
    }
    
    .success-section p {
        font-size: 18px !important;
    }
}
