:root {
    /* Color System (HSL Tailored) */
    --bg-base: hsl(222, 25%, 6%);
    --bg-surface: rgba(20, 26, 38, 0.45);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: hsl(210, 20%, 96%);
    --text-secondary: hsl(210, 10%, 70%);
    --text-muted: hsl(210, 10%, 48%);
    
    --primary-glow: linear-gradient(135deg, hsl(265, 85%, 60%) 0%, hsl(200, 85%, 55%) 100%);
    --accent-purple: hsl(265, 85%, 65%);
    --accent-cyan: hsl(180, 85%, 50%);
    --accent-pink: hsl(330, 85%, 60%);
    
    --color-profit: hsl(355, 85%, 60%); /* 상승 (빨간색) */
    --color-loss: hsl(207, 90%, 55%);   /* 하락 (파란색) */
    --color-neutral: hsl(210, 10%, 70%);
    
    --sidebar-width: 280px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', 'Outfit', -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Aurora Glowing Effects */
.background-glow-1 {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.background-glow-2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 206, 209, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* App Container Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header Styling */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(20, 26, 38, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    font-size: 24px;
    background: var(--primary-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(138, 43, 226, 0.3));
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Badge System */
.badge {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

#mode-badge.real {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: hsl(0, 85%, 65%);
}

#mode-badge.real i {
    color: hsl(0, 85%, 60%);
    animation: pulse 2s infinite;
}

#mode-badge.demo {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: hsl(210, 85%, 65%);
}

#mode-badge.demo i {
    color: hsl(210, 85%, 60%);
}

.time-display {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* VIX & F&G 미니 네온 위젯 */
.widget-neon {
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
}

.widget-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.widget-val {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.widget-sub-val {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* 공포 상태일 때: 시안/블루 네온 글로우 */
.widget-neon.fear {
    border-color: rgba(0, 206, 209, 0.45);
    box-shadow: 0 0 12px rgba(0, 206, 209, 0.2);
}
.widget-neon.fear .widget-val,
.widget-neon.fear .widget-sub-val {
    color: hsl(180, 85%, 60%) !important;
}

/* 탐욕 상태일 때: 레드/오렌지 네온 글로우 */
.widget-neon.greed {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}
.widget-neon.greed .widget-val,
.widget-neon.greed .widget-sub-val {
    color: hsl(355, 85%, 65%) !important;
}

/* 중립 상태일 때 */
.widget-neon.neutral {
    border-color: var(--border-color);
    box-shadow: none;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Premium Card Glassmorphism Styling */
.card {
    background: var(--bg-surface);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.35), 0 0 20px rgba(138, 43, 226, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--accent-purple);
    font-size: 16px;
}

.sub-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary-glow);
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.5);
    transform: scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-tab {
    background: transparent;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 8px;
}

.btn-tab.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Balance Summary Card Grid */
.balance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.balance-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.balance-item.main-balance {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.12) 0%, rgba(0, 206, 209, 0.08) 100%);
    border: 1px solid rgba(138, 43, 226, 0.2);
    padding: 20px;
}

.balance-item .label {
    font-size: 12px;
    color: var(--text-secondary);
}

.balance-item .value {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.main-balance .value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #ffffff, #dcdcfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-balance .sub-value {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.value-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* AI 아침 브리핑 카드 전용 스타일링 */
.morning-briefing-card {
    min-height: 280px;
}

.badge-ai {
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.35);
    color: hsl(270, 85%, 70%);
}

.briefing-body {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 8px;
    line-height: 1.6;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.briefing-body h2,
.briefing-body h3 {
    color: var(--text-primary);
    margin-top: 18px;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
}

.briefing-body h2 {
    font-size: 16.5px;
    border-left: 3px solid var(--accent-purple);
    padding-left: 8px;
    margin-top: 24px;
}

.briefing-body h3 {
    font-size: 14.5px;
}

.briefing-body p {
    margin-bottom: 12px;
}

.briefing-body ul,
.briefing-body ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.briefing-body li {
    margin-bottom: 6px;
}

.briefing-body blockquote {
    background: rgba(138, 43, 226, 0.05);
    border-left: 3px solid var(--accent-purple);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    color: var(--text-primary);
}

.briefing-body hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

.briefing-body strong {
    color: var(--text-primary);
}

.briefing-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 0;
    color: var(--text-muted);
    text-align: center;
}

