@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Inter:wght@300;400;600;700&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at center, #1a2a3a 0%, #0a1118 100%);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background image overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-image: url('anh ha noi.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
}

/* Map Title Overlay */
.map-title {
    position: absolute;
    top: 8%;
    right: 6%;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: #1e293b;
    text-transform: uppercase;
    z-index: 20;
    max-width: 350px;
    line-height: 1.3;
    text-align: right;
}
.map-title span {
    color: #ea580c;
    display: block;
    font-size: 1.3rem;
    margin-top: 8px;
}

/* Decorative Lines */
.decor-line {
    position: fixed;
    width: 150px;
    height: 150px;
    pointer-events: none;
    z-index: 10;
}
.decor-line.top-left {
    top: 20px;
    left: 20px;
    border-top: 2px solid rgba(255, 159, 67, 0.4);
    border-left: 2px solid rgba(255, 159, 67, 0.4);
}
.decor-line.top-left::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px;
    width: 30px; height: 30px;
    border-top: 4px solid #ff9f43;
    border-left: 4px solid #ff9f43;
}
.decor-line.bottom-left {
    bottom: 20px;
    left: 20px;
    border-bottom: 2px solid rgba(255, 159, 67, 0.4);
    border-left: 2px solid rgba(255, 159, 67, 0.4);
}
.decor-line.bottom-left::after {
    content: '';
    position: absolute;
    bottom: -2px; left: -2px;
    width: 30px; height: 30px;
    border-bottom: 4px solid #ff9f43;
    border-left: 4px solid #ff9f43;
}
.decor-line.top-right {
    top: 20px;
    right: 20px;
    border-top: 2px solid rgba(255, 159, 67, 0.4);
    border-right: 2px solid rgba(255, 159, 67, 0.4);
}
.decor-line.top-right::after {
    content: '';
    position: absolute;
    top: -2px; right: -2px;
    width: 30px; height: 30px;
    border-top: 4px solid #ff9f43;
    border-right: 4px solid #ff9f43;
}

/* Layout Wrapper */
.layout-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.left-col {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: sticky;
    top: 0;
}

.right-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
}

/* Map Container */
.map-container {
    position: relative;
    width: 100%;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-wrapper {
    position: relative;
    height: 100%;
    display: inline-block;
}

.map-image {
    height: 100%;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
    user-select: none;
}

/* Tooltip (Chấm tương tác) */
.dot {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 165, 0, 0.4);
    border: 2px solid #ff9f43;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease, background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 10px rgba(255, 159, 67, 0.6);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(255, 159, 67, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 159, 67, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 159, 67, 0); }
}

.dot:hover {
    transform: translate(-50%, -50%) scale(1.2);
    background-color: rgba(255, 165, 0, 0.8);
    box-shadow: 0 0 15px rgba(255, 159, 67, 0.9);
}

.dot::before {
    content: attr(data-name);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.dot:hover::before {
    opacity: 1;
}

/* Panels (Glassmorphism shared) */
.info-panel, .chart-panel {
    background: rgba(20, 30, 48, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Info Panel */
.info-panel {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.empty-state {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-style: italic;
    text-align: center;
}

.info-panel::-webkit-scrollbar {
    width: 6px;
}
.info-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.info-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
    padding-top: 0.15em;
    padding-bottom: 0.1em;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1rem;
}

.label {
    color: #94a3b8;
    font-weight: 400;
}

.value {
    color: #fff;
    font-weight: 600;
}

.section-title {
    font-size: 1.05rem;
    color: #38bdf8;
    margin: 16px 0 10px 0;
    border-left: 3px solid #38bdf8;
    padding-left: 8px;
    font-weight: 600;
}

.target-title {
    color: #a78bfa;
    border-left-color: #a78bfa;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.data-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.data-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.data-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f8fafc;
}

/* Chart Panel */
.chart-panel {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

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

.chart-header h3 {
    font-size: 1rem;
    color: #38bdf8;
    font-weight: 600;
}

.chart-tabs {
    display: flex;
    gap: 8px;
}

.chart-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.chart-tab.active {
    background: #ff9f43;
    border-color: #ff9f43;
    color: #0f172a;
    font-weight: 600;
}

.chart-container {
    position: relative;
    flex: 1;
    min-height: 200px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .layout-wrapper {
        grid-template-columns: 1fr;
        height: auto;
        padding: 0 10px 10px 10px;
    }
    
    .left-col {
        height: auto;
        z-index: 150;
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }

    .map-container {
        height: 50vh;
    }

    .map-wrapper {
        height: 50vh;
    }

    .right-col {
        gap: 15px;
    }
    
    .info-panel, .chart-panel {
        min-height: 400px;
    }

    .map-title {
        top: 2%;
        right: 2%;
        left: auto;
        font-size: 1.1rem;
    }
    .map-title span {
        font-size: 0.85rem;
        margin-top: 4px;
    }
    .decor-line {
        display: none;
    }
}
