/* BitFlower Card Styles - 公共样式文件 */
/* 版本: v2.0.0 - 完整样式集合 */

/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 卡片容器 */
.card-container {
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transform-origin: center;
    transition: transform 0.3s ease;
}

/* 卡片头部 */
.card-header {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    padding: 20px;
    text-align: center;
    position: relative;
}

.logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 动画区域 */
.animation-container {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
}

.animation-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

/* 卡片内容 */
.card-content {
    padding: 25px;
}

.recipient-info {
    text-align: center;
    margin-bottom: 20px;
}

.recipient-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.recipient-address {
    font-size: 12px;
    color: #666;
    word-break: break-all;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.greeting {
    font-size: 16px;
    color: #555;
    text-align: center;
    margin: 20px 0;
    line-height: 1.6;
    font-style: italic;
}

/* 底部装饰 */
.bottom-decoration {
    text-align: center;
    margin: 20px 0;
    font-size: 24px;
}

/* 订单信息 */
.order-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.order-number {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.order-date {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 5px;
}

.from-info {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

/* 解密相关样式 */
.decrypt-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin: 20px auto;
    display: block;
}

.decrypt-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.decrypt-button:active {
    transform: translateY(0);
}

/* 解密消息显示 */
.decrypted-message {
    display: none;
    background: #e8f5e8;
    border: 2px solid #4caf50;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.message-content {
    font-size: 16px;
    line-height: 1.6;
    color: #2e7d32;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* 钱包选择按钮 */
.wallet-option {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.wallet-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 输入框样式 */
.signature-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    margin: 15px 0;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.signature-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 加载状态 */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* 错误信息 */
.error-message {
    display: none;
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    color: #c62828;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .card-container {
        width: 95vw;
        margin: 10px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .recipient-address {
        font-size: 10px;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .card-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .decrypt-button,
    .modal {
        display: none !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .card-container {
        border: 2px solid #000;
    }
    
    .recipient-address {
        background: #000;
        color: #fff;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}