/* 留言页面样式 */
.message-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 0 80px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.message-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.message-hero .container {
    position: relative;
    z-index: 2;
}

.message-form {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    z-index: 2;
    font-size: 16px;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px 12px 45px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    background: white;
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* 文本域特殊样式 */
.textarea-wrapper {
    position: relative;
}

.textarea-wrapper .form-control {
    padding: 15px 20px;
    resize: vertical;
    min-height: 120px;
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 12px;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 文件上传样式 */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-upload-display {
    border: 2px dashed #e9ecef;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafbfc;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-upload-display:hover {
    border-color: #667eea;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.file-upload-display.has-file {
    border-color: #28a745;
    background: #f8fff8;
}

.file-upload-display.drag-over {
    border-color: #667eea;
    background: #f0f2ff;
    transform: scale(1.02);
}

.file-info {
    margin-top: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-radius: 8px;
    border: 1px solid #28a745;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-details {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-name {
    font-weight: 600;
    color: #155724;
    font-size: 14px;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.remove-file {
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 50%;
}

.remove-file:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.upload-tips {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* 图片预览样式 */
.image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    margin-top: 15px;
    border: 3px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 50px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:disabled {
    opacity: 0.7;
    transform: none;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

/* 联系信息样式 */
.contact-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 35px 30px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 15px;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-item-text h6 {
    margin: 0 0 5px 0;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.contact-item-text p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.contact-tips {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #fefefe 100%);
    border-radius: 12px;
    border: 1px solid #ffeaa7;
}

.contact-tips h6 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 14px;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #6c5700;
    font-size: 13px;
    line-height: 1.5;
}

.tips-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f39c12;
    font-weight: bold;
    font-size: 16px;
}

/* 文件列表样式 */
.file-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f8fff8 0%, #f0f8f0 100%);
    border-radius: 8px;
    border: 1px solid #28a745;
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.2);
}

.file-preview {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid #e9ecef;
}

.file-info-details {
    flex-grow: 1;
}

.file-info-details .file-name {
    font-weight: 600;
    color: #155724;
    font-size: 14px;
    margin-bottom: 3px;
    word-break: break-all;
}

.file-info-details .file-size {
    font-size: 12px;
    color: #6c757d;
}

.file-remove {
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.file-remove:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.upload-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #e7f3ff;
    border-radius: 6px;
    border: 1px solid #b3d7ff;
    margin-bottom: 10px;
    font-size: 13px;
    color: #0056b3;
}

.display-4 {
    font-size: 2.5rem;
}


/* 多文件拖拽状态 */
.file-upload-display.multi-drag-over {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f2ff 0%, #e8ebff 100%);
    transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-hero {
        padding: 80px 0 60px;
    }

    .message-form {
        margin: -40px 15px 0;
        padding: 30px 20px;
        border-radius: 15px;
    }

    .form-control {
        font-size: 16px; /* 防止iOS自动缩放 */
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }

    .contact-icon {
        margin: 0 0 15px 0;
    }

    .btn-submit {
        padding: 12px 30px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .message-form {
        padding: 25px 15px;
    }

    .file-upload-display {
        padding: 20px 15px;
        min-height: 100px;
    }

    .contact-info {
        margin-top: 20px;
        padding: 25px 20px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-form {
    animation: fadeInUp 0.6s ease-out;
}

.contact-info {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* 加载状态 */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* 成功状态动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.file-upload-display.has-file {
    animation: pulse 2s infinite;
}