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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin: 0;
    display: inline-block;
}

.x-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
    transition: all 0.2s;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.x-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.x-button svg {
    width: 20px;
    height: 20px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.timeframe-selector {
    display: flex;
    gap: 8px;
    background-color: #1a1a1a;
    padding: 4px;
    border-radius: 8px;
}

.timeframe-btn {
    background: transparent;
    border: none;
    color: #888888;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.timeframe-btn:hover {
    color: #ffffff;
    background-color: #2a2a2a;
}

.timeframe-btn.active {
    background-color: #2a2a2a;
    color: #ffffff;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #1a1a1a;
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.share-btn:hover {
    background-color: #2a2a2a;
}

.table-container {
    background-color: #0f0f0f;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1a1a1a;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #1a1a1a;
}

th {
    text-align: left;
    padding: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rank-col {
    width: 60px;
    text-align: center;
}

.name-col {
    width: 200px;
}

.price-col {
    width: 150px;
}

.mcap-col {
    width: 150px;
}

.trend-col {
    width: 120px;
}

tbody tr {
    border-bottom: 1px solid #1a1a1a;
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #151515;
}

tbody tr:last-child {
    border-bottom: none;
}

td {
    padding: 16px;
    font-size: 14px;
}

.crypto-row {
    display: contents;
}

.rank {
    text-align: center;
    color: #888888;
    font-weight: 500;
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crypto-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.crypto-icon.btc {
    background-color: #f7931a;
    color: white;
}

.crypto-icon.eth {
    background: linear-gradient(135deg, #627EEA 0%, #8B5CF6 100%);
    color: white;
}

.crypto-icon.bnb {
    background-color: #f3ba2f;
    color: white;
}

.crypto-icon.xrp {
    background-color: #ffffff;
    color: #000000;
}

.crypto-icon.sol {
    background: linear-gradient(135deg, #9945FF 0%, #14F195 100%);
    color: white;
}

.crypto-icon.tron {
    background-color: #ff0012;
    color: white;
}

.crypto-icon.doge {
    background-color: #c2a633;
    color: white;
}

.crypto-icon.ada {
    background-color: #0033ad;
    color: white;
}

.crypto-icon.bch {
    background-color: #0ac18e;
    color: white;
}

.crypto-icon.default {
    color: white;
}

.crypto-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crypto-name {
    font-weight: 600;
    color: #ffffff;
}

.crypto-symbol {
    font-size: 12px;
    color: #888888;
    text-transform: uppercase;
}

.price {
    font-weight: 600;
    color: #ffffff;
}

.price-change {
    font-size: 12px;
    margin-top: 4px;
}

.price-change.positive {
    color: #00d4aa;
}

.price-change.negative {
    color: #ff4444;
}

.mcap {
    color: #888888;
    font-size: 13px;
}

.trend-chart {
    width: 100px;
    height: 40px;
    position: relative;
}

.loading {
    text-align: center;
    padding: 40px !important;
    color: #888888;
}

.error {
    text-align: center;
    padding: 40px !important;
    color: #ff4444;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    th, td {
        padding: 12px 8px;
        font-size: 12px;
    }

    .crypto-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .trend-chart {
        width: 80px;
        height: 30px;
    }
}

