:root {
    --bg-dark: #0A0A0C;
    --bg-panel: #121218;
    --bg-card: #1A1A24;
    --neon-green: #00E676;
    --neon-red: #FF1744;
    --neon-blue: #00E5FF;
    --neon-yellow: #FFD600;
    --text-primary: #E0E0E0;
    --text-secondary: #888899;
    --border-color: #2A2A3A;
    --glow-green: 0 0 20px rgba(0, 230, 118, 0.3);
    --glow-red: 0 0 20px rgba(255, 23, 68, 0.3);
    --glow-blue: 0 0 20px rgba(0, 229, 255, 0.3);
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, 'Microsoft YaHei', sans-serif;
}

#header {
    height: 8vh;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: linear-gradient(180deg, #14141E 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1000;
}

.header-title h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-title .subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 4px;
    margin-top: 2px;
}

#header-vote-chart {
    width: 280px;
    height: 100%;
}

#main-container {
    display: grid;
    grid-template-columns: 55% 45%;
    height: 82vh;
    gap: 0;
}

#map-area {
    position: relative;
    border-right: 1px solid var(--border-color);
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

.map-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 1000;
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(10, 10, 12, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-success { background: var(--neon-green); box-shadow: var(--glow-green); }
.dot-fail { background: var(--neon-red); box-shadow: var(--glow-red); }
.dot-unknown { background: var(--neon-blue); box-shadow: var(--glow-blue); }

#dashboard {
    background: var(--bg-panel);
    overflow-y: auto;
    padding: 16px;
    position: relative;
}

#dashboard::-webkit-scrollbar {
    width: 4px;
}

#dashboard::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

#dashboard::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

#dashboard-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-align: center;
}

.placeholder-icon {
    font-size: 4rem;
    color: var(--neon-blue);
    opacity: 0.3;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

#dashboard-placeholder p {
    font-size: 1rem;
    line-height: 1.8;
    letter-spacing: 2px;
}

.hidden {
    display: none !important;
}

#dashboard-content {
    animation: fadeIn 0.5s ease-out;
}

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

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    position: relative;
}

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

.panel-tag {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-blue);
    letter-spacing: 2px;
}

.panel-status {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--neon-blue);
    border: 1px solid rgba(0, 229, 255, 0.3);
}

.panel-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

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

.info-item {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.info-item label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.info-item p {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
}

#radar-chart {
    width: 100%;
    height: 220px;
}

#finance-chart {
    width: 100%;
    height: 260px;
}

#action-panel {
    display: flex;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 0;
}

.vote-button {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #000;
    background: linear-gradient(135deg, var(--neon-green), #00C853);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glow-green);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vote-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 230, 118, 0.5);
}

.vote-button:active {
    transform: translateY(0);
}

.vote-button.voted {
    background: #333;
    color: #666;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-icon {
    font-size: 1.2rem;
}

.reveal-button {
    padding: 14px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--neon-red);
    background: transparent;
    border: 2px solid var(--neon-red);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reveal-button:hover {
    background: rgba(255, 23, 68, 0.1);
    box-shadow: var(--glow-red);
    transform: translateY(-2px);
}

.reveal-button:active {
    transform: translateY(0);
}

#stamp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

#stamp-content {
    padding: 30px 50px;
    border-radius: 12px;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-align: center;
    line-height: 1.6;
    border: 4px solid;
    transform: scale(3) rotate(-20deg);
    opacity: 0;
}

#stamp-content.stamp-success {
    color: var(--neon-green);
    border-color: var(--neon-green);
    background: rgba(0, 230, 118, 0.08);
    box-shadow: 0 0 60px rgba(0, 230, 118, 0.4), inset 0 0 30px rgba(0, 230, 118, 0.1);
    animation: stampDrop 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#stamp-content.stamp-fail {
    color: var(--neon-red);
    border-color: var(--neon-red);
    background: rgba(255, 23, 68, 0.08);
    box-shadow: 0 0 60px rgba(255, 23, 68, 0.4), inset 0 0 30px rgba(255, 23, 68, 0.1);
    animation: stampDrop 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes stampDrop {
    0% { transform: scale(3) rotate(-20deg); opacity: 0; }
    50% { transform: scale(0.8) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

#vote-results-bar {
    height: 10vh;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    background: linear-gradient(0deg, #14141E 0%, var(--bg-dark) 100%);
    border-top: 1px solid var(--border-color);
}

.vote-bar-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 1px;
}

#vote-results-chart {
    flex: 1;
    height: 100%;
}

.leaflet-container {
    background: var(--bg-dark) !important;
}

.leaflet-control-zoom a {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.leaflet-control-attribution {
    display: none !important;
}

.custom-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 900;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.custom-marker.marker-default {
    background: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.custom-marker:hover {
    transform: scale(1.3);
    z-index: 9999 !important;
}

.custom-marker.active {
    transform: scale(1.4);
    border-color: #fff;
    z-index: 9999 !important;
}

.marker-revealed-success {
    background: var(--neon-green) !important;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.6) !important;
}

.marker-revealed-fail {
    background: var(--neon-red) !important;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.6) !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
}

.leaflet-popup-tip {
    background: var(--bg-card) !important;
}

.leaflet-popup-content {
    margin: 10px 14px !important;
    font-size: 0.85rem;
    line-height: 1.5;
}
