/* CSS Custom Properties for Theming */
:root {
    --primary-color: #6a0dad;
    --secondary-color: #4c1a9b;
    --accent-color: #a020f0;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-tertiary: #cccccc;
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-overlay: rgba(0, 0, 0, 0.4);
    --container-bg: rgba(0, 0, 0, 0.6);
    --container-bg-hover: rgba(0, 0, 0, 0.75);
    --container-border: rgba(255, 255, 255, 0.2);
    --shadow-light: rgba(106, 13, 173, 0.15);
    --shadow-medium: rgba(106, 13, 173, 0.25);
    --shadow-heavy: rgba(0, 0, 0, 0.6);
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-card: linear-gradient(145deg, rgba(106, 13, 173, 0.3), rgba(160, 32, 240, 0.2));
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-image: 
        linear-gradient(135deg, var(--bg-overlay), var(--bg-overlay)),
        url('../../images/dark_hunter_background.png');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header Styles */
.header {
    position: relative;
    padding: 15px 20px 20px;
    text-align: center;
    background: var(--container-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--container-border);
    box-shadow: 0 8px 32px var(--shadow-heavy);
    margin-bottom: 20px;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 100;
    cursor: pointer;
    user-select: none;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px var(--shadow-medium);
    margin-bottom: 8px;
    position: relative;
    filter: drop-shadow(var(--text-shadow));
}

.header-subtitle {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    text-shadow: var(--text-shadow);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-container {
    background: var(--container-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--container-border);
    box-shadow: 0 4px 24px var(--shadow-light);
    width: 100%;
    margin-bottom: 30px;
}

/* Tabs */
.tabs-container {
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    gap: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--container-border);
}

.tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab.active {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px var(--shadow-medium);
    color: white;
}

.tab:hover:not(.active)::before {
    opacity: 1;
}

.tab:hover:not(.active) {
    transform: translateY(-2px);
}

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 30px;
}

.main-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: var(--text-shadow);
}

/* Map Container */
.map-container {
    position: relative;
    margin-bottom: 30px;
}

.map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--container-bg);
    padding: 12px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--container-border);
    box-shadow: 0 4px 20px var(--shadow-light);
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.control-btn img {
    width: 20px;
    height: 20px;
}

.map-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 2px solid var(--container-border);
    box-shadow: 0 8px 32px var(--shadow-light);
}

.map-image-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

@media (max-width: 480px) {
    .map-image-container {
        height: 300px;
    }
}

.map-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: transparent;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
    background: transparent;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    z-index: 2;
}