.briefing-loading i {
    font-size: 28px;
    color: var(--accent-purple);
}

.briefing-loading span {
    font-size: 13px;
    max-width: 80%;
    line-height: 1.4;
}

/* Holdings Card & Table Styling */
.holdings-content {
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.table-responsive {
    overflow-x: auto;
}

.holdings-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    text-align: left;
}

.holdings-table th {
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.holdings-table td {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.holdings-table tbody tr {
    transition: var(--transition-smooth);
}

.holdings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table-loading {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
}

.table-loading i {
    margin-right: 8px;
}

.stock-name-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.stock-symbol {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.chart-container-donut {
    width: 100%;
    max-height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

/* Line Charts & Exchange Rates */
.rate-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

#rate-value {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
}

#rate-change {
    font-size: 12px;
    font-weight: 600;
}

.chart-container-line {
    width: 100%;
    height: 180px;
    position: relative;
}

/* AI Chat Layout styling */
.chat-card {
    flex-grow: 1;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 320px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message.assistant {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.msg-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
}

.message.assistant .msg-bubble {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-top-left-radius: 2px;
    color: var(--text-secondary);
}

.message.user .msg-bubble {
    background: var(--primary-glow);
    color: #fff;
    border-top-right-radius: 2px;
}

.msg-meta {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 4px;
    align-self: flex-end;
}

.message.assistant .msg-meta {
    align-self: flex-start;
}

/* Chat Input styling */
.chat-input-area {
    display: flex;
    gap: 12px;
    align-items: center;
}

#chat-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
}

#chat-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.1);
}

/* Profit / Loss Dynamic Colors */
.text-profit {
    color: var(--color-profit) !important;
}

.text-loss {
    color: var(--color-loss) !important;
}

.text-neutral {
    color: var(--color-neutral) !important;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 15, 26, 0.9);
    border: 1px solid var(--accent-cyan);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: 0 8px 30px rgba(0, 206, 209, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Scrollbar Customization */
.chat-messages::-webkit-scrollbar,
.briefing-body::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.briefing-body::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
.briefing-body::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.briefing-body::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Utility / Animations classes */
.hidden {
    display: none !important;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up-delay-1 {
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.animate-slide-up-delay-2 {
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

/* Responsive Grid Configuration */
@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .column {
        min-width: 0;
        width: 100%;
    }
    .card {
        min-width: 0;
        width: 100%;
    }
    .app-container {
        padding: 16px;
    }
}

/* Modal Backdrop & Glassmorphism Content */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: rgba(20, 26, 38, 0.85);
    border: 1px solid rgba(138, 43, 226, 0.25);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(138, 43, 226, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content.animate-zoom-in {
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
}

.modal-header h3 i {
    color: var(--accent-purple);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.btn-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-info {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(138, 43, 226, 0.15);
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-info .label {
    font-size: 13px;
    color: var(--text-secondary);
}

.summary-info .value {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.contrib-list-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 8px;
}

.contrib-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contrib-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 14px 16px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.contrib-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.contrib-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contrib-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.contrib-item-qty {
    font-size: 11px;
    color: var(--text-muted);
}

.contrib-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.contrib-item-val {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.contrib-item-rate {
    font-size: 11px;
    font-weight: 500;
}

/* Portfolio Controls & Sorting dropdown */
.portfolio-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sort-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 30px;
}

.sort-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.1);
    color: var(--text-primary);
}

.sort-select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.2);
    color: var(--text-primary);
}

.sort-select option {
    background-color: var(--bg-base);
    color: var(--text-primary);
}

/* Monitoring Stocks Controls & Chips */
.monitoring-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.symbol-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.symbol-input-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    outline: none;
    transition: var(--transition-smooth);
    width: 180px;
}

.symbol-input-group input:hover, .symbol-input-group input:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.1);
}

.monitoring-chips-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid var(--border-color);
}

.monitoring-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 30px;
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: hsl(265, 85%, 80%);
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.1);
    transition: var(--transition-smooth);
}

