    * {
        box-sizing: border-box;
    }

    body {
        margin: 0;
        padding: 20px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: #f5f5f5;
    }

    .ship-container {
        max-width: 1200px;
        margin: 0 auto;
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .legend {
        padding: 10px 20px;
        background: linear-gradient(125.75deg, rgb(44, 176, 234) 37.4%, rgb(7, 49, 99) 142.76%);
        color: white;
        text-align: center;
    }

    .legend h2 {
        margin: 0 0 15px 0;
        font-size: 24px;
        font-weight: 300;
    }

    .legend-items {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    .legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
    }

    .legend-color {
        width: 20px;
        height: 20px;
        border-radius: 4px;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .svg-container {
        position: relative;
        overflow: hidden;
        background: #fff;
        min-height: 60vh;
    }

    .svg-wrapper {
        position: relative;
        width: 100%;
        height: 100%;
        cursor: grab;
        transition: transform 0.3s ease;
    }

    .svg-wrapper.dragging {
        cursor: grabbing;
    }

    .controls {
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 100;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .control-btn {
        width: 50px;
        height: 50px;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: bold;
        color: #333;
        transition: all 0.3s ease;
    }

    .control-btn:hover {
        background: white;
        transform: scale(1.1);
    }

    .control-btn:active {
        transform: scale(0.95);
    }

    .cabin-tooltip {
        position: fixed;
        background: white;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        padding: 0;
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(10px) scale(0.9);
        width:20vw;
        max-width: 90vw;
        max-height: 95vh;
        overflow: hidden;
        border: 1px solid #e0e0e0;
    }

    .cabin-tooltip.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .tooltip-header {
        background: linear-gradient(125.75deg, rgb(44, 176, 234) 37.4%, rgb(7, 49, 99) 142.76%);
        color: white;
        padding: 16px 20px;
        font-weight: 600;
        font-size: 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .close-btn {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background-color 0.3s ease;
    }

    .close-btn:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .tooltip-content {
        padding: 20px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .cabin-image {
        width: 100%;
        height: 150px;
        object-fit: cover;
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .cabin-description {
        font-size: 14px;
        line-height: 1.5;
        color: #555;
        margin-bottom: 15px;
    }

    .pricing-section {
        border-top: 1px solid #eee;
        padding-top: 15px;
    }

    .pricing-title {
        font-weight: 600;
        margin-bottom: 10px;
        color: #333;
    }

    .pricing-option {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        margin-bottom: 6px;
        background: #f8f9fa;
        border-radius: 6px;
        border-left: 4px solid #667eea;
    }

    .pricing-option:last-child {
        margin-bottom: 0;
    }

    .pricing-guests {
        font-weight: 500;
        color: #333;
    }

    .pricing-details {
        text-align: right;
        font-size: 13px;
    }

    .price {
        font-weight: 400;
        color: #2e7d32;
    }

    .price.unavailable {
        color: #999;
    }

    .status-info {
        margin-top: 15px;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 6px;
        font-weight: 500;
    }

    .loading {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 400px;
        font-size: 18px;
        color: #666;
    }

    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #667eea;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-right: 15px;
    }

    .btn {
        background: #048f17;
        color: #fff;
        padding: 8px 10px;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        font-weight: 600;
    }
    .btn:hover {
        background: #025c0e;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /* Мобильная адаптация */
    
    @media (max-width: 1024px) {
        .cabin-tooltip {
            max-width: 95vw;
            max-height: 90vh;
            left: 2.5vw !important;
            top: 10vh !important;
            right: auto !important;
            bottom: auto !important;
            width: 50vw;
        }
    }
    @media (max-width: 1200px) {
        .cabin-tooltip {
            max-width: 95vw;
            max-height: 90vh;
            left: 2.5vw !important;
            top: 10vh !important;
            right: auto !important;
            bottom: auto !important;
            width: 40vw;
        }
    }
    @media (max-width: 768px) {
        body {
            padding: 10px;
        }

        .legend {
            padding: 15px;
        }

        .legend h2 {
            font-size: 20px;
        }

        .legend-items {
            gap: 15px;
        }

        .controls {
            top: 10px;
            right: 10px;
        }

        .control-btn {
            width: 45px;
            height: 45px;
            font-size: 18px;
        }

        .cabin-tooltip {
            max-width: 95vw;
            max-height: 90vh;
            left: 2.5vw !important;
            top: 10vh !important;
            right: auto !important;
            bottom: auto !important;
            width: 95vw;
        }

        .tooltip-content {
            padding: 15px;
            max-height: 65vh;
        }

        .cabin-image {
            height: 120px;
        }

        .tooltip-header {
            padding: 12px 15px;
            font-size: 14px;
        }
    }

    /* Стили для SVG элементов */
    .cabin-polygon {
        cursor: pointer;
        transition: all 0.2s ease;
        stroke: rgba(0, 0, 0, 0.2);
        stroke-width: 1;
    }

    .cabin-polygon:hover {
        stroke: #45a0dd;
        stroke-width: 2;
        filter: brightness(1.1);
    }

    .cabin-polygon.selected {
        stroke: #ff4444;
        stroke-width: 3;
        filter: brightness(1.2);
    }

    .cabin-available {
        fill: rgba(255, 255, 255, 0.2);
        background-color: rgba(255, 255, 255, 1);
    }

    .cabin-booked {
        fill: rgba(255, 193, 7, 0.7);
        background-color: rgba(255, 193, 7, 0.7);
    }

    .cabin-sold {
        fill: rgba(244, 67, 54, 0.7);
        background-color: rgba(244, 67, 54, 0.7);
    }

    .cabin-billed {
        fill: rgba(76, 175, 80, 0.7);
        background-color: rgba(76, 175, 80, 0.7);
    }

    /* Overlay для мобильных устройств */
    .tooltip-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .tooltip-overlay.visible {
        opacity: 1;
        visibility: visible;
    }

    @media (max-width: 768px) {
        .tooltip-overlay.visible {
            display: block;
        }
    }
-</style>