body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f2f2f7;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.name-display {
    background-color: white;
    border-radius: 20px;
    padding: 30px;
    width: 350px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#currentName {
    font-size: 80px;
    font-weight: bold;
    color: #007AFF;
}

.main-button {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

#pickButton {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.button-icon {
    width: 80px;
    height: 80px;
    background-color: #007AFF;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.button-icon svg {
    width: 40px;
    height: 40px;
    color: white;
    fill: currentColor;
}

.button-text {
    font-size: 14px;
    color: #000;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.control-buttons .button-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

#modeButton .button-icon {
    background-color: #FF9500;
}

#selectButton .button-icon {
    background-color: #34C759;
}

/* 面板通用样式 */
.panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 500px;
    z-index: 100;
}

.panel h3 {
    margin-top: 0;
    color: #007AFF;
    text-align: center;
}

/* 选择名单面板 */
#selectPanel {
    text-align: center;
}

.group-selector {
    margin: 20px 0;
}

.group-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.panel-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.left-button {
    background-color: rgba(52, 199, 89, 0.1);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.left-button:hover {
    background-color: rgba(52, 199, 89, 0.2);
}

.right-buttons {
    display: flex;
    gap: 10px;
}

.right-buttons button {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
}

#confirmSelect {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

#confirmSelect:hover {
    background-color: rgba(0, 122, 255, 0.2);
}

#closeSelectPanel, #closeImportPanel {
    background-color: rgba(142, 142, 147, 0.1);
    color: #333;
    border: 1px solid rgba(142, 142, 147, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

#closeSelectPanel:hover, #closeImportPanel:hover {
    background-color: rgba(142, 142, 147, 0.2);
}

/* 导入新名单面板 */
#importPanel {
    text-align: left;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input {
    width: calc(100% - 20px); /* 减去padding和边距 */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-right: 0;
}

#newNameList {
    width: calc(100% - 20px); /* 减去padding宽度 */
    height: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    margin-bottom: 15px;
    font-family: inherit;
}

#saveImport {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

#saveImport:hover {
    background-color: rgba(0, 122, 255, 0.2);
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
    margin-top: auto;
    width: 100%;
    position: relative;
    bottom: 0;
}

.footer p {
    margin: 5px 0;
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
}
