/* Pet Memorial Frontend Form Styles */

.pet-memorial-submit-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.pet-memorial-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 表单区域 */
.form-section {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.form-section:last-child {
    margin-bottom: 0;
}

/* 表单消息区域 */
.form-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Terms & Conditions Agreement Styles */
.terms-agreement {
    margin-top: 15px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.terms-text {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    white-space: nowrap;
}

/* Center terms text in popup */
.pet-memorial-popup-container .form-group.terms-agreement {
    text-align: center;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    display: block;
}

.pet-memorial-popup-container .terms-text {
    text-align: center;
    width: 100%;
    display: block;
}

/* Mobile responsive for terms text */
@media (max-width: 768px) {
    .terms-text {
        white-space: normal;
        word-wrap: break-word;
    }
}

.terms-text a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-text a:hover {
    color: #005a87;
    text-decoration: underline;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message.info {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.pet-memorial-popup-container .form-group {
    margin-bottom: 15px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 0px;
    position: relative;
}

/* 字符计数器样式 */
.char-counter {
    position: absolute;
    bottom: -35px;
    right: 0;
    font-size: 11px;
    color: #666;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    z-index: 10;
}

/* 确保form-group有足够的空间容纳字符计数器 */
.form-group:has(.char-counter) {
    margin-bottom: 45px !important;
}

/* 对于不支持:has()的浏览器的备用方案 */
.form-group {
    margin-bottom: 0px;
    position: relative;
}

.pet-memorial-popup-container .form-group:has(.char-counter) {
    margin-bottom: 45px !important;
}

.char-counter .current-count {
    font-weight: 600;
    color: #667eea;
}

.char-counter .max-count {
    color: #999;
}

.char-counter.warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.char-counter.warning .current-count {
    color: #ff9800;
}

.char-counter.danger {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
}

.char-counter.danger .current-count {
    color: #f44336;
}

/* 旧式字符计数器样式 (.char-count) */
.char-count {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 5px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    display: inline-block;
}

.char-count span {
    font-weight: 600;
    color: #667eea;
}

.char-count.warning {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.char-count.warning span {
    color: #ff9800;
}

.char-count.danger {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
}

.char-count.danger span {
    color: #f44336;
}

/* 表单行布局 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.half-width {
    flex: 0 0 calc(50% - 12px);
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    letter-spacing: -0.2px;
}

.form-group.required label .required {
    color: #e74c3c;
    margin-left: 4px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background-color: #fff;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.12);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    text-align: right;
    font-size: 13px;
    color: #6c757d;
    margin-top: 8px;
    font-weight: 500;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 20px;
    display: inline-block;
    float: right;
}

.char-count.warning {
    color: #f39c12;
    background-color: #fef9e7;
}

.char-count.danger {
    color: #e74c3c;
    background-color: #fdf2f2;
}

/* Avatar Upload Styles */
.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border: 2px dashed #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background-color: #f8f9fa;
    position: relative;
}

.avatar-preview:hover {
    border-color: #3498db;
    background-color: #e3f2fd;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    text-align: center;
    color: #6c757d;
}

.avatar-placeholder i {
    font-size: 20px;
    margin-bottom: 6px;
    display: block;
    color: #adb5bd;
}

.avatar-placeholder p {
    font-size: 11px;
    margin: 0;
    font-weight: 500;
}

/* Pet Photos Grid */
.pet-photos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    justify-content: flex-start;
}

.photo-upload-item {
    position: relative;
}

.photo-preview {
    width: 80px;
    height: 80px;
    border: 2px dashed #e9ecef;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f8f9fa;
    overflow: hidden;
    position: relative;
}

.photo-preview:hover {
    border-color: #3498db;
    background-color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.photo-placeholder {
    text-align: center;
    color: #6c757d;
}

.photo-placeholder i {
    font-size: 16px;
    margin-bottom: 4px;
    display: block;
    color: #adb5bd;
}

.photo-placeholder p {
    font-size: 10px;
    margin: 0;
    font-weight: 500;
}

/* Buttons */
.btn-upload-avatar,
.btn-upload-photo,
.btn-remove-photo,
.btn-submit {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-upload-avatar,
.btn-upload-photo {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-upload-avatar:hover,
.btn-upload-photo:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-upload-avatar:active,
.btn-upload-photo:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.btn-remove-photo {
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 6px 12px;
}

.btn-remove-photo:hover {
    background-color: #c0392b;
}

.btn-submit {
    background-color: #27ae60;
    color: white;
    font-size: 16px;
    padding: 15px 40px;
    margin: 0 auto;
    display: block;
    min-width: 200px;
}

.btn-submit:hover {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-submit:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Form Actions */
.form-actions {
    text-align: center;
    padding: 20px 0;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    color: #7f8c8d;
}

.loading-spinner::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Messages */
.form-message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pet-memorial-submit-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .form-section {
        padding: 20px 15px;
    }
    
    .pet-photos-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .avatar-preview {
        width: 120px;
        height: 120px;
    }
    
    .photo-preview {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .pet-photos-container {
        grid-template-columns: 1fr;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .btn-submit {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Validation Styles */
.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group .error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* ===== POPUP STYLES ===== */

/* Popup Overlay */
.pet-memorial-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Popup Container */
.pet-memorial-popup-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 95vh;
    background: #fff;
    background-image: url('../image/paw.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    animation: popupSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

/* 粘性头部区域 */
.pet-memorial-popup-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(255, 183, 149, 0.95) 0%, rgba(205, 175, 149, 0.95) 50%, rgba(222, 204, 190, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px 16px 0 0;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Popup Header */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid #e1e8ed;
}

.popup-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.popup-close {
    position: absolute !important;
    margin: 0 !important;
    top: 15px !important;
    right: 15px !important;
    background: rgba(255, 71, 87, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    font-size: 18px !important;
    color: white !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    z-index: 1001 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.popup-close:hover {
    background: rgba(255, 55, 66, 0.95) !important;
    color: white !important;
    transform: scale(1.1) rotate(90deg) !important;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4) !important;
}



/* Adjust form styles in popup */
.pet-memorial-popup-container {
    display: flex;
    flex-direction: column;
}

/* 弹窗内容区域样式 */
.pet-memorial-popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Compact spacing for popup forms */
.pet-memorial-popup-container .form-section {
    padding: 15px 20px;
    margin-bottom: 15px;
}

.pet-memorial-popup-container .form-row {
    margin-bottom: 15px;
    gap: 15px;
}

.pet-memorial-popup-container .step-header {
    margin-bottom: 20px;
}

.pet-memorial-popup-container .step-header h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.pet-memorial-popup-container .form-title {
    text-align: center;
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    padding: 20px 60px 15px;
}

/* Body scroll prevention */
body.popup-open {
    overflow: hidden;
    padding-right: 17px; /* Prevent layout shift */
}

/* Ensure popup content scrolls properly */
.pet-memorial-popup-overlay {
    overflow: hidden; /* Prevent background scroll */
}



/* Responsive Design for Popup */
@media (max-width: 768px) {
    .pet-memorial-popup-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .popup-header {
        padding: 15px 20px;
    }
    
    .popup-title {
        font-size: 20px;
    }
    
    .popup-close {
        font-size: 16px !important;
        width: 32px !important;
        height: 32px !important;
    }
    
    .pet-memorial-popup-container {
        max-height: calc(95vh - 70px);
    }
    
    .pet-memorial-popup-container {
        padding: 15px;
    }
    
    .pet-memorial-popup-container .form-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .pet-memorial-popup-container {
        width: 98%;
        max-height: 98vh;
        border-radius: 8px;
        padding: 10px;
    }
    
    .popup-header {
        padding: 12px 15px;
    }
    
    .popup-title {
        font-size: 18px;
    }
    

    
    .pet-memorial-popup-container .form-section {
        padding: 12px;
        gap: 15px;
    }
    
    .pet-memorial-popup-container .form-group {
        margin-bottom: 12px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Popup Animation Effects */
.pet-memorial-popup-overlay.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.pet-memorial-popup-overlay.fade-out {
    animation: fadeOut 0.3s ease-out;
}

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

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

/* Custom scrollbar for popup content */
.pet-memorial-popup-container::-webkit-scrollbar {
    width: 8px;
}

.pet-memorial-popup-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pet-memorial-popup-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.pet-memorial-popup-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Popup Messages */
.popup-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    animation: slideDown 0.3s ease-out;
}

.popup-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.popup-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* 表单提交状态样式 */
.pet-memorial-popup.submitting {
    pointer-events: none;
}

.pet-memorial-popup.submitting .pet-memorial-popup-container {
    pointer-events: auto;
    position: relative;
}

.pet-memorial-popup.submitting .pet-memorial-popup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    pointer-events: none;
}

.pet-memorial-popup.submitting #popup-close {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 弹窗样式 */
.pet-memorial-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.pet-memorial-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.pet-memorial-popup.show {
    display: flex;
}



/* 关闭按钮样式已在前面定义 */

/* 多步骤表单样式 */
.multistep-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 表单头部 */
.form-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.form-header h2 {
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 600;
}

/* 进度条 */
.progress-container {
    margin-bottom: 20px;
}



/* 步骤指示器 */
.step-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    gap: 0;
    position: relative;
    padding: 15px 20px 25px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
}

.step-indicator:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    left: calc(50% + 30px);
    right: calc(-50% + 30px);
    height: 4px;
    background: rgba(124, 179, 66, 0.6);
    z-index: 1;
    border-radius: 2px;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #7CB342;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 当前步骤 - 橙黄色 */
.step-indicator.active .step-number {
    background: #F5A623;
    color: white;
    transform: scale(1.05);
}

/* 已完成步骤 - 绿色带对勾 */
.step-indicator.completed .step-number {
    background: #7CB342;
    color: white;
}

.step-indicator.completed .step-number::before {
    content: '✓';
    font-size: 24px;
    font-weight: bold;
}

/* 步骤标签样式 */
.step-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 6px;
    text-align: center;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.step-title {
    display: none;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .pet-memorial-popup-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .step-indicators {
        margin: 0;
        padding: 10px 15px 20px;
        gap: 0;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .step-indicator {
        flex: 1;
        max-width: none;
    }
    
    .step-indicator:not(:last-child)::after {
        left: calc(50% + 35px);
        right: calc(-50% + 35px);
        height: 4px;
        top: 35px;
        z-index: 1;
    }
    
    .step-number {
        width: 70px;
        height: 70px;
        font-size: 16px;
        font-weight: 700;
    }
    
    .step-indicator.completed .step-number::before {
        font-size: 28px;
    }

    .step-label {
        font-size: 10px;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .pet-memorial-popup-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .step-indicators {
        margin: 0;
        padding: 8px 10px 15px;
        gap: 0;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .step-indicator:not(:last-child)::after {
        left: calc(50% + 30px);
        right: calc(-50% + 30px);
        height: 4px;
        top: 30px;
        z-index: 1;
    }
    
    .step-number {
        width: 60px;
        height: 60px;
        font-size: 14px;
        font-weight: 700;
    }
    
    .step-indicator.completed .step-number::before {
        font-size: 24px;
    }

    .step-label {
        font-size: 9px;
        margin-top: 4px;
    }

    .pet-memorial-popup-container .form-title {
        font-size: 18px;
        padding: 15px 50px 10px;
    }

    /* 480px断点下的按钮样式 */
    .form-navigation {
        padding: 15px 15px;
    }

    .nav-buttons {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        display: flex;
    }

    .btn-nav {
        width: 120px;
        min-width: 120px;
        max-width: 120px;
        height: 44px;
        padding: 0 20px;
        font-size: 13px;
    }

    /* 480px下只有NEXT按钮时居中显示 */
    .form-navigation .btn-prev[style*="display: none"] + .btn-next:only-child,
    .form-navigation .btn-prev[style*="display:none"] + .btn-next:only-child,
    .form-navigation .btn-prev[style*="display: none"] ~ .btn-next:not([style*="display: none"]):not([style*="display:none"]):not([style*="display: block"]):not([style*="display:block"]) {
        margin-left: auto;
        margin-right: auto;
    }

    /* 480px备用选择器：使用jQuery的隐藏状态 */
    .form-navigation .btn-prev.ui-screen-reader-only + .btn-next:only-child,
    .form-navigation .btn-prev:hidden + .btn-next:only-child {
        margin-left: auto;
        margin-right: auto;
    }

    /* 480px当只有NEXT按钮可见时，整个导航栏居中显示 */
    .form-navigation:has(.btn-prev[style*="display: none"]):has(.btn-next:not([style*="display: none"])) {
        justify-content: center;
    }

    /* 480px JavaScript控制的Step1居中样式 */
    .form-navigation.step1-active {
        justify-content: center;
    }

    .form-navigation.step1-active .btn-next {
        margin-left: auto;
        margin-right: auto;
    }
}

/* 表单内容区域 */
.form-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    min-height: 0;
    max-height: calc(100vh - 200px);
}

/* 表单步骤 */
.form-step {
    display: none;
    animation: stepFadeIn 0.4s ease-in-out;
}

.form-step.active {
    display: block;
}

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

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.step-header p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
}

.step-title-main {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.step-description {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

/* 确认步骤样式 */
.confirmation-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-content {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.summary-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.no-avatar {
    color: #adb5bd;
    font-style: italic;
}

/* 表单底部导航 */
.form-footer,
.form-navigation {
    padding: 15px 30px;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-buttons {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

/* Ensure submit button in navigation aligns to the right (override global centering) */
.form-navigation .btn-submit,
.nav-buttons .btn-submit {
    margin: 0;           /* reset global margin: 0 auto */
    margin-left: auto;   /* push to the right */
    margin-right: 0;
}

.btn-nav {
    padding: 14px 28px;
    border: none;
    border-radius: 50px !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    position: relative;
    overflow: hidden;
    /* 新增：使用 Flex 居中，修复移动端（含 iOS Safari）文字未居中问题 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center; /* 保证文字水平居中 */
    line-height: 1; /* 避免不一致的行高导致的垂直偏移 */
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box; /* 新增：确保固定高度时包含边框 */
}

.btn-prev {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 2px solid rgba(108, 117, 125, 0.2);
    border-radius: 50px !important;
}

.btn-prev:hover {
    background: rgba(108, 117, 125, 0.15);
    border-color: rgba(108, 117, 125, 0.3);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.2);
}

.btn-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border-radius: 50px !important;
}

.btn-next:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FFD700 100%);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.4);
}

.btn-submit {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    border-radius: 50px !important;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    max-width: 2000px;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

/* 当上一步按钮隐藏时，下一步按钮对齐到右侧 */
.nav-buttons .btn-prev[style*="display: none"] + .btn-next,
.nav-buttons .btn-prev[style*="display:none"] + .btn-next,
.form-navigation .btn-prev[style*="display: none"] + .btn-next,
.form-navigation .btn-prev[style*="display:none"] + .btn-next {
    margin-left: auto;
}

/* 当下一步按钮隐藏时，提交按钮对齐到右侧 */
.nav-buttons .btn-next[style*="display: none"] ~ .btn-submit,
.nav-buttons .btn-next[style*="display:none"] ~ .btn-submit,
.nav-buttons .btn-next:not([style*="display: block"]):not([style*="display:block"]) ~ .btn-submit,
.form-navigation .btn-next[style*="display: none"] ~ .btn-submit,
.form-navigation .btn-next[style*="display:none"] ~ .btn-submit,
.form-navigation .btn-next:not([style*="display: block"]):not([style*="display:block"]) ~ .btn-submit {
    margin-left: auto;
}

/* 强制Submit按钮在最后一步时对齐到右侧 */
.nav-buttons .btn-submit:only-child,
.form-navigation .btn-submit:only-child {
    margin-left: auto;
}

.nav-buttons .btn-prev + .btn-submit,
.form-navigation .btn-prev + .btn-submit {
    margin-left: auto;
}

/* 当Next按钮隐藏且只有Previous和Submit按钮时，Submit按钮自然对齐到右侧 */
.form-navigation .btn-next[style*="display: none"] ~ .btn-submit:not([style*="display: none"]),
.form-navigation .btn-next[style*="display:none"] ~ .btn-submit:not([style*="display: none"]) {
    /* space-between布局会自动处理对齐，无需额外margin */
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-nav:active {
    transform: translateY(0) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pet-memorial-popup-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .form-header {
        padding: 20px 20px 15px;
    }
    
    .form-header h2 {
        font-size: 20px;
    }
    
    .step-indicators {
        margin-top: 10px;
    }
    
    .form-content {
        padding: 20px;
    }
    
    .step-title-main {
        font-size: 14px;
    }
    
    .form-footer,
    .form-navigation {
        padding: 15px 20px;
        /* 保持水平布局 */
        gap: 15px;
    }

    .nav-buttons {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        display: flex;
    }

    .btn-nav {
        flex: 1;
        max-width: 160px;
        text-align: center;
        border-radius: 50px !important;
        /* 固定高度 + 去除垂直 padding，确保视觉与几何同时居中 */
        height: 48px;
        padding: 0 24px;
        line-height: 1;
        /* 确保两个按钮宽度一致 */
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }

    /* 当只有NEXT按钮时（step1），居中显示 */
    .form-navigation .btn-prev[style*="display: none"] + .btn-next:only-child,
    .form-navigation .btn-prev[style*="display:none"] + .btn-next:only-child,
    .form-navigation .btn-prev[style*="display: none"] ~ .btn-next:not([style*="display: none"]):not([style*="display:none"]):not([style*="display: block"]):not([style*="display:block"]) {
        margin-left: auto;
        margin-right: auto;
    }

    /* 备用选择器：使用jQuery的隐藏状态 */
    .form-navigation .btn-prev.ui-screen-reader-only + .btn-next:only-child,
    .form-navigation .btn-prev:hidden + .btn-next:only-child {
        margin-left: auto;
        margin-right: auto;
    }

    /* 当只有NEXT按钮可见时，整个导航栏居中显示 */
    .form-navigation:has(.btn-prev[style*="display: none"]):has(.btn-next:not([style*="display: none"])) {
        justify-content: center;
    }

    /* JavaScript控制的Step1居中样式 */
    .form-navigation.step1-active {
        justify-content: center;
    }

    .form-navigation.step1-active .btn-next {
        margin-left: auto;
        margin-right: auto;
    }
    
    /* 响应式表单行 */
    .form-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .half-width {
        flex: none;
    }
    
    /* 移动端特定行保持水平布局 */
    .form-row.dates-row,
    .form-row.owner-info-row {
        flex-direction: row;
        gap: 10px;
    }
    
    .form-row.dates-row .half-width,
    .form-row.owner-info-row .half-width {
        flex: 1;
        min-width: 0;
    }
    
    /* 移动端日期和城市输入框样式优化 */
    .form-row.dates-row input[type="date"],
    .form-row.owner-info-row input[type="text"] {
        font-size: 14px;
        padding: 10px 8px;
    }
    
    .form-row.dates-row label,
    .form-row.owner-info-row label {
        font-size: 12px;
        margin-bottom: 4px;
    }

/* ===================================
   STEP 5: PREMIUM SUBMISSION RESULT STYLES (DRIBBBLE QUALITY)
   =================================== */

/* CSS自定义属性变量 */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --error-gradient: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-hard: 0 20px 60px -10px rgba(50, 50, 93, 0.25);
}

/* 步骤5主容器 - 高级玻璃态设计 */
.form-step[data-step="5"] {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    min-height: 600px;
    position: relative;
    /* 移除 overflow: hidden 以允许 Canvas 动画显示 */
}

.form-step[data-step="5"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        rgba(102, 126, 234, 0.1) 0deg,
        rgba(118, 75, 162, 0.1) 72deg,
        rgba(16, 185, 129, 0.1) 144deg,
        rgba(239, 68, 68, 0.1) 216deg,
        rgba(102, 126, 234, 0.1) 288deg,
        rgba(102, 126, 234, 0.1) 360deg
    );
    animation: rotate 20s linear infinite;
    z-index: -2;
}

.form-step[data-step="5"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.05) 0%,
        rgba(118, 75, 162, 0.05) 50%,
        rgba(16, 185, 129, 0.05) 100%
    );
    backdrop-filter: blur(20px);
    z-index: -1;
}

.form-step[data-step="5"] .form-section {
    padding: 60px 40px;
    border-radius: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft), var(--shadow-hard);
    position: relative;
    /* 移除 overflow: hidden 以允许 Canvas 动画显示 */
}

/* 粒子背景效果 */
.form-step[data-step="5"] .form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 219, 98, 0.1) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* 结果内容包装器 - 居中对齐 */
.result-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
    z-index: 10;
}

/* 成功和错误状态容器 */
.result-state {
    position: relative;
    z-index: 10;
    animation: premiumFadeIn 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

@keyframes premiumFadeIn {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 大对号设计容器 - 居中放大 - 使用更强的选择器 */
.form-step[data-step="5"] .success-checkmark-container,
.form-step[data-step="5"] .error-checkmark-container {
    margin: 0 auto 50px auto !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 250px !important;
    height: 250px !important;
    /* 确保容器在父元素中完全居中 */
    margin-left: auto !important;
    margin-right: auto !important;
}

.success-checkmark-container::before, .error-checkmark-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: iconGlow 4s ease-in-out infinite;
    pointer-events: none;
}

.success-checkmark-container::before {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
}

.error-checkmark-container::before {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.2) 0%, transparent 70%);
}

@keyframes iconGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

.success-checkmark, .error-checkmark {
    display: inline-block;
    position: relative;
    animation: premiumScaleIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
    transform-origin: center;
    filter: drop-shadow(0 15px 50px rgba(0, 0, 0, 0.2));
}

@keyframes premiumScaleIn {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 成功状态特殊动画 */
.success-checkmark {
    animation: premiumScaleIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               premiumSuccessPulse 4s ease-in-out infinite;
    animation-delay: 0.3s, 1.5s;
}

@keyframes premiumSuccessPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.08) rotate(3deg); }
    50% { transform: scale(1.15) rotate(0deg); }
    75% { transform: scale(1.08) rotate(-3deg); }
}

/* 高级文本内容设计 */
.result-text-content {
    margin-bottom: 50px;
    position: relative;
}

.result-title {
    font-size: 48px;
    font-weight: 200;
    margin-bottom: 24px;
    letter-spacing: -1px;
    line-height: 1.1;
    animation: titleSlideIn 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.6s;
    opacity: 0;
    transform: translateY(30px);
}

.success-state .result-title {
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.error-state .result-title {
    background: var(--error-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

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

.result-message {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    animation: messageSlideIn 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.8s;
    opacity: 0;
    transform: translateY(20px);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

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

/* 高级详情项设计 */
.result-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: detailsSlideIn 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 1s;
    opacity: 0;
    transform: translateY(20px);
    margin-bottom: 40px;
}

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

.detail-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.detail-item:hover::before {
    left: 100%;
}

/* 高级按钮设计 */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: actionsSlideIn 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 1.2s;
    opacity: 0;
    transform: translateY(30px);
}

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

.btn-result {
    padding: 20px 48px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.btn-result::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.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-result::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-result:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

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

.btn-result:hover::after {
    opacity: 1;
}

.btn-result:active {
    transform: translateY(-3px) scale(1.01);
}

/* 关闭按钮 - 超大圆角设计 - 使用更强的选择器 */
.form-step[data-step="5"] .btn-result-close {
    background: var(--success-gradient) !important;
    color: white !important;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.5) !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 40px !important; /* 增大圆角 */
    font-weight: 600 !important;
    font-size: 17px !important;
    padding: 22px 52px !important;
    min-height: 68px !important;
}

.btn-result-close:hover {
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.7);
    transform: translateY(-8px) scale(1.04);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-result-close:active {
    transform: translateY(-4px) scale(1.02);
}

/* 重试按钮设计 - 大圆角 */
.btn-result-retry {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 35px;
    font-weight: 600;
    font-size: 17px;
    padding: 22px 52px;
    min-height: 68px;
}

.btn-result-retry:hover {
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.7);
    transform: translateY(-8px) scale(1.04);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-result-retry:active {
    transform: translateY(-4px) scale(1.02);
}

/* 返回按钮设计 - 大圆角 */
.btn-result-back {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(25px);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 35px;
    font-weight: 600;
    font-size: 17px;
    padding: 22px 52px;
    min-height: 68px;
}

.btn-result-back:hover {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    transform: translateY(-8px) scale(1.04);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-result-back:active {
    transform: translateY(-4px) scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-step[data-step="5"] .form-section {
        padding: 40px 24px;
        border-radius: 20px;
    }

    .result-title {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .result-message {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .detail-item {
        font-size: 14px;
        padding: 12px 20px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .btn-result {
        font-size: 15px;
        padding: 18px 40px;
        min-height: 58px;
        border-radius: 28px;
    }

    .form-step[data-step="5"] .btn-result-close,
    .form-step[data-step="5"] .btn-result-retry,
    .form-step[data-step="5"] .btn-result-back {
        font-size: 15px !important;
        padding: 20px 44px !important;
        min-height: 62px !important;
        border-radius: 35px !important; /* 移动端也保持大圆角 */
    }

    .result-icon-container::before {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .form-step[data-step="5"] .form-section {
        padding: 30px 20px;
    }

    .result-title {
        font-size: 28px;
    }

    .result-message {
        font-size: 15px;
    }

    .btn-result {
        font-size: 14px;
        padding: 16px 36px;
        min-height: 54px;
        border-radius: 26px;
    }

    .form-step[data-step="5"] .btn-result-close,
    .form-step[data-step="5"] .btn-result-retry,
    .form-step[data-step="5"] .btn-result-back {
        font-size: 14px !important;
        padding: 18px 40px !important;
        min-height: 58px !important;
        border-radius: 32px !important; /* 小屏幕保持大圆角 */
    }
}


/* 高级视觉效果 */
.result-icon svg {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.result-icon:hover svg {
    transform: rotate(8deg) scale(1.1);
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.3));
}

.success-icon:hover svg {
    filter: drop-shadow(0 15px 50px rgba(16, 185, 129, 0.6));
}

.error-icon:hover svg {
    filter: drop-shadow(0 15px 50px rgba(239, 68, 68, 0.6));
}

/* 磁性悬浮效果 */
.btn-result.magnetic {
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 涟漪动画 */
@keyframes rippleEffect {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 悬浮粒子动画 */
@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-30px) translateX(20px);
    }
}

/* 移动端step5样式优化 */
@media (max-width: 768px) {
    .form-step[data-step="5"] .result-message {
        color: #2c3e50; /* 深色字体，提高对比度 */
        font-weight: 500; /* 稍微加粗以提高可读性 */
    }

    .form-step[data-step="5"] .detail-item {
        background: rgba(255, 255, 255, 0.38); /* 背景透明度改为38% */
        color: #34495e; /* 深色字体，提高对比度 */
        font-weight: 400; /* 正常字重 */
        border: 1px solid rgba(52, 73, 94, 0.2); /* 添加边框以提高可见度 */
    }

    .form-step[data-step="5"] .detail-item:hover {
        background: rgba(255, 255, 255, 0.45); /* 悬停时稍微提高透明度 */
        color: #2c3e50; /* 悬停时字体颜色更深 */
    }
}

@media (max-width: 480px) {
    .form-step[data-step="5"] .result-message {
        color: #2c3e50; /* 小屏幕也使用深色字体 */
        font-weight: 500;
    }

    .form-step[data-step="5"] .detail-item {
        background: rgba(255, 255, 255, 0.38); /* 小屏幕背景透明度保持38% */
        color: #34495e; /* 小屏幕深色字体 */
        font-weight: 400;
        border: 1px solid rgba(52, 73, 94, 0.2);
    }
}


