/* 디자인 CSS */
.usdt-widget-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    padding: 28px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(120, 150, 190, 0.28);
    border-radius: 24px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 15% 10%, rgba(82, 132, 255, 0.28), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(16, 185, 129, 0.18), transparent 30%),
        linear-gradient(135deg, #07111f 0%, #0b1728 45%, #111827 100%);
    background-size: 26px 26px, 26px 26px, auto, auto, auto;
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.usdt-widget-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 36%, rgba(255, 255, 255, 0.04));
    opacity: 0.8;
}

.usdt-title {
    position: relative;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f8fafc;
    margin-bottom: 15px;
    text-shadow: 0 0 22px rgba(96, 165, 250, 0.32);
}

.usdt-live-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    left: 50%;
    transform: translateX(-50%);
    margin: -16px auto 22px;
    padding: 8px 16px;
    border: 1px solid rgba(45, 212, 191, 0.45);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.14);
    color: #34d399;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    box-shadow:
        0 0 0 1px rgba(45, 212, 191, 0.08),
        0 12px 28px rgba(20, 184, 166, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.usdt-meta-top {
    position: relative;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(12px);
}

.usdt-meta-top strong {
    color: #e2e8f0;
}

.usdt-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.usdt-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.2), transparent 45%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
        rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.usdt-card::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 14px;
    width: var(--usdt-logo-width, 58px);
    height: var(--usdt-logo-height, 58px);
    pointer-events: none;
    background-image: var(--usdt-logo);
    background-repeat: no-repeat;
    background-position: left top;
    background-size: contain;
    filter: saturate(1.12) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.28));
    opacity: 0.18;
    z-index: 0;
}

.usdt-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    z-index: 0;
}

.usdt-card > * {
    position: relative;
    z-index: 1;
}

.usdt-card-bithumb {
    --usdt-logo: url("https://s2.coinmarketcap.com/static/img/exchanges/64x64/200.png");
}

.usdt-card-upbit {
    --usdt-logo: url("https://s2.coinmarketcap.com/static/img/exchanges/64x64/351.png");
}

.usdt-card-binance {
    --usdt-logo: url("https://s2.coinmarketcap.com/static/img/exchanges/64x64/270.png");
}

.usdt-card-coinmarketcap {
    --usdt-logo: url("https://s2.coinmarketcap.com/static/cloud/img/banners/cmc.png");
    --usdt-logo-width: 92px;
    --usdt-logo-height: 34px;
}

.usdt-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.58);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.36),
        0 0 0 1px rgba(96, 165, 250, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.usdt-provider {
    font-size: 16px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.usdt-price {
    font-size: 24px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.22);
    transition: color 0.3s ease;
}

/* 값이 변할 때 깜빡이는 효과용 클래스 */
.usdt-price.highlight {
    color: #d60000;
}

.price-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    font-size: 14px;
    font-weight: bold;
}

.price-change.up {
    color: #f87171;
}

.price-change.down {
    color: #60a5fa;
}

.price-change.none {
    color: #94a3b8;
}

.usdt-mini-chart {
    width: 100%;
    height: 64px;
    margin-top: 16px;
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(2, 6, 23, 0.22);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.usdt-mini-chart-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.usdt-mini-chart-svg.up {
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.08), rgba(248, 113, 113, 0.02));
}

.usdt-mini-chart-svg.down {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.09), rgba(96, 165, 250, 0.02));
}

.usdt-mini-chart-baseline {
    stroke: rgba(203, 213, 225, 0.35);
    stroke-width: 1;
    stroke-dasharray: 1 6;
}

.usdt-mini-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.usdt-calculator-section {
    position: relative;
    background: rgba(15, 23, 42, 0.5);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    padding: 40px 20px;
    text-align: center;
    color: #cbd5e1;
    backdrop-filter: blur(10px);
}

.usdt-calculator-title {
    color: #f8fafc;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.usdt-calculator-tabs,
.usdt-calculator-methods {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    margin-bottom: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.28);
}

.usdt-calculator-methods {
    margin-left: 10px;
}

.usdt-tab-btn,
.usdt-method-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.usdt-tab-btn.active,
.usdt-method-btn.active {
    color: #ecfeff;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.9), rgba(59, 130, 246, 0.78));
    box-shadow: 0 12px 22px rgba(20, 184, 166, 0.18);
}

.usdt-input-row {
    max-width: 520px;
    margin: 16px auto 22px;
    text-align: left;
}

.usdt-input-row label {
    display: block;
    margin-bottom: 8px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 800;
}

.usdt-input-box {
    display: flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.usdt-input-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 15px 16px;
    color: #f8fafc;
    font-size: 20px;
    font-weight: 800;
    background: transparent;
}

.usdt-input-box input::placeholder {
    color: #64748b;
}

.usdt-input-box span {
    flex: 0 0 auto;
    padding: 0 16px;
    color: #34d399;
    font-size: 14px;
    font-weight: 900;
}

.usdt-calculator-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.usdt-result-empty {
    grid-column: 1 / -1;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    color: #94a3b8;
    background: rgba(2, 6, 23, 0.2);
    font-weight: 700;
}

.usdt-result-card {
    padding: 16px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
        rgba(15, 23, 42, 0.62);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.usdt-result-provider {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.usdt-result-label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.usdt-result-value {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.usdt-result-value span {
    color: #34d399;
    font-size: 12px;
    letter-spacing: 0;
}

.usdt-result-rate {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .usdt-widget-container {
        padding: 20px;
        border-radius: 18px;
    }

    .usdt-grid {
        grid-template-columns: 1fr;
    }

    .usdt-meta-top {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .usdt-calculator-tabs,
    .usdt-calculator-methods {
        display: flex;
        width: 100%;
        margin-left: 0;
    }

    .usdt-tab-btn,
    .usdt-method-btn {
        flex: 1;
        padding: 10px 8px;
    }

    .usdt-calculator-results {
        grid-template-columns: 1fr;
    }

    .usdt-result-card {
        padding: 18px 14px;
    }

    .usdt-result-provider {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .usdt-result-label,
    .usdt-result-rate {
        display: none;
    }

    .usdt-result-value {
        font-size: 20px;
    }

    .usdt-result-value span {
        font-size: 13px;
    }
}
