#map {
    height: 100vh;
    width: 100vw;
    cursor: pointer;
}
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background:dimgrey;
}
.search-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    width: 320px;
    max-width: 90%;
}

.search-box {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: all 0.3s ease;
}

.search-box:focus {
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2);
}
/* Ultra-Modern Detail Panel Styles */
.detail-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 460px;
    max-width: 90%;
    max-height: calc(100vh - 40px);
    height: auto;
    min-height: 400px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 10px 25px rgba(0, 0, 0, 0.2),
        0 5px 10px rgba(0, 0, 0, 0.1),
        inset 1px 0 0 rgba(255, 255, 255, 0.1);
    transform: translateX(-120%);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 2px solid transparent;
    background-image:
        linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%),
        linear-gradient(90deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    overflow: hidden;
    backdrop-filter: blur(20px);
    visibility: hidden;
    pointer-events: none;
}

.detail-panel.visible {
    transform: translateX(0);
    box-shadow:
        0 25px 80px rgba(102, 126, 234, 0.25),
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 8px 15px rgba(0, 0, 0, 0.15),
        inset -1px 0 0 rgba(255, 255, 255, 0.1);
    visibility: visible;
    pointer-events: all;
}

.detail-panel.hidden {
    transform: translateX(-120%);
    visibility: hidden;
    pointer-events: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    color: #212529;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.panel-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.panel-header-title img {
    width: 20px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.panel-header button {
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.panel-header button:hover {
    background: #f8f9fa;
    color: #212529;
}

.panel-header button:active {
    background: #e9ecef;
}

.panel-header button i {
    transition: transform 0.3s ease;
}

.panel-header button:hover i {
    transform: rotate(-90deg);
}

/* Ultra-Modern Vessel Name Section */
.vessel-info-section {
    padding: 28px 32px;
    margin: 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.vessel-info-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.vessel-name {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.vessel-flag {
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.vessel-flag:hover {
    transform: scale(1.05);
}

/* Ultra-Modern Navigation Tabs */
.panel-nav-tabs {
    display: flex;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    margin: 0;
    padding: 0;
    overflow-x: auto;
    backdrop-filter: blur(10px);
}

.panel-nav-tab {
    flex: 1;
    padding: 16px 12px;
    background: none;
    border: none;
    border-bottom: 4px solid transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-nav-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px 2px 0 0;
}

.panel-nav-tab:hover {
    color: #667eea;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateY(-1px);
}

.panel-nav-tab:hover::before {
    width: 60%;
}

.panel-nav-tab.active {
    color: #667eea;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-1px);
}

.panel-nav-tab.active::before {
    width: 100%;
    animation: tabGlow 2s ease-in-out infinite alternate;
}

@keyframes tabGlow {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.panel-nav-tab i {
    margin-right: 6px;
    font-size: 16px;
}

/* Panel Content */
.panel-body {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    background: #ffffff;
    border-radius: 0 0 18px 18px;
    max-height: calc(100vh - 200px);
}

.panel-content-section {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
}

.panel-content-section:last-child {
    border-bottom: none;
}

.panel-content-section h6 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 20px;
    letter-spacing: 1px;
    position: relative;
    padding-left: 16px;
}

.panel-content-section h6::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 2px;
}

.form-like-list .form-group {
    margin-bottom: 16px;
    padding: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border-left: 4px solid transparent;
    background-image:
        linear-gradient(145deg, #ffffff 0%, #f8fafc 100%),
        linear-gradient(90deg, #667eea, #764ba2);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-like-list .form-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-like-list .form-group:hover {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    transform: translateY(-2px) translateX(4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.form-like-list .form-group:hover::before {
    opacity: 1;
}

.form-like-list .label {
    font-weight: 700;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-like-list .label::before {
    content: '▸';
    color: #667eea;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.form-like-list .form-group:hover .label::before {
    transform: translateX(2px);
}

.form-like-list .value {
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
}

/* Ultra-Modern Ship Cards Grid */
.panel-ship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 24px 28px;
}

.ship-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.ship-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe);
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: scaleX(0);
    transform-origin: left;
}

.ship-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ship-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.ship-card:hover::after {
    opacity: 1;
}

.ship-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(102, 126, 234, 0.2),
        0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.ship-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.ship-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.ship-card:hover .ship-icon {
    transform: scale(1.1) rotate(5deg);
}

.ship-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ship-info p {
    margin: 6px 0 0 0;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Ultra-Modern Registration Section */
.registration-section {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    padding: 24px 28px;
    border-radius: 16px;
    margin: 20px 0;
    border: 2px solid rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.registration-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); }
}

.registration-header {
    font-size: 16px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.registration-header i {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.registration-content {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Action Buttons */
.panel-actions {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.btn-detail {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #007bff;
    background: #007bff;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-detail:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Loading and Empty States */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Ultra-Modern Empty State */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #64748b;
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: breathe 4s ease-in-out infinite alternate;
}

@keyframes breathe {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.2));
    position: relative;
    z-index: 1;
}

.empty-state h5 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.empty-state p {
    font-size: 16px;
    line-height: 1.6;
    color: #64748b;
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .detail-panel {
        width: calc(100vw - 40px);
        max-width: 350px;
        top: 15px;
        left: 15px;
        right: 15px;
        min-height: 350px;
    }

    .panel-ship-grid {
        grid-template-columns: 1fr;
    }

    .vessel-name {
        font-size: 18px;
    }

    .panel-nav-tabs {
        font-size: 12px;
    }

    .panel-header {
        padding: 16px 20px;
        font-size: 16px;
    }

    .panel-body {
        max-height: calc(100vh - 180px);
    }
}

@media (max-width: 480px) {
    .detail-panel {
        width: calc(100vw - 20px);
        max-width: none;
        top: 10px;
        left: 10px;
        right: 10px;
        min-height: 300px;
        border-radius: 15px;
    }

    .panel-header {
        padding: 14px 18px;
        font-size: 15px;
        border-radius: 13px 13px 0 0;
    }

    .panel-body {
        border-radius: 0 0 13px 13px;
        max-height: calc(100vh - 150px);
    }

    .panel-content-section {
        padding: 16px 20px;
    }

    .form-like-list .form-group {
        padding: 12px 16px;
    }

    .vessel-info-section {
        padding: 20px 24px;
        margin: 8px 0;
    }
}

/* Ultra-wide screen optimization */
@media (min-width: 1400px) {
    .detail-panel {
        width: 500px;
        max-width: 500px;
    }
}

.floating-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
}

.floating-panel.minimized {
    height: auto;
    overflow: hidden;
}

.floating-header {
    background-color: #0d6efd;
    color: white;
    padding: 10px;
    cursor: pointer;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.floating-body {
    padding: 10px;
}

.floating-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}
#controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.dot {
    height: 15px;
    width: 15px;
    border-radius: 50%;
    display: inline-block;
    margin: 5px;
}
/*.tab-content {*/
/*    max-height: calc(80vh - 100px) !important;*/
/*    overflow-y: auto !important;*/
/*    margin-bottom: 10px;*/
/*}*/
#panelTabs {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
}
.form-like-list .form-group {
    margin-bottom: 2px;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.form-like-list .label {
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.form-like-list .value {
    font-weight: 600;
    color: #212529;
}

.panel-container {
    /*max-width: 500px;*/
    /*margin: 2rem auto;*/
    /*padding: 2rem;*/
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 1px 0 1px 0;
    padding: 5px 10px 5px 10px;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-top: 0;
    font-size: 15px;
    font-weight: 800;
}

.card p {
    color: #555;
    margin: 0;
    padding: 0;
    font-size: 10px;
}

/* Legend Grid Styles */
.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.legend-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.legend-item svg {
    flex-shrink: 0;
}

.legend-item span {
    font-size: 11px;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#map{
    /*pointer-events: none;*/
}
