/* Circular System Styles */
.toonz-circular-system {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px;
    color: #fff;
    /*overflow: hidden;*/
}

/* Header Section */
.toonz-system-header {
    margin-bottom: 80px;
}

.toonz-system-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #000;
    /* Assuming white background based on screenshot */
}

.toonz-system-title span {
    color: #E87722;
}

.toonz-system-subtext {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Circular Visual Container */
.toonz-system-visual {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Circle Image Reveal & Rotation */
.toonz-system-circle-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
    /* Reveal Animation Mask */
    clip-path: inset(0 0 100% 0);
    /* Initial state */
    transition: clip-path 1.5s ease-out;
}

/* Custom Circle Image Reveal & Rotation */
.toonz-circular-system .toonz-system-visual .toonz-system-circle-img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    z-index: 99998 !important;
    pointer-events: none !important;
    opacity: 1 !important;
    display: block !important;
    border: 5px dashed #E87722 !important;
}

/* D3 3D Globe Styling */
.toonz-worldmap {
    margin: 0 auto;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toonz-worldmap svg {
    border-radius: 50%;
    max-width: 100%;
    height: auto;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1), inset 0 0 15px rgba(232, 119, 34, 0.1);
    /* Subtle outer shadow and brand-colored inner glow */
}

.land {
    fill: #E87722;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0));
    /* Makes continents pop */
}

.toonz-system-globe {
    position: absolute;
    width: 400px;
    height: 400px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.toonz-circular-system.is-animated .toonz-system-globe {
    opacity: 1;
}


/* Nodes Positioning - FIXED for center alignment */
.toonz-system-node {
    position: absolute;
    width: 160px;
    z-index: 5;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
}

.toonz-node-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: #000;
    margin-bottom: 5px;
    line-height: 1.2;
    white-space: pre-line;
}

.toonz-node-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    white-space: pre-line;
}

.toonz-node-desc p {
    margin: 0;
}

.toonz-node-icon-wrap {
    width: 70px;
    height: 70px;
    background: #faf7f2;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.toonz-node-icon-wrap img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.node-top {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%) translateY(30px);
}

.node-right {
    top: 50%;
    right: 0;
    transform: translate(50%, -50%) translateY(30px);
}

.node-bottom {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%) translateY(30px);
}

.node-left {
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%) translateY(30px);
}

/* Animation for the fixed circle div */
.toonz-circular-system.is-animated .toonz-system-circle-fixed {
    animation: rotate-once-stop 3s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

@keyframes rotate-once-stop {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(180deg);
    }
}

/* Entry Animation - AFTER CIRCLE STOPS (3s duration) */
.toonz-circular-system.is-animated .node-top {
    opacity: 1;
    transform: translate(-50%, -50%);
    transition-delay: 3s;
}

.toonz-circular-system.is-animated .node-right {
    opacity: 1;
    transform: translate(50%, -50%);
    transition-delay: 3.3s;
}

.toonz-circular-system.is-animated .node-bottom {
    opacity: 1;
    transform: translate(-50%, 50%);
    transition-delay: 3.6s;
}

.toonz-circular-system.is-animated .node-left {
    opacity: 1;
    transform: translate(-50%, -50%);
    transition-delay: 3.9s;
}

/* Hover Effects */
.toonz-system-node:hover .toonz-node-icon-wrap {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(232, 119, 34, 0.4);
    border-color: #E87722;
}

.toonz-system-node:hover .toonz-node-icon-wrap img {
    transform: scale(1.15);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .toonz-system-visual {
        max-width: 300px;
        aspect-ratio: auto;
        flex-direction: column;
        gap: 60px;
        margin-top: 40px;
    }

    .toonz-system-svg,
    .toonz-system-globe {
        display: none;
    }

    .toonz-system-node {
        position: static;
        width: 100%;
        transform: none !important;
        opacity: 1 !important;
    }

    .node-top,
    .node-right,
    .node-bottom,
    .node-left {
        transform: none !important;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
    }
}