/* Windrose Map - CSS Styles */

:root {
    --primary: #2d5a4a;
    --primary-dark: #1e3d32;
    --primary-light: #4a8b7a;
    --secondary: #c9a962;
    --secondary-light: #e8d4a0;
    --accent: #e07b53;
    --dark: #1a1a1a;
    --dark-gray: #2d2d2d;
    --gray: #5a5a5a;
    --light-gray: #a0a0a0;
    --light: #f5f5f0;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --border: #e0e0e0;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-heading: Georgia, serif;
    --max-width: 1200px;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 1.2rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.logo-text span {
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav a {
    color: var(--gray);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.nav a:hover {
    color: var(--primary);
    background: rgba(45, 90, 74, 0.08);
}

.nav a.active {
    color: var(--primary);
    background: rgba(45, 90, 74, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--dark);
}

/* Main Content */
main {
    flex: 1;
}

.section {
    padding: 2rem 0;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-primary:hover {
    background: var(--secondary-light);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 98, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-medium);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.card h3 {
    margin-top: 0;
}

.card p {
    color: var(--gray);
    margin-bottom: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

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

th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

tr:hover {
    background: rgba(45, 90, 74, 0.04);
}

/* Map Preview */
.map-preview {
    background: var(--dark-gray);
    border-radius: 12px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-gray);
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.map-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%232d2d2d"/><circle cx="30" cy="40" r="15" fill="%234a8b7a" opacity="0.3"/><circle cx="70" cy="60" r="20" fill="%234a8b7a" opacity="0.3"/><circle cx="50" cy="30" r="10" fill="%234a8b7a" opacity="0.2"/><circle cx="20" cy="70" r="12" fill="%234a8b7a" opacity="0.2"/><circle cx="80" cy="25" r="8" fill="%234a8b7a" opacity="0.2"/></svg>') center/cover;
}

.map-placeholder {
    position: relative;
    z-index: 1;
    text-align: center;
}

.map-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.map-markers {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.marker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.marker-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.marker-dot.copper { background: #b87333; }
.marker-dot.iron { background: #71797E; }
.marker-dot.wood { background: #8B4513; }
.marker-dot.stone { background: #808080; }
.marker-dot.food { background: #90EE90; }
.marker-dot.island { background: #4a8b7a; }
.marker-dot.dungeon { background: #8B0000; }
.marker-dot.boss { background: #9400D3; }
.marker-dot.poi { background: #FFD700; }

/* FAQ */
.faq {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px var(--shadow);
}

.faq h2 {
    margin-top: 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: var(--gray);
}

/* Lists */
.resource-list, .location-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.list-item {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    color: var(--dark);
}

.list-item-desc {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

/* Guide Steps */
.guide-steps {
    counter-reset: step;
    margin: 1.5rem 0;
}

.guide-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.step-content p {
    margin-bottom: 0;
    color: var(--gray);
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: var(--light-gray);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--light-gray);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-disclaimer {
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Page Header */
.page-header {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 0;
}

.page-header h1 {
    color: var(--white);
    margin-top: 0;
}

.page-header p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 700px;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: underline;
}

.breadcrumb a:hover {
    color: var(--secondary);
}

/* Content Section */
.content-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.content-section:last-of-type {
    border-bottom: none;
}

/* Updates */
.last-updated {
    font-size: 0.85rem;
    color: var(--light-gray);
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .nav {
        display: none;
    }

    .nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1rem;
        box-shadow: 0 4px 12px var(--shadow-medium);
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

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

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .map-markers {
        gap: 1rem;
    }

    .guide-step {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .page-header {
        padding: 2rem 0;
    }

    h1 {
        font-size: 1.75rem;
    }
}

/* ========================================
   Phase 3 - Community & Share Styles
   ======================================== */

/* Form Styles */
.form {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px var(--shadow);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-primary);
    background: var(--light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Alert Styles */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Votes display */
.votes {
    font-weight: 600;
    color: var(--primary);
    margin-left: auto;
    padding-left: 1rem;
}

.route-section .route-goal {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}

.route-section .route-goal:hover {
    border-color: var(--primary-light);
    background: rgba(45, 90, 74, 0.05);
}

/* Marker List Item */
.marker-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px var(--shadow);
}

.marker-list-item .marker-info {
    flex: 1;
}

.marker-list-item .marker-name {
    font-weight: 600;
    color: var(--dark);
}

.marker-list-item .marker-category {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.marker-list-item .marker-desc {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0.25rem 0;
}

.marker-list-item .marker-meta {
    font-size: 0.8rem;
    color: var(--light-gray);
}

/* Search Result Styles */
.search-results {
    margin-top: 1.5rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--light);
}

/* Tab navigation for markers */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--dark);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Layout Grid cards */
.layout-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.layout-card h3 {
    margin-top: 0;
}

.layout-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.layout-stat {
    padding: 0.25rem 0.75rem;
    background: var(--light);
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ========================================
   Phase 2 - Interactive Map Styles
   ======================================== */

/* Interactive Map Container */
.map-page-container {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    min-height: 600px;
}

.map-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    padding: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.map-sidebar h3 {
    margin-top: 0;
    font-size: 1rem;
}

.map-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-area {
    flex: 1;
    position: relative;
    background: var(--dark-gray);
    border-radius: 12px;
    min-height: 500px;
    overflow: hidden;
    cursor: grab;
}

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

.map-background {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, #1a3a2a 0%, #0d1f15 50%, #1a3a2a 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%232d2d2d"/><circle cx="20" cy="30" r="8" fill="%234a8b7a" opacity="0.15"/><circle cx="50" cy="20" r="12" fill="%234a8b7a" opacity="0.1"/><circle cx="80" cy="40" r="10" fill="%234a8b7a" opacity="0.12"/><circle cx="30" cy="60" r="15" fill="%234a8b7a" opacity="0.08"/><circle cx="70" cy="80" r="8" fill="%234a8b7a" opacity="0.1"/><circle cx="60" cy="50" r="6" fill="%234a8b7a" opacity="0.15"/><circle cx="15" cy="85" r="10" fill="%234a8b7a" opacity="0.08"/><circle cx="90" cy="70" r="12" fill="%234a8b7a" opacity="0.1"/></svg>');
}

.map-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(74, 139, 122, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 139, 122, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Map Markers */
.map-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.map-marker.active {
    transform: translate(-50%, -50%) scale(1.4);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.map-marker.collected {
    opacity: 0.5;
}

.map-marker.favorite {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--secondary), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--light);
}

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

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-gray);
}

/* Filter Groups */
.filter-group {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-item input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-item label {
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Marker Details Panel */
.marker-details-panel {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.marker-details-panel.active {
    display: block;
}

.marker-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.marker-details-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: var(--dark);
}

.marker-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.marker-description {
    margin-bottom: 0.75rem;
}

.marker-notes {
    color: var(--light-gray);
    font-style: italic;
    margin-bottom: 1rem;
}

.marker-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
}

.status-label {
    font-weight: 600;
}

.status-value {
    font-weight: 500;
}

.status-undiscovered { color: var(--gray); }
.status-discovered { color: var(--primary-light); }
.status-collected { color: var(--primary); }
.status-favorite { color: var(--secondary); }

.marker-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Marker List */
.marker-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 1rem;
}

.marker-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.marker-list-item:hover {
    background: var(--light);
}

.marker-list-item .marker-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.marker-list-item .marker-info {
    flex: 1;
    min-width: 0;
}

.marker-list-item .marker-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marker-list-item .marker-category {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Map Controls */
.map-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 20;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shadow);
    font-size: 1.25rem;
    color: var(--dark);
}

.map-control-btn:hover {
    background: var(--light);
}

/* Mobile Filter Drawer */
.mobile-filter-drawer {
    display: none;
}

.filter-toggle-mobile {
    display: none;
}

/* Route Planner */
.route-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.route-goal {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.route-goal:hover {
    border-color: var(--primary-light);
}

.route-goal.selected {
    border-color: var(--primary);
    background: rgba(45, 90, 74, 0.05);
}

.route-goal-icon {
    font-size: 1.5rem;
}

.route-goal-title {
    font-weight: 600;
}

.route-goal-desc {
    font-size: 0.9rem;
    color: var(--gray);
}

.route-steps {
    margin-top: 1.5rem;
}

.route-step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-left: 3px solid var(--primary);
    margin-left: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.route-step::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 1.25rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
}

/* Quest Tracker */
.quest-tracker-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.quest-filter-btn {
    padding: 0.5rem 1rem;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quest-filter-btn:hover,
.quest-filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.quest-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px var(--shadow);
}

.quest-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quest-status.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.quest-info {
    flex: 1;
}

.quest-name {
    font-weight: 600;
}

.quest-location {
    font-size: 0.9rem;
    color: var(--gray);
}

.quest-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.quest-difficulty.easy {
    background: #d4edda;
    color: #155724;
}

.quest-difficulty.medium {
    background: #fff3cd;
    color: #856404;
}

.quest-difficulty.high {
    background: #f8d7da;
    color: #721c24;
}

.quest-actions {
    display: flex;
    gap: 0.5rem;
}

/* Resource Card (Detail Page) */
.resource-hero {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.resource-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.resource-info h1 {
    margin-top: 0;
}

.resource-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.resource-tag {
    padding: 0.25rem 0.75rem;
    background: var(--light);
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Location Card (Detail Page) */
.location-hero {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.danger-level {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.danger-level.low {
    background: #d4edda;
    color: #155724;
}

.danger-level.medium {
    background: #fff3cd;
    color: #856404;
}

.danger-level.high {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive Interactive Map */
@media (max-width: 1024px) {
    .map-page-container {
        flex-direction: column;
    }

    .map-sidebar {
        width: 100%;
        max-height: none;
    }

    .mobile-filter-drawer {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--white);
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 12px var(--shadow-medium);
        max-height: 60vh;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.3s;
        z-index: 100;
        padding: 1rem;
    }

    .mobile-filter-drawer.open {
        transform: translateY(0);
    }

    .filter-toggle-mobile {
        display: flex;
        position: fixed;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 99;
        padding: 0.75rem 1.5rem;
        background: var(--primary);
        color: var(--white);
        border: none;
        border-radius: 25px;
        cursor: pointer;
        font-weight: 600;
        box-shadow: 0 4px 12px var(--shadow-medium);
    }
}

@media (max-width: 768px) {
    .map-area {
        min-height: 400px;
    }

    .map-marker {
        width: 16px;
        height: 16px;
    }

    .resource-hero,
    .location-hero {
        flex-direction: column;
        text-align: center;
    }

    .route-section {
        padding: 1rem;
    }

    .quest-item {
        flex-direction: column;
        text-align: center;
    }

    .quest-actions {
        width: 100%;
        justify-content: center;
    }
}
/* ========================================
   Phase 3 Enhanced - Map Optimization v3.0
   ======================================== */

/* Quick Filters */
.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-filter-btn {
    padding: 0.4rem 0.75rem;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.quick-filter-btn:hover {
    background: var(--primary-light);
    color: var(--white);
    border-color: var(--primary-light);
}

.quick-filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Search Results */
.search-box {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-medium);
    max-height: 250px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    border: 1px solid var(--border);
}

.search-results.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--light);
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.search-result-type {
    font-size: 0.8rem;
    color: var(--gray);
}

.search-no-results {
    padding: 1rem;
    text-align: center;
    color: var(--gray);
}

/* Marker count */
.marker-count {
    font-size: 0.85rem;
    color: var(--gray);
    text-align: center;
    padding: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

/* Enhanced Marker Details */
.marker-details-panel {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px var(--shadow);
    min-height: 150px;
}

.marker-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.marker-details-header h3 {
    margin: 0;
}

.marker-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.marker-description {
    margin: 0.75rem 0;
    color: var(--dark);
}

.marker-tips {
    padding: 0.75rem;
    background: #e8f5e9;
    border-radius: 8px;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}

.marker-danger {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fff3cd;
    color: #856404;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.marker-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
    margin: 0.75rem 0;
}

.status-label {
    font-weight: 600;
}

.status-value {
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.status-undiscovered { color: var(--gray); }
.status-found { color: var(--primary-light); }
.status-collected { color: var(--primary); background: #e8f5e9; }
.status-favorite { color: var(--secondary); }
.status-later { color: var(--gray); }
.status-uncompleted { color: var(--gray); }
.status-inprogress { color: #856404; background: #fff3cd; }
.status-completed { color: #155724; background: #d4edda; }

.marker-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.marker-details-default {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
}

.marker-details-default h3 {
    margin-bottom: 0.5rem;
}

.marker-details-default p {
    margin: 0;
}

/* Marker hover tooltip */
.map-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.map-marker.active {
    transform: translate(-50%, -50%) scale(1.4);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.map-marker.collected {
    opacity: 0.5;
}

.map-marker.favorite {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--secondary), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-marker.found {
    border-width: 3px;
}

/* Marker list item */
.marker-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.marker-list-item:hover {
    background: var(--light);
}

.marker-list-item .marker-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.marker-list-item .marker-info {
    flex: 1;
    min-width: 0;
}

.marker-list-item .marker-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marker-list-item .marker-category {
    font-size: 0.85rem;
    color: var(--gray);
}

.marker-status-icon {
    font-size: 10px;
    color: var(--primary);
    position: absolute;
    top: 2px;
    left: 8px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* SEO Content */
.seo-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1024px) {
    .map-page-container {
        flex-direction: column;
    }
    .map-sidebar {
        width: 100%;
        max-height: none;
    }
    .search-results {
        position: relative;
    }
}

@media (max-width: 768px) {
    .map-area {
        min-height: 350px;
    }
    .marker-details-panel {
        min-height: 120px;
    }
    .quick-actions {
        flex-direction: column;
    }
    .quick-actions .btn {
        width: 100%;
    }
    .marker-actions {
        flex-direction: column;
    }
    .marker-actions .btn {
        width: 100%;
    }
}
