* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #7c3aed;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.exchange-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.exchange-btn {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
}

.exchange-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.exchange-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.exchange-btn i {
    font-size: 1.3rem;
}

.content-area {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    display: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.data-container {
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
}

.exchange-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exchange-title {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timestamp {
    font-size: 0.85rem;
    opacity: 0.9;
    text-align: right;
}

.data-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.data-tab {
    flex: 1;
    text-align: center;
    padding: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--card-bg);
    color: var(--text-light);
    font-size: 1rem;
}

.data-tab:hover {
    background-color: #f8fafc;
}

.data-tab.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background-color: #f0f9ff;
}

.price-table {
    width: 100%;
    padding: 20px;
}

.table-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    padding: 15px 0;
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    color: var(--text-color);
    justify-items: center;
}

.table-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background-color: #f8fafc;
}

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.crypto-name {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.crypto-symbol {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 4px;
}

.price {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    padding-right: 5px;
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--border-color);
}

.instructions {
    margin-top: 40px;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    max-width: 800px;
    width: 100%;
}

.instructions h3 {
    margin-bottom: 16px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ul {
    padding-left: 20px;
    color: var(--text-light);
}

.instructions li {
    margin-bottom: 8px;
}

footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 20px 0;
    width: 100%;
    border-top: 1px solid var(--border-color);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }

    .exchange-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .exchange-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .exchange-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 18px 20px;
    }

    .exchange-title {
        font-size: 1.3rem;
    }

    .timestamp {
        font-size: 0.8rem;
        text-align: left;
        width: 100%;
    }

    .data-tabs {
        flex-direction: row;
    }

    .data-tab {
        padding: 14px 10px;
        font-size: 0.95rem;
    }

    .price-table {
        padding: 15px;
    }

    .table-header {
        grid-template-columns: 1.5fr 1fr;
        padding: 12px 0;
        font-size: 0.95rem;
    }

    .table-row {
        grid-template-columns: 1.5fr 1fr;
        padding: 16px 0;
        align-items: center;
    }

    .crypto-icon {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .crypto-name {
        gap: 12px;
        font-size: 0.95rem;
    }

    .crypto-symbol {
        font-size: 0.8rem;
    }

    .price {
        font-size: 1.1rem;
        padding-right: 0;
    }

    .instructions {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }

    .container {
        padding: 0 10px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .exchange-btn {
        max-width: 100%;
    }

    .exchange-title {
        font-size: 1.2rem;
    }

    .table-header {
        font-size: 0.9rem;
    }

    .table-row {
        padding: 14px 0;
    }

    .crypto-icon {
        width: 32px;
        height: 32px;
    }

    .crypto-name {
        font-size: 0.9rem;
    }

    .price {
        font-size: 1rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .crypto-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .crypto-name {
        gap: 8px;
    }

    .price {
        font-size: 0.95rem;
    }

    .data-tab {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
}