/* 全局变量 */
:root {
    --primary-color: #cc0033;
    --secondary-color: #16162a;
    --accent-color: #f5304c;
    --text-color: #333;
    --light-text: #fff;
    --dark-text: #16162a;
    --border-color: #e1e1e8;
    --card-bg: #fff;
    --bg-color: #f8f9fa;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --tron-grid-color: rgba(204, 0, 51, 0.1);
    --tron-line-color: rgba(204, 0, 51, 0.3);
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* TRON背景动画 */
.tron-bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.tron-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--tron-grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--tron-grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 50s linear infinite;
}

.tron-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 50%, transparent 50%, var(--bg-color) 100%);
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部 */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 15px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wallet-status {
    font-size: 0.9rem;
}

/* 主要内容 */
main {
    padding: 2rem 0;
}

main .container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 卡片样式 */
.card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 1.5rem;
}

/* 信息卡片 */
.info-card {
    border-left: 5px solid var(--warning-color);
}

.info-list {
    list-style: none;
}

.info-list li {
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.info-list li i {
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--primary-color);
}

/* 余额卡片 */
.balance-card {
    border-left: 5px solid var(--info-color);
}

.balance-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.balance-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.balance-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.token-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.balance-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.balance-details p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* 表单卡片 */
.form-card {
    border-left: 5px solid var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.input-group {
    position: relative;
}

input, textarea, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(204, 0, 51, 0.1);
}

.input-helper {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.input-addon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-addon {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-addon:hover {
    background-color: var(--accent-color);
}

.tx-status {
    margin-top: 10px;
    min-height: 20px;
}

/* 金额选择组 */
.refund-amount-group {
    display: flex;
    gap: 10px;
}

.amount-input-group {
    flex: 1;
}

.currency-options {
    display: flex;
}

.currency-btn {
    background-color: #f0f0f0;
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.currency-btn:first-child {
    border-radius: 5px 0 0 5px;
}

.currency-btn:last-child {
    border-radius: 0 5px 5px 0;
}

.currency-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 文件上传 */
.file-upload {
    margin-top: 10px;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-label {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.file-upload-label:hover {
    background-color: var(--accent-color);
}

.file-upload-label i {
    margin-right: 8px;
}

.file-info {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* 复选框样式 */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-container {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    display: inline-block;
    font-size: 0.9rem;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f0f0f0;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #e0e0e0;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

button {
    cursor: pointer;
    font-size: 1rem;
    padding: 12px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--accent-color);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-connect {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-connect:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 交易历史表格 */
.transaction-history {
    border-left: 5px solid var(--secondary-color);
}

.transaction-table-wrapper {
    overflow-x: auto;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th,
.transaction-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.transaction-table th {
    background-color: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    color: var(--secondary-color);
}

.transaction-table tr:last-child td {
    border-bottom: none;
}

.transaction-table tr:hover td {
    background-color: rgba(0, 0, 0, 0.02);
}

.empty-history {
    text-align: center;
    padding: 30px 0;
    color: #888;
}

.empty-history i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* 页脚 */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: white;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    opacity: 1;
}

/* 通知 */
.notification-area {
    position: sticky;
    top: 20px;
    z-index: 100;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 15px 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.3s ease;
}

.notification i {
    font-size: 1.2rem;
}

.notification .close-notification {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    cursor: pointer;
}

.notification .close-notification:hover {
    opacity: 1;
}

.notification.success {
    background-color: #d4edda;
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.notification.error {
    background-color: #f8d7da;
    border-left: 4px solid var(--error-color);
    color: var(--error-color);
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

.modal-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.close-modal {
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.close-modal:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

.modal-body h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.modal-body h4 {
    color: var(--secondary-color);
    margin: 20px 0 10px;
    font-size: 1rem;
}

.modal-body p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-footer {
    padding: 15px 20px;
    text-align: right;
    border-top: 1px solid var(--border-color);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载遮罩 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.spinner-container {
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

#loading-text {
    color: white;
    margin-top: 15px;
    font-size: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo img {
        height: 30px;
    }
    
    .wallet-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
    }
    
    .balance-info {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .refund-amount-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .currency-options {
        width: 100%;
    }
    
    .currency-btn {
        flex: 1;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
} 