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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #2c3e50);
    padding: 20px;
    min-height: 100vh;
    color: #e0e0e0;
    max-width: 1000px;   /* 你想限制的最大值 */
    margin: 0 auto;      /* 水平居中 */
    box-sizing: border-box; 
    
}

.card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

.card-header {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dropdown-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.dropdown-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dropdown-item label {
    font-size: 14px;
    color: #bbb;
    font-weight: 500;
}

.dropdown-item select {
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    cursor: pointer;
    min-width: 150px;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.dropdown-item select:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.dropdown-item select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2);
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.card-body {
    padding: 20px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-left {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ea4335, #d23f31);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d23f31, #ea4335);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #34a853, #2d8f47);
}

.btn-success:hover {
    background: linear-gradient(135deg, #2d8f47, #34a853);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 600;
    color: #fff;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

.checkbox-cell {
    width: 40px;
    text-align: center;
}

.fixed-width {
    min-width: 80px;
}

.no-data {
    text-align: center;
    color: #aaa;
    padding: 40px;
    font-style: italic;
}

.pagination-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-size-selector select {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.page-size-selector select:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.page-size-selector select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2);
}

.page-size-selector input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    transition: all 0.3s ease;
    font-size: 14px;
}

.page-size-selector input:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.page-size-selector input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2);
}

/* 特定用于搜索框的样式 */
#searchInput {
    padding: 8px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
}

#searchInput:hover {
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1) !important;
}

#searchInput:focus {
    outline: none !important;
    border-color: #4285f4 !important;
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2) !important;
}

.pagination-info {
    color: #bbb;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-controls button {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: #e0e0e0;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination-controls button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-input {
    width: 50px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.page-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.refresh-btn {
    margin-left: 10px;
}

.error-message {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 8px;
    display: none;
    background: rgba(255, 107, 107, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
}

/* 模态对话框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: 10% auto;
    padding: 25px;
    border-radius: 16px;
    width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #fff;
}

.modal-body {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #bbb;
    font-weight: 500;
}

/* 当label在page-size-selector内部时，不独占一行 */
.page-size-selector label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    margin-right: 10px !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    color: #bbb !important;
    font-weight: 500 !important;
}

/* 更具体的选择器来处理form-group内的page-size-selector */
.form-group .page-size-selector label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    margin-right: 10px !important;
    white-space: nowrap !important;
}

/* 针对newdevice.php的特殊处理 */
.form-group > .page-size-selector > label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    margin-right: 10px !important;
    white-space: nowrap !important;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2);
}

/* 自定义下拉选项样式 */
select option {
    background: rgba(30, 30, 40, 0.95);
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
    transition: background 0.2s ease;
}

select option:hover,
select option:focus,
select option:active,
select option:checked {
    background: rgba(66, 133, 244, 0.3) !important;
    color: #fff;
}

select optgroup {
    background: rgba(20, 20, 30, 0.95);
    color: #aaa;
    font-weight: 600;
}

/* 自定义滚动条样式 */
select::-webkit-scrollbar {
    width: 8px;
}

select::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

select::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

select::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 加载提示框样式 */
.loading-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.loading-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

/* 自定义消息框样式 */
.custom-alert {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.custom-alert-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px;
    border-radius: 16px;
    width: 380px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.custom-alert-message {
    margin: 20px 0;
    font-size: 16px;
    color: #fff;
    line-height: 1.5;
}

.custom-alert-button {
    padding: 10px 25px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.custom-alert-button:hover {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* 自定义确认对话框样式 */
.custom-confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-confirm-ok {
    padding: 10px 25px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-confirm-ok:hover {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-confirm-cancel {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: auto;    /* 允许垂直滚动 */
    overflow-x: hidden;  /* 隐藏水平滚动 */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #2c3e50);
    padding: 20px;
    min-height: 100vh;
    color: #e0e0e0;
    max-width: 1100px;   /* 你想限制的最大值 */
    margin: 0 auto;      /* 水平居中 */
    box-sizing: border-box;
    overflow-y: auto;    /* 允许垂直滚动 */
    overflow-x: hidden;  /* 隐藏水平滚动 */
}

.header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.logo span {
    color: #4285f4;
}

/* 右上角弹出式菜单样式 */
.nav-menu-container {
    position: relative;
}

.menu-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.menu-button:hover {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.menu-button::after {
    content: "▼";
    font-size: 10px;
    transition: transform 0.3s ease;
}

.menu-button.active::after {
    transform: rotate(180deg);
}

.nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.nav-menu.show {
    max-height: 400px;
    opacity: 1;
}

.nav-menu ul {
    list-style: none;
    padding: 8px 0;
}

.nav-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu li:last-child {
    border-bottom: none;
}

.nav-menu a {
    display: block;
    padding: 12px 20px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-menu a.active {
    background: rgba(66, 133, 244, 0.3);
    color: #fff;
    border-left: 4px solid #4285f4;
}

.nav-menu .menu-icon {
    margin-right: 10px;
    width: 20px;
    display: inline-block;
    text-align: center;
    font-size: 16px;
    line-height: 1;
}

/* 主要内容区域 */
.main-container {
    height: calc(100vh - 120px);
    padding: 2px;
}

.iframe-container {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #4285f4;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}


/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .menu-button {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .nav-menu {
        min-width: 180px;
    }
}
