/* 汇率页面样式 */
.exchange-header {
    text-align: center;
    margin: 40px 0 30px;
    padding: 30px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(1, 190, 243, 0.3);
}

.exchange-header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.exchange-header h1 i {
    margin-right: 15px;
    font-size: 2rem;
}

.update-time {
    font-size: 1rem;
    opacity: 0.95;
}

/* 货币转换器样式 */
.converter-wrapper {
    margin-bottom: 30px;
}

.converter-box {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    background: white;
    border-radius: 16px;
    padding: 24px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

/* 货币输入组 */
.currency-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    position: relative;
}

/* 货币选择器 */
.currency-select {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
    z-index: 100;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.currency-select:hover {
    background: #f0f0f0;
}

/* 国旗图片 */
.currency-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.currency-info {
    display: flex;
    flex-direction: column;
}

.currency-code {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.2;
}

.currency-name {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.2;
}

.dropdown-icon {
    color: #999;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* 金额输入框 */
.amount-input {
    flex: 1;
    padding: 16px;
    border: none;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
    background: white;
    transition: all 0.2s;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.amount-input:focus {
    outline: none;
    background: #fafafa;
}

/* 交换按钮 */
.swap-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    z-index: 102;
    margin: auto 0;
}

.swap-btn:hover {
    background: #0190c8;
    transform: rotate(180deg);
    box-shadow: 0 4px 12px rgba(1, 190, 243, 0.3);
}

/* 货币下拉菜单 */
.currency-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    margin-top: 4px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 101;
    border: 1px solid #f0f0f0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.dropdown-info {
    display: flex;
    flex-direction: column;
}

.dropdown-code {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
}

.dropdown-name {
    font-size: 0.8rem;
    color: #888;
}

/* 汇率卡片 */
.exchange-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.exchange-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.exchange-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.currency-pair {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.currency-from, .currency-to {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exchange-arrow {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.exchange-rate {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    text-align: center;
    margin: 16px 0;
}

.rate-change {
    text-align: center;
    font-size: 0.9rem;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.rate-change.positive {
    background: rgba(46, 204, 113, 0.2);
    color: var(--success-color);
}

.rate-change.negative {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger-color);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 15px;
}

.status-indicator.updating {
    background: rgba(255, 193, 7, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    animation: pulse 2s infinite;
}

.status-indicator.updating .status-dot {
    background: #ffc107;
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .exchange-header h1 {
        font-size: 1.8rem;
    }

    .converter-box {
        flex-direction: column;
        padding: 20px;
    }

    .currency-input-group {
        width: 100%;
    }

    .swap-btn {
        margin: 10px 0;
        transform: rotate(90deg);
    }

    .swap-btn:hover {
        transform: rotate(270deg);
    }

    .currency-select {
        min-width: 100px;
    }
}
