* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #333333;
    font-size: 14px;
}

.top-promo {
    width: 100%;
    height: 30px;
    background: #f5f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #222;
}

.main-header {
    height: 70px;
    background: #08223f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

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

.menu-button {
    width: 25px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.menu-button span {
    display: block;
    height: 2px;
    background: white;
    margin: 5px 0;
}

.brand {
    position: relative;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    line-height: 20px;
}

.brand span {
    color: #00a5e5;
}

.brand small {
    display: block;
    color: white;
    font-size: 8px;
    font-weight: normal;
    margin-top: 3px;
}

.search-box {
    width: 330px;
    height: 36px;
    border: 1px solid #8796a7;
    display: flex;
    align-items: center;
}

.search-box input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: white;
    padding: 0 15px;
}

.search-box input::placeholder {
    color: #aab5c0;
}

.search-box span {
    color: white;
    padding-right: 10px;
    font-size: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions button {
    height: 38px;
    padding: 0 18px;
    font-weight: bold;
    cursor: pointer;
}

.action-button {
    background: white;
    border: 2px solid #ec1b58;
    color: #ec1b58;
}

.crypto-button {
    border: 0;
    background: #e91d5b;
    color: white;
}

.login-button {
    border: 0;
    background: white;
    color: #08223f;
    border-radius: 20px;
}

.page-container {
    width: 100%;
    margin: 0 auto;
}

.market-card {
    background: #fff;
    border: 1px solid #d4d4d4;
    padding: 18px 20px;
}

.market-title {
    font-size: 16px;
    font-weight: 700;
    color: #151515;
    margin-bottom: 5px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.current-price {
    font-size: 36px;
    line-height: 40px;
    color: #10b981;
    font-weight: 600;
}

.price-change {
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
}

.market-status {
    margin-top: 3px;
    color: #777;
    font-size: 10px;
}

.separator {
    height: 1px;
    background: #d5d5d5;
    margin: 12px 0 10px;
}

.time-buttons {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.time-buttons button {
    height: 28px;
    min-width: 31px;
    padding: 0 9px;
    background: #fff;
    border: 1px solid #ccc;
    border-right: 0;
    color: #555;
    cursor: pointer;
    font-size: 11px;
}

.time-buttons button:last-child {
    border-right: 1px solid #ccc;
}

.time-buttons button.active {
    color: white;
    background: #0879e8;
    border-color: #0879e8;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-bottom: 1px solid #ddd;
}

#myChart {
    width: 100% !important;
    height: 100% !important;
}

.market-info {
    width: 100%;
}

.info-row {
    min-height: 38px;
    display: grid;
    grid-template-columns: 24% 26% 24% 26%;
    align-items: center;
    border-bottom: 1px solid #ddd;
    font-size: 11px;
}

.info-name {
    color: #666;
    padding-left: 8px;
}

.info-value {
    color: #222;
    font-weight: 500;
}

.info-name.right {
    text-align: left;
}

.right-value {
    text-align: right;
    padding-right: 8px;
}

.result-bar {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #303030;
    color: #fff;
    min-height: 40px;
}

.result-bar div {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    border-right: 1px solid #111;
}

.result-bar div:last-child {
    border-right: 0;
}

.result-date {
    color: #999;
    font-size: 9px;
    text-align: right;
    padding: 12px 0 3px;
}

.history-section {
    margin-top: 25px;
}

.history-title {
    margin: 0;
    padding: 10px 4px 12px;
    font-size: 21px;
    color: #333;
}

.history-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.history-table th {
    height: 36px;
    background: #f1f1f1;
    border: 1px solid #ccc;
    color: #333;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.history-table td {
    height: 36px;
    border: 1px solid #d0d0d0;
    text-align: center;
    font-size: 12px;
    color: #444;
}

.history-table tbody tr:nth-child(odd) {
    background: #f5f5f5;
}

.history-table tbody tr:nth-child(even) {
    background: #fff;
}

.footer {
    margin-top: 30px;
}

.footer-top {
    background: #eef2f6;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 35px;
}

.footer-column h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 500;
}

.footer-column a {
    display: block;
    color: #666;
    text-decoration: none;
    margin: 0 0 13px;
    font-size: 11px;
}

.footer-column a:hover {
    text-decoration: underline;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 110px;
}

.social-icons span {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.app-button {
    width: 100px;
    background: #000;
    color: white;
    border-radius: 5px;
    margin-top: 8px;
    padding: 5px 7px;
    font-size: 8px;
    text-align: center;
}

.app-button strong {
    font-size: 10px;
}

.footer-bottom {
    background: #08223f;
    color: #d6dfeb;
    padding: 28px 20px 35px;
    font-size: 9px;
    line-height: 1.8;
}

.footer-bottom p {
    margin: 0 0 12px;
}

.footer-bottom strong {
    color: #fff;
}

@media (min-width: 1200px) {
    .page-container {
        max-width: 1400px;
    }
}

@media (max-width: 900px) {
    .search-box {
        width: 220px;
    }

    .footer-top {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .top-promo {
        font-size: 9px;
        padding: 0 10px;
        text-align: center;
    }

    .main-header {
        height: 60px;
        padding: 0 12px;
    }

    .brand {
        font-size: 17px;
    }

    .search-box {
        display: none;
    }

    .action-button,
    .crypto-button {
        display: none;
    }

    .login-button {
        padding: 0 12px !important;
        height: 32px !important;
        font-size: 10px;
    }

    .market-card {
        padding: 15px 10px;
    }

    .market-title {
        font-size: 14px;
    }

    .current-price {
        font-size: 30px;
    }

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

    .chart-container {
        height: 260px;
    }

    .time-buttons {
        overflow-x: auto;
    }

    .time-buttons button {
        flex: 0 0 auto;
    }

    .info-row {
        grid-template-columns: 20% 30% 23% 27%;
        font-size: 9px;
    }

    .result-bar div {
        font-size: 10px;
    }

    .history-title {
        font-size: 18px;
    }

    .history-table th,
    .history-table td {
        font-size: 10px;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 430px) {
    .menu-button {
        width: 20px;
    }

    .header-left {
        gap: 10px;
    }

    .price-row {
        gap: 7px;
    }

    .current-price {
        font-size: 27px;
    }

    .chart-container {
        height: 230px;
    }

    .info-row {
        grid-template-columns: 19% 31% 25% 25%;
    }

    .result-bar {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        padding: 30px 15px;
    }
}