.monitoring-chip:hover {
    background: rgba(138, 43, 226, 0.25);
    border-color: rgba(138, 43, 226, 0.5);
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.2);
}

.monitoring-chip-delete {
    cursor: pointer;
    font-size: 12px;
    color: hsl(265, 85%, 90%);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.monitoring-chip-delete:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 지표 기준 안내 카드 스타일링 */
.criteria-guide-card {
    margin-top: 0;
}

.criteria-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.criteria-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.criteria-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    transition: var(--transition-smooth);
}

.criteria-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.criteria-item.highlight {
    background: rgba(138, 43, 226, 0.05);
    border-color: rgba(138, 43, 226, 0.2);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.05);
}

.criteria-item.highlight:hover {
    background: rgba(138, 43, 226, 0.08);
    border-color: rgba(138, 43, 226, 0.35);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.1);
}

.criteria-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.criteria-icon.fear {
    background: rgba(0, 206, 209, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 206, 209, 0.25);
}

.criteria-icon.oversold {
    background: rgba(255, 105, 180, 0.1);
    color: var(--accent-pink);
    border: 1px solid rgba(255, 105, 180, 0.25);
}

.criteria-icon.volume {
    background: rgba(245, 158, 11, 0.1);
    color: hsl(35, 85%, 60%);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.criteria-icon.signal {
    background: rgba(138, 43, 226, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(138, 43, 226, 0.25);
}

.criteria-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.criteria-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.criteria-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.criteria-desc strong {
    color: var(--text-primary);
}

/* Mobile Optimization UI */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .app-container {
        padding: 12px;
        gap: 16px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .grid-layout {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .column {
        min-width: 0;
        width: 100%;
    }

    .card {
        min-width: 0;
        width: 100%;
        padding: 16px;
        border-radius: 20px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
        width: 100%;
    }
    
    .logo-area {
        justify-content: center;
    }
    
    .header-status {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }
    
    .header-status .badge {
        padding: 6px 10px;
        font-size: 11px;
        white-space: nowrap;
    }
    
    .header-status .time-display {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
        width: 100%;
    }
    
    .card-header h2 {
        font-size: 16px;
    }
    
    /* Balance Grid */
    .balance-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }
    
    .balance-item.main-balance {
        grid-column: span 1;
        padding: 16px;
        width: 100%;
    }
    
    .main-balance .value {
        font-size: 22px;
    }
    
    .balance-item {
        padding: 12px;
        width: 100%;
    }
    
    .balance-item .value {
        font-size: 15px;
    }
    
    /* Morning Briefing Card */
    .morning-briefing-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .monitoring-controls {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
        align-items: center;
    }
    
    .symbol-input-group {
        width: 100%;
        display: flex;
    }
    
    .symbol-input-group input {
        flex-grow: 1;
        width: auto;
    }
    
    .monitoring-chips-area {
        padding: 10px 16px;
        width: 100%;
    }

    .briefing-body {
        width: 100%;
        padding-right: 0;
    }
    
    /* Holdings Content */
    .holdings-content {
        min-width: 0;
        width: 100%;
    }

    /* Holdings Table Table Responsive styling */
    .table-responsive {
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .holdings-table {
        min-width: 800px;
        width: 100%;
    }

    .holdings-table th, 
    .holdings-table td {
        white-space: nowrap;
        padding: 12px 10px;
        font-size: 12px;
    }
    
    /* Portfolio Controls */
    .portfolio-controls {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    
    .sort-select {
        flex-grow: 1;
        max-width: 150px;
    }
    
    /* Exchange Rate indicator on header */
    .exchange-rate-card .card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    #rate-value {
        font-size: 18px;
    }
    
    /* Criteria Guide items spacing */
    .criteria-item {
        padding: 12px;
        gap: 12px;
        width: 100%;
    }
    
    .criteria-title {
        font-size: 13px;
    }
    
    .criteria-desc {
        font-size: 11px;
    }

    /* Chat layout styling */
    .chat-card {
        width: 100%;
    }

    .chat-messages {
        width: 100%;
    }

    .chat-input-area {
        width: 100%;
    }
}

