* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}
.container {
    /*width: 100vw;*/
    height: 100vh;
    background-color: #fff;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    position: relative;
    display: flex;
    margin: 0 auto;

    flex-direction: column;
}
#connectBtn {
	border-radius: 10px;
	margin: 5px;
	padding: 10px;
	text-align: center;
    box-shadow: 0px 0px 2px 0px var(--grey-tint); 
    font-size: 14px;
}
#connectBtn:hover {
    cursor: pointer;
}
#textpicker-wrap {
	display: inline-block;
}
.stateHeader {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


#state {
    display: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 20px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stateOn {
    color: #2ecc71;
    border-left: 3px solid #2ecc71;
    padding-left: 5px;
}

.stateOff {
    color: #e74c3c;
    border-left: 3px solid #e74c3c;
    padding-left: 5px;
}

.fileDiv {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.header {
    padding-top: 10px;
    display: block;
    width: 100%;
}

.authSection {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    padding: 8px 10px;
}

.authSection input {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 200px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.authSection input:focus {
    border-color: #4a6fa5;
    box-shadow: 0 1px 5px rgba(74, 111, 165, 0.2);
}

#connectBtn {
    border-radius: 8px;
    margin: 0 0 0 10px;
    padding: 8px 16px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    background-color: #4a6fa5;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#connectBtn:hover {
    background-color: #5a7fb5;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#connectBtn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.authSection button {
    padding: 5px 10px;
    background-color: #fff;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 14px;
}

.authSection button:hover {
    background-color: #f0f0f0;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#contentTitle {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

#info {
    margin: 10px 0 20px;
    font-size: 16px;
    line-height: 1.5;
    padding: 10px;
    text-align: center;
    color: #555;
    max-width: 600px;
}

@media (min-width: 768px) {
    #contentTitle {
        font-size: 28px;
    }
    
    #info {
        font-size: 18px;
    }
}
.connected .content {
    justify-content: flex-start; /* 连接后内容从顶部开始排列 */
}

/* 响应式调整 */
@media only screen and (max-width: 600px) {
    .content {
        min-height: 40vh;
    }
    
    .content h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    #info {
        font-size: 15px;
        margin: 10px 0 20px 0;
    }
}

@media only screen and (min-height: 700px) {
    .content {
        min-height: 60vh;
    }
}
.prompt {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.content h1 {
    font-size: 24px;
    font-weight: normal;
    color: #333;
}

#dial {
    padding: 10px 30px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px 0 0 50px;
    color: black;
}
#top {
	display: none;
}

#start-btn:hover {
    background-color: #f0f0f0;
}

.open-btn {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: black;
    color: white;
    border: none;
    border-radius: 4px;
    margin: 20px;
}


.modal-overlay {
    display: none; /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* 新增以下属性实现
    /* 新增以下属性实现居中 */
    display: none; /* 保持默认隐藏 */
    justify-content: center;
    align-items: center;
    /* 解决子元素可能出现的溢出问题 */
    overflow: auto;
}

/* 弹窗容器 */
.modal {
    width: 400px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* 新增：确保弹窗在小屏幕上不会超出可视区域 */
    max-width: 90%;
    margin: 100px auto;
}

/* 弹窗内容 */
.modal-content {
    padding: 30px 20px;
    text-align: center;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

/* 按钮区域 */
.modal-footer {
    padding: 15px;
    text-align: center;
}

/* 关闭按钮 */
.close-btn {
    background: none;
    border: none;
    color: black;
    font-size: 16px;
    cursor: pointer;
    padding: 5px 15px;
}

/* 弹窗标题 */
.modal-title {
    text-align: center;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
}

/* 文本输入区域 */
.text-modal-content {
    padding: 20px;
}

.text-input {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    line-height: 1.6;
}

.text-input:focus {
    outline: none;
    border-color: black;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 按钮区域 */
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

.modal-btn {
    padding: 10px 24px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn {
    background-color: #f44336;
    color: white;
}

.cancel-btn:hover {
    background-color: #d32f2f;
}

.send-btn {
    background-color: black;
    color: white;
}

.copy-item {
    padding: 12px 15px;
    margin: 8px 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.copy-item:hover {
    background-color: #f5f9ff;
    border-color: #c9e0ff;
}

/* 提示框样式 - 类似a标签的alt效果 */
.tooltip {
    position: absolute;
    bottom: 5px;
    right: -30px;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s;
    pointer-events: none; /* 确保提示框不干扰鼠标事件 */
    margin-bottom: 5px;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 50%; /* 垂直居中 */
    left: 0; /* 定位到左侧 */
    transform: translateY(-50%); /* 垂直居中对齐 */
    margin-left: -10px; /* 向左移出提示框 */
    border-width: 5px;
    border-style: solid;
    border-color: transparent #333 transparent transparent; /* 右侧边框为深色，形成向左箭头 */
}

/* 鼠标悬停时显示提示 */
.copy-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* 复制成功提示 */
.copy-feedback {
    position: absolute;
    right: 10px;
    bottom: 10px;
    color: #27ae60;
    font-size: 12px;
    transition: opacity 0.3s;
    opacity: 0;
}

/* 复制成功提示 */
.link-feedback {
    margin: 10px;
    color: #27ae60;
    font-size: 13px;
}

/* 复制图标 - 主要用于移动端提示 */
.copy-icon {
    width: 18px;
    height: 18px;
    color: #666;
    flex-shrink: 0;
}
/* 移动端横向溢出修复与布局优化 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

img, video, canvas {
    max-width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    /* 覆盖 style.css 中的 min-width: 450px，避免小屏超宽 */
    #main {
        min-width: 0;
        width: 100%;
    }
    .container {
        max-width: 100%;
        border-left: 0;
        border-right: 0;
    }
    /* 让页面内容靠上显示，避免过于居中偏下 */
    body {
        justify-content: flex-start;
    }
}
@media (max-width: 576px) {
    .authSection {
        padding: 5px;
    }
    
    .authSection input {
        font-size: 15px;
        padding: 8px 10px;
        width: 180px;
    }
    
    #connectBtn {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    #state {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .button {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    #dial {
        font-size: 15px;
        padding: 10px 20px;
    }
}

@media (min-width: 992px) {
    .authSection input {
        width: 180px;
        font-size: 16px;
    }
    
    #connectBtn {
        font-size: 16px;
    }
    
    .button, #dial {
        border-radius: 12px;
    }
}