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

html {
    scroll-behavior: smooth;
}

body {
    background: #10141d;
    color: #ffffff;
    font-family: Arial, "Malgun Gothic", sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 상단 메뉴 */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 5%;
    background: #191f2b;
    border-bottom: 1px solid #293140;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    color: #5593ff;
    font-size: 25px;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: #a0aab9;
    font-size: 15px;
}

nav a:hover {
    color: white;
}

.login-btn {
    background: #3478f6;
    color: white;
    border-radius: 8px;
    padding: 11px 18px;
}

/* 메인 화면 */

main {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 24px;
}

.notice {
    color: #a0aab9;
    font-size: 13px;
    margin-bottom: 18px;
}

/* 자산 카드 */

.asset-card {
    background: linear-gradient(
        120deg,
        #1b2941,
        #1b2334
    );
    padding: 30px;
    border: 1px solid #29384e;
    border-radius: 16px;
    margin-bottom: 25px;
}

.asset-card p {
    color: #a0aab9;
    margin-bottom: 12px;
}

.asset-card h1 {
    font-size: 36px;
    margin-bottom: 12px;
}

.asset-card span {
    color: #a0aab9;
    font-size: 14px;
}

/* 대시보드 */

.dashboard {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
}

.stock-panel,
.chart-panel {
    background: #191f2b;
    border: 1px solid #293140;
    padding: 24px;
    border-radius: 16px;
}

.stock-panel h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

/* 검색창 */

#searchInput {
    width: 100%;
    padding: 13px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #293140;
    background: #10141d;
    color: white;
    outline: none;
}

#searchInput:focus {
    border-color: #3478f6;
}

/* 종목 목록 */

.stock-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 15px 12px;
    border-radius: 8px;
    background: transparent;
    color: white;
    margin-bottom: 5px;
    gap: 10px;
    cursor: pointer;
}

.stock-item:hover {
    background: #252e3e;
}

.stock-item.active {
    background: #29384e;
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stock-code {
    font-size: 12px;
    color: #8894a6;
}

.stock-value {
    text-align: right;
    font-size: 14px;
}

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

.empty {
    padding: 20px 0;
    color: #8894a6;
    font-size: 14px;
}

.up {
    color: #ff647c;
}

.down {
    color: #5593ff;
}

.flat {
    color: #a0aab9;
}

/* 종목 상세 화면 */

.stock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#stockCode {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #8894a6;
}

.live-badge {
    background: #243752;
    color: #90baff;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 12px;
}

#stockPrice {
    font-size: 38px;
    margin-top: 20px;
}

#stockChange {
    margin-top: 8px;
    margin-bottom: 25px;
}

.chart-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #a0aab9;
    gap: 10px;
    font-size: 13px;
}

#pauseBtn {
    background: #29384e;
    color: white;
    border-radius: 6px;
    padding: 9px 12px;
}

.chart-container {
    margin: 25px 0;
}

#stockChart {
    width: 100%;
    display: block;
}

/* 매수, 매도 버튼 */

.trade-buttons {
    display: flex;
    gap: 12px;
}

.trade-buttons button {
    flex: 1;
    padding: 15px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: bold;
    color: white;
}

.buy-btn {
    background: #f04f68;
}

.sell-btn {
    background: #3478f6;
}

.description {
    font-size: 12px;
    color: #8894a6;
    text-align: center;
    margin-top: 15px;
}

footer {
    text-align: center;
    color: #667085;
    padding: 35px 20px;
    font-size: 13px;
}

footer p {
    margin-top: 8px;
}

/* 모바일 화면 대응 */

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

    nav {
        gap: 15px;
    }

    .asset-card h1,
    #stockPrice {
        font-size: 28px;
    }

    main {
        padding: 0 14px;
    }
}
