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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;
}

h2 {
    color: #5a67d8;
    margin-bottom: 15px;
    border-bottom: 2px solid #5a67d8;
    padding-bottom: 5px;
}

input[type="file"] {
    margin-bottom: 10px;
    padding: 5px;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

label {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}

#voiceSelect {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.name-display {
    font-size: 3em;
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    border: 2px dashed #5a67d8;
    border-radius: 10px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    transition: all 0.3s;
}

/* 3D旋转动画 */
.roll-animation {
    animation: roll3d 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

@keyframes roll3d {
    0% {
        transform: rotateY(0deg) rotateX(0deg) scale(1);
        text-shadow: 0 0 10px rgba(90, 103, 216, 0.5);
    }
    25% {
        transform: rotateY(180deg) rotateX(90deg) scale(1.1);
        text-shadow: 0 0 20px rgba(90, 103, 216, 0.8);
    }
    50% {
        transform: rotateY(360deg) rotateX(180deg) scale(1.2);
        text-shadow: 0 0 30px rgba(90, 103, 216, 1);
    }
    75% {
        transform: rotateY(540deg) rotateX(90deg) scale(1.1);
        text-shadow: 0 0 20px rgba(90, 103, 216, 0.8);
    }
    100% {
        transform: rotateY(720deg) rotateX(0deg) scale(1);
        text-shadow: 0 0 10px rgba(90, 103, 216, 0.5);
    }
}

/* 增强的悬停效果 */
button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 3D球体容器 */
.sphere-container {
    width: 400px;
    height: 400px;
    margin: 20px auto;
    position: relative;
    perspective: 1200px;
    border: 2px solid rgba(90, 103, 216, 0.3);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(90, 103, 216, 0.1) 0%, transparent 70%);
    box-shadow:
        0 0 30px rgba(90, 103, 216, 0.2),
        inset 0 0 50px rgba(90, 103, 216, 0.1);
    overflow: hidden;
}

.sphere-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    transform: rotate(30deg);
    pointer-events: none;
}

.name-sphere {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

.name-item {
    position: absolute;
    background: linear-gradient(135deg, rgba(90, 103, 216, 0.8) 0%, rgba(116, 90, 216, 0.8) 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 80px;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.name-item:hover {
    background: linear-gradient(135deg, rgba(90, 103, 216, 1) 0%, rgba(116, 90, 216, 1) 100%);
    transform: scale(1.1) translateZ(20px);
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.name-item.selected {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9) 0%, rgba(255, 165, 0, 0.9) 100%);
    color: #333;
    transform: scale(1.3) translateZ(30px);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.9);
    z-index: 200;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
    100% {
        box-shadow: 0 0 50px rgba(255, 215, 0, 1);
    }
}

/* 选中的名字显示 */
.selected-name {
    font-size: 2.5em;
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    border: 3px dashed #5a67d8;
    border-radius: 15px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
    font-weight: bold;
    color: #495057;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 3D旋转动画类 */
.rotating {
    animation: continuousRotate 20s infinite linear;
}

@keyframes continuousRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

.fast-rotation {
    animation: fastRotate 0.5s ease-in-out;
}

@keyframes fastRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(720deg) rotateY(720deg) rotateZ(720deg);
    }
}

#nameList, #recordList {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
}

#nameList ul, #recordList ul {
    list-style-type: none;
    padding-left: 0;
}

#nameList li, #recordList li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

#nameList li:last-child, #recordList li:last-child {
    border-bottom: none;
}

.highlight {
    background-color: #ffd700;
    font-weight: bold;
    padding: 5px;
    border-radius: 3px;
}