.nfc-worldmap-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.nfc-map {
    width: 100%;
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nfc-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.nfc-scan-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nfc-scan-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.nfc-scan-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nfc-scan-btn .nfc-icon {
    width: 24px;
    height: 24px;
}

.nfc-scan-btn.scanning {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.8);
    }
}

.nfc-scan-btn.nfc-scanning {
    animation: scanPulse 0.8s ease-in-out;
}

@keyframes scanPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.nfc-status {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    max-width: 250px;
    text-align: center;
}

.nfc-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.nfc-status.success {
    background: #d1fae5;
    color: #065f46;
}

.nfc-status.scanning {
    background: #dbeafe;
    color: #1e40af;
}

.nfc-status.info {
    background: #e0e7ff;
    color: #3730a3;
}

.nfc-marker-popup {
    min-width: 200px;
    max-width: 300px;
}

.nfc-marker-popup h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #1f2937;
}

.nfc-marker-popup p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.nfc-marker-popup img {
    border-radius: 8px;
    margin-bottom: 10px;
}

.nfc-view-gallery {
    width: 100%;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nfc-view-gallery:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.nfc-marker-highlight {
    animation: markerBounce 1s ease-in-out;
}

@keyframes markerBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-20px);
    }

    50% {
        transform: translateY(-10px);
    }

    75% {
        transform: translateY(-15px);
    }
}

.nfc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.nfc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.nfc-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    margin: 0;
    background: white;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.nfc-modal-entering .nfc-modal-content {
    animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nfc-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nfc-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.nfc-modal-header {
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nfc-modal-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
}

.nfc-modal-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.nfc-gallery-container {
    flex: 1;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #000;
}

.nfc-gallery-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.nfc-gallery-main {
    flex: 1;
    position: relative;
    background: black;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.nfc-gallery-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.nfc-main-image,
.nfc-gallery-image-container video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: none;
}

.nfc-image-caption {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    margin: 0;
    text-align: center;
    pointer-events: none;
}

.nfc-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 60px;
    font-size: 32px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 5;
}

.nfc-gallery-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nfc-gallery-prev {
    left: 10px;
}

.nfc-gallery-next {
    right: 10px;
}

.nfc-gallery-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    pointer-events: none;
    transform: none;
}

.nfc-gallery-thumbnails {
    height: 120px;
    flex-shrink: 0;
    min-height: 120px;
    background: #111827;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding: 15px;
    overflow-x: auto;
    border-top: 1px solid #374151;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.nfc-gallery-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.6;
    background: #000;
}

.nfc-gallery-thumb:hover {
    opacity: 1;
}

.nfc-gallery-thumb.active {
    border-color: #667eea;
    opacity: 1;
}

.nfc-gallery-thumb img,
.nfc-gallery-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nfc-no-images {
    text-align: center;
    color: #9ca3af;
    font-size: 16px;
    padding: 40px;
}

body.nfc-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .nfc-controls {
        top: 10px;
        right: 10px;
    }

    .nfc-scan-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .nfc-scan-btn .nfc-icon {
        width: 20px;
        height: 20px;
    }

    .nfc-modal-content {
        width: 95%;
        margin: 2.5vh auto;
        height: 95vh;
        border-radius: 12px;
    }

    .nfc-modal-header {
        padding: 20px;
    }

    .nfc-modal-header h2 {
        font-size: 22px;
    }

    .nfc-modal-header p {
        font-size: 14px;
    }

    .nfc-gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .nfc-gallery-prev {
        left: 10px;
    }

    .nfc-gallery-next {
        right: 10px;
    }

    .nfc-gallery-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
}

@media (prefers-color-scheme: dark) {
    .nfc-modal-content {
        background: #1f2937;
    }

    .nfc-gallery-main {
        background: #111827;
    }

    .nfc-modal-header h2,
    .nfc-modal-header p {
        color: white;
    }

    .nfc-image-caption {
        color: #d1d5db;
    }
}