/* 公共样式文件 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* 状态栏样式 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    background-color: #000;
    height: 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.status-bar .time {
    font-weight: bold;
    font-size: 16px;
}

.status-bar .icons {
    display: flex;
    align-items: center;
}

.status-bar .icons i {
    margin-left: 8px;
}

/* 底部导航栏 */
.tab-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #1a1a1a;
    height: 70px;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid #333;
    z-index: 10;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #aaa;
    text-decoration: none;
    font-size: 10px;
}

.tab-item.active {
    color: #fff;
}

.tab-item i {
    font-size: 24px;
    margin-bottom: 5px;
}

/* 页面内容 */
.page-content {
    padding: 15px;
    padding-top: 60px; /* 为状态栏留出空间 */
    padding-bottom: 85px; /* 为底部导航栏留出空间 */
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 返回按钮 */
.back-button {
    font-size: 24px;
    color: #fff;
    margin-right: 20px;
    text-decoration: none;
}

/* 标题栏 */
.header {
    display: flex;
    align-items: center;
    padding: 10px 0;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* 卡片样式 */
.card {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

/* 按钮样式 */
.button {
    background-color: #007aff;
    color: #fff;
    border-radius: 25px;
    padding: 15px 20px;
    text-align: center;
    font-weight: bold;
    margin-top: 20px;
    width: calc(100% - 0px); /* 确保不会超出父容器 */
    display: block;
    border: none;
    cursor: pointer;
}

.button-secondary {
    background-color: #333;
}

/* 输入框样式 */
.input-field {
    background-color: #333;
    border-radius: 8px;
    padding: 15px;
    color: #fff;
    border: none;
    width: 100%;
    margin-bottom: 15px;
    font-size: 16px;
}

/* 设备列表项样式 */
.device-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #333;
}

.device-icon {
    width: 50px;
    height: 50px;
    background-color: #333;
    border-radius: 25px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.device-info {
    flex-grow: 1;
}

.device-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.device-mac {
    color: #999;
    font-size: 12px;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.text-center {
    text-align: center;
}

/* iOS风格列表 */
.ios-list {
    border-radius: 12px;
    background-color: #1a1a1a;
    overflow: hidden;
    margin: 20px 0;
}

.ios-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #333;
}

.ios-list-item:last-child {
    border-bottom: none;
}

.ios-list-arrow {
    margin-left: auto;
    color: #666;
}

/* 图标按钮 */
.icon-button {
    width: 36px;
    height: 36px;
    background-color: #333;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

/* 水平设备列表 */
.horizontal-device-list {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    margin: 0 -15px;
    padding: 0 15px;
}

.horizontal-device-card {
    min-width: 140px;
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    margin-right: 15px;
}

.placeholder-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    margin: 40px 0;
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    background-color: #333;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 20px;
    color: #666;
}

.placeholder-text {
    color: #666;
    text-align: center;
}

/* Toast 提示样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.toast-success {
    border-left: 4px solid #4cd964;
}

.toast-error {
    border-left: 4px solid #ff3b30;
}

.toast-icon {
    margin-right: 10px;
    font-size: 20px;
} 