* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 3D圆环样式 */
.ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
    background: transparent;
    transform-style: preserve-3d;
    cursor: grab;
    transition: border-color 0.3s;
}

.ring:hover {
    border-color: #3b82f6;
}

.ring:active {
    cursor: grabbing;
}

.ring-small {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.ring-medium {
    width: 320px;
    height: 320px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.ring-large {
    width: 440px;
    height: 440px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.ring-content {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    border-radius: 50%;
}

.items-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* 圆环上的服饰项 */
.clothing-item {
    position: absolute;
    width: 60px;
    height: 60px;
    left: 50%;
    top: 50%;
    margin-left: -30px;
    margin-top: -30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    transform-origin: center;
    backface-visibility: hidden;
}

.clothing-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3b82f6;
    z-index: 100;
}

/* 针对圆环上特定位置的hover效果需要在JS中动态处理，这里移除通用transform避免冲突 */
.ring-small .clothing-item:hover,
.ring-medium .clothing-item:hover,
.ring-large .clothing-item:hover {
    filter: brightness(1.1);
}

.clothing-item.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.clothing-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 计算位置 - 上衣圆环（12点方向开始）- 衣服贴在圆环上随圆环旋转 */
.ring-small .clothing-item {
    transform: rotateY(var(--angle)) translateZ(100px);
}

/* 下装圆环 - 衣服贴在圆环上随圆环旋转 */
.ring-medium .clothing-item {
    transform: rotateY(var(--angle)) translateZ(160px);
}

/* 鞋子圆环 - 衣服贴在圆环上随圆环旋转 */
.ring-large .clothing-item {
    transform: rotateY(var(--angle)) translateZ(220px);
}

/* 圆环标签 */
.ring-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .ring-small {
        width: 160px;
        height: 160px;
    }
    
    .ring-medium {
        width: 260px;
        height: 260px;
    }
    
    .ring-large {
        width: 360px;
        height: 360px;
    }
    
    .ring-small .clothing-item {
        transform: rotateY(var(--angle)) translateZ(80px);
        width: 50px;
        height: 50px;
        margin-left: -25px;
        margin-top: -25px;
    }
    
    .ring-medium .clothing-item {
        transform: rotateY(var(--angle)) translateZ(130px);
        width: 50px;
        height: 50px;
        margin-left: -25px;
        margin-top: -25px;
    }
    
    .ring-large .clothing-item {
        transform: rotateY(var(--angle)) translateZ(180px);
        width: 50px;
        height: 50px;
        margin-left: -25px;
        margin-top: -25px;
    }
    
    .clothing-item {
        border-radius: 8px;
    }
}

/* 选中效果 */
.selected-indicator {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* 加载动画 */
.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* 模态框动画 */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}