/* Base styles */
:root {
    --background: #121212;
    --foreground: #e0e0e0;
    --primary: #bb86fc;
    --secondary: #03dac6;
    --accent: #ff4081;
    --border: #333;
    --shadow: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
    padding: 0;
    box-shadow: 0 4px 12px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links a {
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Server Status in Top Right */
.status-info {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.server-status,
.time-info,
.weather-info {
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(44, 44, 44, 0.8);
    backdrop-filter: blur(10px);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.server-status:hover,
.time-info:hover,
.weather-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.server-status.online {
    border-left: 3px solid var(--secondary);
    background: rgba(3, 218, 198, 0.1);
}

.server-status.offline {
    border-left: 3px solid var(--accent);
    background: rgba(255, 64, 129, 0.1);
}

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

.status-indicator.online {
    background-color: var(--secondary);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background-color: var(--accent);
}

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

.weather-info {
    border-left: 3px solid var(--primary);
    background: rgba(187, 134, 252, 0.1);
    cursor: pointer;
    flex-direction: column;
    align-items: stretch;
    position: relative;
}

.weather-summary {
    display: flex;
    align-items: center;
    gap: 6px;
}

.weather-icon {
    font-size: 16px;
}

.weather-details {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(135deg, #2c2c2c 0%, #3a3a3a 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    min-width: 300px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.weather-info.expanded .weather-details {
    display: block;
}

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

.weather-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.weather-detail-row:last-child {
    border-bottom: none;
}

.weather-detail-label {
    font-weight: 500;
    color: var(--foreground);
    opacity: 0.8;
}

.weather-detail-value {
    font-weight: bold;
    color: var(--secondary);
}

.time-info {
    border-left: 3px solid #ffa500;
    background: rgba(255, 165, 0, 0.1);
}

.time-icon {
    font-size: 16px;
}

#headerTimeText {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 11px;
}

/* Main Content */
main {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0 24px;
    border-bottom: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    justify-content: center;
}

.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-track {
    background: #0f0f0f;
}

.tabs::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.tab-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: transform 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.tab-btn:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.tab-btn.active {
    background: rgba(187, 134, 252, 0.1);
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* User Menu & Authentication */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login, .btn-logout {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-login:hover, .btn-logout:hover {
    background: #9b60e0;
    transform: translateY(-1px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(187, 134, 252, 0.1);
    border-radius: 5px;
    border: 1px solid var(--primary);
}

.user-name {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.hidden {
    display: none !important;
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--border);
}

.modal-content h2 {
    margin-bottom: 10px;
    color: var(--primary);
}

.modal-description {
    margin-bottom: 20px;
    color: #999;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 14px;
    color: var(--foreground);
    font-weight: 500;
}

.form-group input {
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--foreground);
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.error-message {
    background: rgba(255, 64, 129, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px;
    border-radius: 5px;
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #9b60e0;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #333;
    color: #fff;
}

.btn-secondary:hover {
    background: #444;
}

.btn-warning {
    background: #ff9800;
    color: #fff;
}

.btn-warning:hover {
    background: #f57c00;
}

.btn-info {
    background: var(--secondary);
    color: #121212;
}

.btn-info:hover {
    background: #00c4b4;
}

.login-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: #999;
}

.login-info p {
    margin: 5px 0;
}

.login-info code {
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--secondary);
}

/* Auth Required Message */
.auth-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.auth-message {
    text-align: center;
    padding: 40px;
}

.auth-message .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.auth-message h3 {
    margin-bottom: 10px;
    color: var(--foreground);
}

.auth-message p {
    margin-bottom: 20px;
    color: #999;
}

/* Settings */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-note {
    background: rgba(3, 218, 198, 0.1);
    border: 1px solid var(--secondary);
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

.info-note p {
    margin: 5px 0;
    font-size: 14px;
    color: #999;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-note {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    border-radius: 5px;
    font-size: 13px;
    color: #ff9800;
}

.admin-only {
    display: none;
}

/* Footer */
footer {
    background-color: #1f1f1f;
    padding: 10px 20px;
    text-align: center;
    box-shadow: 0 -2px 4px var(--shadow);
}

/* Config Bar - REMOVED */

/* Content Sections - REMOVED */

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input,
select,
textarea {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: #2c2c2c;
    color: var(--foreground);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    outline: none;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    background-color: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #9b59b6;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    border: 1px solid var(--border);
    text-align: left;
}

th {
    background-color: #2c2c2c;
}

/* Misc */
.hidden {
    display: none;
}

.show {
    display: block;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background-color: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.card h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--secondary);
}

.card h5 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--foreground);
}

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

.map-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-count-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background-color: #2c2c2c;
    color: var(--foreground);
    border: 2px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.player-count-badge.online {
    background-color: rgba(3, 218, 198, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
}

.player-count-badge.online::before {
    content: '👥';
    font-size: 16px;
}

.player-count-badge.offline {
    background-color: rgba(255, 64, 129, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.player-count-badge.offline::before {
    content: '⚫';
    font-size: 12px;
}

.btn-refresh, .btn-close {
    padding: 8px 12px;
    font-size: 14px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat {
    text-align: center;
    padding: 15px;
    background-color: #2c2c2c;
    border-radius: 4px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--foreground);
    opacity: 0.8;
}

/* Info Grid */
.info-grid {
    display: grid;
    gap: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #2c2c2c;
    border-radius: 4px;
}

.info-label {
    font-weight: 500;
    color: var(--foreground);
    opacity: 0.8;
}

.info-value {
    font-weight: bold;
    color: var(--secondary);
}

/* Map Container */
.map-container {
    position: relative;
    background-color: #2c2c2c;
    border-radius: 4px;
    overflow: hidden;
    min-height: 600px;
    max-height: calc(100vh - 200px);
    height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.map-container:active {
    cursor: grabbing;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

.map-image {
    display: block;
    max-width: none;
    max-height: none;
    width: 100%;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.map-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10; /* Higher than landmarks (5) */
}

.map-landmarks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.map-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.map-message {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--foreground);
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 16px;  /* Reduced from 24px */
    pointer-events: all;
    cursor: pointer;
    transition: transform 0.2s ease, font-size 0.2s ease;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
    z-index: 100;
}

.marker-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;  /* Reduced from 12px */
    white-space: nowrap;
    margin-top: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    transform-origin: center top;
}

.map-marker:hover .marker-label {
    opacity: 1;
}

.marker-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(40, 40, 40, 0.98) 100%);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    font-size: 12px;
    transform-origin: center top;
}

.map-marker:hover .marker-tooltip {
    opacity: 1;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-row:last-child {
    border-bottom: none;
}

.tooltip-label {
    color: var(--foreground);
    opacity: 0.8;
    font-weight: 500;
}

.tooltip-value {
    color: var(--secondary);
    font-weight: 600;
}

.tooltip-value.warning {
    color: var(--accent);
}

.tooltip-conditions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-conditions-title {
    font-size: 11px;
    color: var(--foreground);
    opacity: 0.7;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tooltip-condition-tag {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px;
    background-color: rgba(187, 134, 252, 0.2);
    border: 1px solid var(--primary);
    border-radius: 10px;
    font-size: 10px;
    color: var(--primary);
}

/* Character Details */
.character-details {
    margin-top: 20px;
}

.character-info {
    padding: 10px;
}

.conditions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.condition-tag {
    padding: 4px 12px;
    background-color: var(--accent);
    color: white;
    border-radius: 12px;
    font-size: 12px;
}

.recipes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background-color: #2c2c2c;
    border-radius: 4px;
}

.recipe-tag {
    padding: 4px 10px;
    background-color: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 11px;
    white-space: nowrap;
}

/* Scoreboard */
.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scoreboard-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #2c2c2c;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.scoreboard-item:hover {
    background-color: #3c3c3c;
}

.scoreboard-item .rank {
    font-weight: bold;
    color: var(--primary);
    min-width: 40px;
}

.scoreboard-item .player-name {
    flex: 1;
    color: var(--foreground);
}

.scoreboard-item .score {
    font-weight: bold;
    color: var(--secondary);
}

/* No Data / Error states */
.no-data {
    text-align: center;
    padding: 40px;
    color: var(--foreground);
    opacity: 0.6;
    font-style: italic;
}

.error {
    color: var(--accent);
    padding: 20px;
    text-align: center;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--foreground);
    opacity: 0.6;
}

/* Table Container */
.table-container {
    overflow-x: auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    header nav {
        padding: 10px 16px;
        gap: 20px;
    }

    .logo {
        font-size: 18px;
    }

    .status-info {
        gap: 6px;
    }

    .server-status,
    .time-info,
    .weather-info {
        padding: 5px 8px;
        font-size: 11px;
        gap: 4px;
    }

    #headerTimeText {
        font-size: 10px;
    }

    .tabs {
        padding: 0 16px;
        gap: 3px;
    }

    .tab-btn {
        padding: 12px 18px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    header nav {
        flex-direction: column;
        padding: 12px 16px;
        gap: 12px;
    }

    .logo {
        width: auto;
        text-align: center;
        font-size: 20px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .status-info {
        justify-content: center;
        width: 100%;
        gap: 6px;
        flex-wrap: wrap;
    }

    .server-status,
    .time-info,
    .weather-info {
        flex: 1 1 auto;
        min-width: 110px;
        justify-content: center;
        font-size: 11px;
        padding: 6px 8px;
    }

    .tabs {
        padding: 0 12px;
        justify-content: flex-start;
        gap: 2px;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    .weather-details {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-width: 280px;
    }

    .map-container {
        min-height: 400px;
        height: 60vh;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .map-info {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards {
        grid-template-columns: 1fr;
    }
}

/* Map Zoom and Pan */
.map-container {
    cursor: grab;
}

.map-container:active {
    cursor: grabbing;
}

.map-wrapper {
    transition: transform 0.1s ease-out;
}

.map-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.map-zoom-btn {
    width: 40px;
    height: 40px;
    background: rgba(44, 44, 44, 0.9);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.map-zoom-btn:hover {
    background: rgba(187, 134, 252, 0.2);
    border-color: var(--primary);
    transform: scale(1.1);
}

.map-zoom-btn:active {
    transform: scale(0.95);
}

.map-zoom-reset {
    font-size: 16px;
    color: var(--primary);
    cursor: pointer;
    text-align: center;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.map-zoom-reset:hover {
    text-decoration: underline;
}

.map-zoom-reset:active {
    transform: scale(0.95);
}

/* Character Map Adjustments */
.character-map {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    background-color: #2c2c2c;
}

.character-map canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-map .map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.character-map .map-zoom-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.character-map .map-zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(44, 44, 44, 0.9);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.character-map .map-zoom-btn:hover {
    background: rgba(187, 134, 252, 0.2);
    border-color: var(--primary);
    transform: scale(1.1);
}

.character-map .map-zoom-btn:active {
    transform: scale(0.95);
}

.character-map .map-zoom-reset {
    font-size: 14px;
    color: var(--primary);
    cursor: pointer;
    text-align: center;
    padding: 6px 0;
    transition: all 0.2s ease;
}

.character-map .map-zoom-reset:hover {
    text-decoration: underline;
}

.character-map .map-zoom-reset:active {
    transform: scale(0.95);
}

/* Landmark Markers */
.map-landmark {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: all;
    cursor: help;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.map-landmark:hover {
    opacity: 1;
    z-index: 100;
}

.landmark-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 4px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.landmark-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    pointer-events: none;
    transform-origin: center top;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Adjusted styles for better visibility and interaction */
.map-marker,
.map-landmark {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.map-marker:hover,
.map-landmark:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 100;
}

.map-marker .marker-tooltip,
.map-landmark .landmark-label {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.map-marker:hover .marker-tooltip,
.map-landmark:hover .landmark-label {
    opacity: 1;
}

.map-landmark {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: all;
    cursor: help;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.map-landmark:hover {
    opacity: 1;
    z-index: 100;
}

.landmark-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 4px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.landmark-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    pointer-events: none;
    transform-origin: center top;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}