/* Map Markers */
.map-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.marker {
    position: absolute;
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border: 3px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.marker:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.marker-number {
    color: #ffffff;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Marker Types - Different colors for different zone types */
.marker.wild-zone {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.marker.battle-zone {
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.marker.pokemon-center {
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.marker.key-location {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.marker.mission {
    background: linear-gradient(135deg, #9C27B0 0%, #6A1B9A 100%);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
}

.marker.side-quest {
    background: linear-gradient(135deg, #607D8B 0%, #37474F 100%);
    box-shadow: 0 4px 15px rgba(96, 125, 139, 0.4);
}

.marker.other {
    background: linear-gradient(135deg, #795548 0%, #5D4037 100%);
    box-shadow: 0 4px 15px rgba(121, 85, 72, 0.4);
}

/* Filter Controls */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--container-bg);
    border: 1px solid var(--container-border);
    border-radius: 25px;
    padding: 10px 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}


.filter-btn:hover {
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 15px var(--shadow-light); */
    background: rgba(255, 255, 255, 0.15); /* Slightly lighter on hover */
}

.filter-btn.active {
    background: var(--primary-color);
    box-shadow: 0 6px 20px var(--shadow-medium);
    transform: none; /* Ensure no translateY effect */
}

.filter-btn img {
    width: 20px;
    height: 20px;
    position: relative;
    z-index: 2;
}

.filter-btn span {
    position: relative;
    z-index: 2;
}

/* Info Section */
.info-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
    backdrop-filter: blur(10px);
}

.note {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.controls-info {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Related Sections */
.related-sections {
    background: var(--container-bg);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--container-border);
    box-shadow: 0 4px 24px var(--shadow-light);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.section-btn {
    background: var(--container-bg);
    border: 1px solid var(--container-border);
    border-radius: 12px;
    padding: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.section-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section-btn:hover::before {
    opacity: 1;
}

.section-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.section-btn.active {
    background: var(--gradient-primary);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.section-btn i {
    font-size: 2rem;
    color: var(--accent-color);
    position: relative;
    z-index: 2;
}

.section-btn span {
    position: relative;
    z-index: 2;
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--container-bg);
    border-top: 1px solid var(--container-border);
    margin-top: 50px;
    padding: 30px 20px;
    backdrop-filter: blur(20px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
    flex-wrap: wrap;
    gap: 30px; /* Keep a reasonable gap between sections */
}

.footer-info {
    color: var(--text-secondary);
}

.footer-info p {
    margin-bottom: 8px; /* Add some space between paragraphs */
}

.footer-info p:last-child {
    margin-bottom: 0; /* No margin for the last paragraph */
}

.footer-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-info a:hover {
    color: var(--primary-color);
}

.footer-social {
    text-align: center;
}

.footer-social p {
    margin-bottom: 10px; /* Slightly reduce for better visual flow */
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    background: var(--container-bg);
    border: 1px solid var(--container-border);
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-btn:hover::before {
    opacity: 1;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.social-btn i {
    position: relative;
    z-index: 2;
}

.social-btn span {
    position: relative;
    z-index: 2;
}

.footer-legal {
    text-align: center;
    color: var(--text-tertiary);
    margin-top: 30px; /* Increase space from social links */
    font-size: 0.9rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Tablet adjustments */
    .header h1 {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
    }
    
    .main-title {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }
    
    .content-container {
        padding: 25px;
    }
    
    .map-image-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 15px 15px;
        margin-bottom: 15px;
    }
    
    .back-button {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .back-button span {
        display: none;
    }
    
    .header h1 {
        font-size: clamp(1rem, 3.5vw, 1.5rem);
    }
    
    .header-subtitle {
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .content-container {
        padding: 20px;
        border-radius: 12px;
    }
    
    .main-title {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        padding: 15px;
    }
    
    .map-container {
        margin-bottom: 20px;
    }
    
    .map-image-container {
        height: 400px;
    }
    
    .map-controls {
        top: 10px;
        right: 10px;
    }
    
    .zoom-controls {
        padding: 10px;
        gap: 8px;
    }
    
    .control-btn {
        padding: 8px;
    }
    
    .control-btn img {
        width: 18px;
        height: 18px;
    }
    
    .filter-controls {
        gap: 10px;
    }
    
    .filter-group {
        justify-content: center;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .filter-btn img {
        width: 18px;
        height: 18px;
    }
    
    .section-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .section-btn {
        padding: 15px;
    }
    
    .section-btn i {
        font-size: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-social {
        order: -1;
    }
    
    .social-links {
        gap: 10px;
    }
    
    /* Tooltip h3 padding for 768px */
    .tooltip-content h3 {
        padding-right: 45px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 8px 10px 12px;
    }
    
    .back-button {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .header h1 {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }
    
    .header-subtitle {
        font-size: 0.7rem;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .content-container {
        padding: 15px;
        border-radius: 10px;
    }
    
    .main-title {
        font-size: clamp(1rem, 5vw, 1.5rem);
        margin-bottom: 10px;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .map-container {
        margin-bottom: 15px;
    }
    
    .map-image-container {
        height: 300px;
    }
    
    .map-controls {
        top: 5px;
        right: 5px;
    }
    
    .zoom-controls {
        padding: 8px;
        gap: 6px;
    }
    
    .control-btn {
        padding: 6px;
    }
    
    .control-btn img {
        width: 16px;
        height: 16px;
    }
    
    .filter-controls {
        gap: 8px;
    }
    
    .filter-group {
        gap: 6px;
        width: 100%;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-radius: 20px;
    }
    
    .filter-btn img {
        width: 16px;
        height: 16px;
    }
    
    .filter-btn span {
        font-size: 0.75rem;
    }
    
    .marker {
        width: 28px;
        height: 28px;
    }
    
    .marker-number {
        font-size: 0.8rem;
    }
    
    .related-sections {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .section-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .section-btn {
        padding: 15px 10px;
    }
    
    .section-btn i {
        font-size: 1.3rem;
    }
    
    .section-btn span {
        font-size: 0.9rem;
    }
    
    /* Tooltip responsive styles for 360px */
    .marker-tooltip {
        max-width: 92vw;
        padding: 20px;
        max-height: 80vh;
    }
    
    .tooltip-content h3 {
        font-size: 1.3rem;
        padding-right: 40px;
        margin-bottom: 10px;
    }
    
    .tooltip-content p {
        font-size: 0.85rem;
    }
    
    .pokemon-section > p {
        font-size: 1rem;
    }
    
    .pokemon-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .pokemon-card {
        padding: 14px 10px;
        border-radius: 18px;
        min-height: 85px;
        overflow: visible !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .pokemon-img {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
        object-fit: contain;
        max-width: none;
    }
    
    .pokemon-name {
        display: none; /* Hide names on mobile for cleaner look */
    }
    
    .footer {
        padding: 20px 15px;
    }
    
    .footer-content {
        gap: 15px;
    }
    
    .footer-info p {
        font-size: 0.85rem;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .social-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .footer-legal {
        font-size: 0.75rem;
        margin-top: 20px;
    }
    
    /* Tooltip responsive styles */
    .marker-tooltip {
        max-width: 95vw;
        max-height: 70vh;
        padding: 12px;
        border-radius: 12px;
    }
    
    .marker-tooltip > .close-tooltip {
        top: 8px;
        right: 8px;
    }
    
    .tooltip-content h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
        padding-right: 40px;
    }
    
    .tooltip-content p {
        font-size: 0.8rem;
        margin: 3px 0;
    }
    
    .pokemon-section {
        margin-top: 12px;
    }
    
    .pokemon-section > p {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    
    .pokemon-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-top: 10px;
    }
    
    .pokemon-card {
        max-width: 75px;
        padding: 6px 4px;
        border-radius: 8px;
    }
    
    .pokemon-img {
        width: 40px;
        height: 40px;
        margin-bottom: 4px;
    }
    
    .pokemon-name {
        font-size: 0.6rem;
    }
    
    .close-tooltip {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
        top: 8px;
        right: 8px;
    }
}

@media (max-width: 360px) {
    /* Extra small phones */
    .header {
        padding: 5px 8px 10px;
    }
    
    .back-button {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .header h1 {
        font-size: clamp(0.8rem, 5vw, 1rem);
    }
    
    .header-subtitle {
        font-size: 0.65rem;
    }
    
    .main-content {
        padding: 8px;
    }
    
    .content-container {
        padding: 12px;
    }
    
    .main-title {
        font-size: clamp(0.9rem, 5vw, 1.2rem);
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    .map-image-container {
        height: 250px;
    }
    
    .filter-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    
    .filter-btn img {
        width: 14px;
        height: 14px;
    }
    
    .section-grid {
        gap: 8px;
    }
    
    .section-btn {
        padding: 12px 8px;
    }
    
    .footer-legal {
        font-size: 0.7rem;
    }
}

/* Tooltip Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) translateY(-50%);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(-50%);
    }
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Marker Tooltip Styles */
.marker-tooltip {
    position: fixed;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(40, 40, 70, 0.98));
    border: 2px solid rgba(102, 126, 234, 0.6);
    border-radius: 20px;
    padding: 25px;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10000;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideInRight 0.3s ease-out;
}

/* Position close button relative to tooltip container */
.marker-tooltip > .close-tooltip {
    position: absolute;
    top: 15px;
    right: 15px;
}

/* Custom scrollbar for tooltip */
.marker-tooltip::-webkit-scrollbar {
    width: 8px;
}

.marker-tooltip::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.marker-tooltip::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

.marker-tooltip::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.tooltip-content {
    position: relative;
}

.tooltip-content h3 {
    margin: 0 0 15px 0;
    padding-right: 50px;
    color: #fff;
    font-size: 1.8rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.zone-description {
    text-align: center;
    color: #a8b8ff;
    font-size: 1rem;
    margin: 10px 0 15px 0;
    font-style: italic;
}

.tooltip-content p {
    margin: 8px 0;
    color: #e0e0e0;
    font-size: 0.95rem;
    text-align: left;
    line-height: 1.6;
}

.tooltip-content p strong {
    color: #a8b8ff;
    font-weight: 600;
}

.pokemon-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.pokemon-section > p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    text-align: left;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
    justify-items: stretch;
}

.pokemon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(60, 70, 120, 0.4), rgba(40, 50, 90, 0.4));
    border: 1.5px solid rgba(102, 126, 234, 0.25);
    border-radius: 16px;
    padding: 12px 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.pokemon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.2), rgba(160, 32, 240, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pokemon-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.5),
        0 0 0 2px rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.6);
}

.pokemon-card:hover::before {
    opacity: 1;
}

.pokemon-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.pokemon-card:hover .pokemon-img {
    transform: scale(1.1);
}

.pokemon-name {
    font-size: 0.75rem;
    color: #fff;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.3;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.pokemon-list-text {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.close-tooltip {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 107, 107, 0.2);
    border: 1.5px solid rgba(255, 107, 107, 0.4);
    border-radius: 50%;
    color: #ff8a8a;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
    flex-shrink: 0;
}

.close-tooltip:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.6);
    transform: rotate(90deg);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}
    
    /* SVG Overlay Styles */
    .map-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none; /* Allows clicking through the SVG to the map below */
    }
    
    .wild-zone-element,
    .battle-zone-element {
        display: none; /* Hidden by default */
        pointer-events: all; /* Make the paths clickable */
        cursor: pointer;
        transition: opacity 0.3s ease;
    }
    
    /* Battle Zone Styles */
    .battle-zone-element {
        fill: rgba(255, 0, 0, 0.5); /* Red with 50% opacity */
        stroke: rgba(255, 0, 0, 1);
        stroke-width: 2px;
    }
    
    .battle-zone-element:hover {
        fill: rgba(255, 0, 0, 0.7);
    }
    
    /* Wild Zone Styles */
    .wild-zone-element {
        fill: rgba(0, 255, 0, 0.5); /* Green with 50% opacity */
        stroke: rgba(0, 255, 0, 1);
        stroke-width: 2px;
    }
    
.wild-zone-element:hover {
    fill: rgba(0, 255, 0, 0.7);
}

/* Small Wild Zone Styles */
.small-wild-zone-element {
    display: none; /* Hidden by default */
    pointer-events: all; /* Make the paths clickable */
    cursor: pointer;
    transition: opacity 0.3s ease;
    fill: rgba(0, 200, 255, 0.5); /* Light blue with 50% opacity */
    stroke: rgba(0, 200, 255, 1);
    stroke-width: 2px;
}

.small-wild-zone-element:hover {
    fill: rgba(0, 200, 255, 0.7);
}

/* Pokemon Center Styles */
.pokemon-center-element {
    display: none;
    pointer-events: all;
    cursor: pointer;
    transform-origin: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pokemon-center-element:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Key Location Styles */
.key-location-element {
    display: none;
    pointer-events: all;
    cursor: pointer;
}

/* Mission Styles */
.mission-element {
    display: none;
    pointer-events: all;
    cursor: pointer;
}

/* Mission Styles */
.mission-group {
    display: none; /* Hidden by default */
    pointer-events: all; /* Make the group clickable */
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.mission-group:hover {
    opacity: 0.8;
}

.mission-text {
    text-anchor: middle;
    dominant-baseline: central;
}

/* Side Quest Styles */
.side-quest-element {
    display: none;
    pointer-events: all;
    cursor: pointer;
}

/* Other Styles */
.other-element {
    display: none;
    pointer-events: all;
    cursor: pointer;
}

/* Zone Number Styles */
.zone-number-group {
    display: none; /* Hidden by default */
    pointer-events: all; /* Make the group clickable */
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.zone-number-group:hover {
    opacity: 0.8;
}

.zone-number-text {
    text-anchor: middle;
    dominant-baseline: central;
}