* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Courier New', monospace;
            background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
            color: #e0e0e0;
            min-height: 100vh;
            background-attachment: fixed;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            text-align: center;
            margin-bottom: 40px;
            padding: 30px 0;
            border-bottom: 2px solid #333;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
        }

        .header h1 {
            font-size: 3em;
            color: #fff;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
            margin-bottom: 10px;
        }

        .header p {
            font-size: 1.2em;
            color: #bbb;
            font-style: italic;
        }

        .tabs {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
            gap: 10px;
            flex-wrap: wrap;
        }

        .tab {
            background: #222;
            color: #fff;
            border: 2px solid #444;
            padding: 12px 24px;
            cursor: pointer;
            border-radius: 5px;
            transition: all 0.3s ease;
            font-family: inherit;
            font-size: 16px;
        }

        .tab:hover {
            background: #333;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
        }

        .tab.active {
            background: #444;
            border-color: #666;
            color: #fff;
            box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
        }

        .tab-content {
            display: none;
            background: rgba(0, 0, 0, 0.7);
            border: 2px solid #333;
            border-radius: 10px;
            padding: 30px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
        }

        .tab-content.active {
            display: block;
        }
          
        .events-btn {
            background: #1a1a2e;
            color: #fff;
            border: 2px solid #16213e;
            padding: 12px 24px;
            cursor: pointer;
            border-radius: 5px;
            transition: all 0.3s ease;
            font-family: inherit;
            font-size: 16px;
            text-decoration: none;
            display: inline-block;
        }

        .events-btn:hover {
            background: #16213e;
            box-shadow: 0 0 10px rgba(100, 200, 255, 0.3);
            border-color: #64c8ff;

        }

        .evidence-selector {
            background: #1a1a1a;
            padding: 25px;
            border-radius: 10px;
            margin-bottom: 30px;
            border: 2px solid #333;
        }

        .evidence-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .evidence-item {
            background: #222;
            border: 2px solid #444;
            border-radius: 5px;
            padding: 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
        }

        .evidence-item:hover {
            border-color: #666;
            background: #2a2a2a;
        }

        .evidence-item.selected {
            background: #333;
            border-color: #fff;
            color: #fff;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        }

        .result {
            background: #1a1a1a;
            border: 2px solid #444;
            border-radius: 10px;
            padding: 20px;
            margin-top: 20px;
            text-align: center;
        }

        .ghost-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 25px;
        }

        .ghost-card {
            background: #1a1a1a;
            border: 2px solid #333;
            border-radius: 10px;
            padding: 20px;
            transition: all 0.3s ease;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
            cursor: pointer;
            text-align: center;
        }

        .ghost-card:hover {
            border-color: #555;
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
        }

        .ghost-icon {
            width: 80px;
            height: 80px;
            background: #333;
            border-radius: 10px;
            margin: 0 auto 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #555;
            overflow: hidden;
        }

        .ghost-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .ghost-name {
            font-size: 1.2em;
            color: #fff;
            margin-bottom: 10px;
            text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
        }

        .evidence-list {
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .evidence-badge {
            background: #333;
            color: #fff;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.8em;
            border: 1px solid #555;
        }

        .evidence-badge.selected {
            background: #4CAF50;
            border-color: #4CAF50;
        }

        .clear-btn {
            background: #444;
            color: #fff;
            border: 2px solid #666;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-family: inherit;
            transition: all 0.3s ease;
        }

        .clear-btn:hover {
            background: #555;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
        }

        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
        }

        .modal-content {
            background: #1a1a1a;
            margin: 5% auto;
            padding: 30px;
            border: 2px solid #333;
            border-radius: 10px;
            width: 90%;
            max-width: 600px;
            position: relative;
            max-height: 80vh;
            overflow-y: auto;
        }

        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            position: absolute;
            right: 15px;
            top: 10px;
        }

        .close:hover {
            color: #fff;
        }

        .modal-ghost-name {
            font-size: 2em;
            color: #fff;
            margin-bottom: 20px;
            text-align: center;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        }

        .ghost-section {
            margin-bottom: 20px;
            background: #222;
            padding: 15px;
            border-radius: 8px;
        }

        .ghost-section h3 {
            color: #ccc;
            margin-bottom: 10px;
            border-bottom: 1px solid #444;
            padding-bottom: 5px;
        }

        .map-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
        }

        .map-card {
            background: #1a1a1a;
            border: 2px solid #333;
            border-radius: 10px;
            padding: 25px;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .map-card:hover {
            border-color: #555;
            box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
        }

        .map-name {
            font-size: 1.5em;
            color: #fff;
            margin-bottom: 15px;
            text-align: center;
        }

        /* FIXED: Better map image styling for auto-resize */
        .map-image {
            width: 100%;
            height: 200px;
            background: #333;
            border-radius: 8px;
            margin-bottom: 15px;
            border: 2px solid #444;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .map-image img {
            width: 100%;
            height: 100%;
            object-fit: contain; /* Changed from 'cover' to 'contain' for better fitting */
            background: #333; /* Ensures background shows when image doesn't fill container */
        }

        /* FIXED: Better modal map image styling */
        .modal-map-image {
            width: 100%; 
            max-width: 400px; 
            height: 250px; 
            margin: 0 auto; 
            border: 2px solid #444; 
            border-radius: 8px; 
            overflow: hidden; 
            background: #333;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-map-image img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
        }

        .cursed-objects-preview {
            background: #222;
            border-radius: 5px;
            padding: 15px;
        }

        .object-count {
            color: #4CAF50;
            font-weight: bold;
            font-size: 1.1em;
        }

        .possible-ghosts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .map-image {
                height: 150px;
            }
            
            .modal-map-image {
                height: 200px;
                max-width: 300px;
            }
        }