* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

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

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: #a0a0c0;
    font-size: 1.1rem;
}

.coin-selector {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    max-width: 400px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    outline: none;
}

.search-input::placeholder {
    color: #a0a0c0;
}

.search-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.coin-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.coin-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.coin-btn:hover, 
.coin-btn.active {
    background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%);
    transform: translateY(-2px);
}

.coin-widget {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin-bottom: 30px;
}

.coin-header {
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.2fr 1.5fr 1.8fr;
    justify-content: center; 
    gap: 20px;
}

.coin-info {
    display: flex;
   justify-content: center; 
    gap: 15px;
}

.coin-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 22px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.coin-name h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.coin-name span {
    color: #a0a0c0;
    font-size: 16px;
    font-weight: 500;
}

.coin-price,
.coin-change,
.coin-volume,
.coin-high-low {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.coin-price .usd {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.coin-price .cny {
    font-size: 18px;
    color: #a0a0c0;
    font-weight: 500;
    line-height: 1.2;
}

.coin-change .label,
.coin-volume .label,
.coin-high-low .label {
    font-size: 18px;
    color: #a0a0c0;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.coin-change .value,
.coin-volume .value,
.coin-high-low .value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.coin-high-low .value {
    font-size: 18px;
}

.change-positive {
    color: #00c789;
}

.change-negative {
    color: #ff4d4d;
}

.coin-footer {
    padding: 15px 25px;
    text-align: center;
    font-size: 18px;
    color: #a0a0c0;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.exchange-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.exchange-btn {
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
}

.exchange-btn.binance {
    background: linear-gradient(45deg, #f0b90b 0%, #f8d33a 100%);
    color: #000;
}

.exchange-btn.okx {
    background: linear-gradient(45deg, #000 0%, #333 100%);
    color: #fff;
}

.exchange-btn.huobi {
    background: linear-gradient(45deg, #2875e6 0%, #5296f9 100%);
    color: #fff;
}

.exchange-btn.gate {
    background: linear-gradient(45deg, #6a4ee6 0%, #8d7aeb 100%);
    color: #fff;
}

.exchange-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.exchanges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.exchange-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    border-top: 4px solid;
}

.okx { border-top-color: #00d2ff; }
.binance { border-top-color: #f0b90b; }
.gate { border-top-color: #7b4397; }
.huobi { border-top-color: #009fff; }

.card-header {
    padding: 15px 15px 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f1f1;
}

.logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
    padding: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

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

.exchange-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
}

.exchange-name:hover {
    color: #3498db;
}

.card-content {
    padding: 15px 12px;
    flex-grow: 1;
}

.description {
    line-height: 1.5;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.9rem;
}

.routes-section {
    margin-top: auto;
    padding: 10px 12px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.routes-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.routes-title i {
    margin-right: 6px;
    color: #00d2ff;
}

.routes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.route-link,
.reverse-route-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 18px;
    text-align: center;
    transition: all 0.2s ease;
}

.route-link {
    background: white;
    color: #3498db;
    border: 1px solid #eee;
}

.route-link:hover {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
    transform: scale(1.05);
}

.reverse-route-link {
    background: #3498db;
    color: white;
    border: 0px solid #3498db;
}

.reverse-route-link:hover {
    background: white;
    color: #3498db;
    border: 0px solid #eee;
    transform: scale(1.05);
}

/* 交易所品牌色 */
.exchange-card.okx .reverse-route-link { background: #00d2ff !important; color: white !important; }
.exchange-card.binance .reverse-route-link { background: #f0b90b !important; color: #000 !important; }
.exchange-card.gate .reverse-route-link { background: #7b4397 !important; color: white !important; }
.exchange-card.huobi .reverse-route-link { background: #ff6a00 !important; color: white !important; }

footer {
    text-align: center;
    margin-top: 40px;
    padding: 15px;
    color: #95a5a6;
    font-size: 0.85rem;
    width: 100%;
}

.a-link a {
    color: white !important;
    text-decoration: none !important;
}

/* 响应式设计 */
@media (max-width: 1300px) {
    .container { max-width: 1200px; }
    .exchanges-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .coin-header { grid-template-columns: 1fr 1fr; }
    .coin-info { grid-column: 1 / span 2; }
    .coin-name h2,
    .coin-price .usd,
    .coin-change .value,
    .coin-volume .value,
    .coin-high-low .value { font-size: 18px; }
    .exchange-buttons { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header h1 { font-size: 1.8rem; }
    .header p { font-size: 0.9rem; }
    .search-form { flex-direction: column; }
    .search-input { max-width: 100%; }
    .exchanges-grid { gap: 12px; }
}

@media (max-width: 600px) {
    .exchanges-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .coin-header { padding: 20px 15px; gap: 15px; }
    .coin-icon { width: 50px; height: 50px; font-size: 18px; }
    .coin-name h2, .coin-name span { font-size: 18px; }
    .coin-change .label,
    .coin-volume .label,
    .coin-high-low .label { font-size: 18px; }
    .exchange-buttons { gap: 10px; }
    .exchange-btn { font-size: 20px; min-height: 55px; padding: 12px; }
}