* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: 
        linear-gradient(90deg, 
            #1a1a2e 0%, 
            #16213e 20%, 
            #0f3460 40%, 
            #1e3a5f 50%,
            #0f3460 60%,
            #16213e 80%, 
            #1a1a2e 100%
        );
    background-size: 200% 100%;
    min-height: 100vh;
    color: #333;
    padding-bottom: 30px;
    animation: bg-flow 20s linear infinite;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(102, 126, 234, 0.35) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 60%, rgba(118, 75, 162, 0.35) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 30%, rgba(102, 126, 234, 0.2) 0%, transparent 35%);
    animation: bg-glow 12s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes bg-flow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes bg-glow {
    0% {
        transform: translate(-5%, -5%) rotate(0deg);
    }
    100% {
        transform: translate(5%, 5%) rotate(5deg);
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* 顶部导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.user-avatar:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar #avatar-default {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar.can-upload::after {
    content: '📷';
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 18px;
    height: 18px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-upload-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: white;
}

.avatar-upload-container h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    overflow: hidden;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn, .avatar-save-btn, .avatar-cancel-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.3s ease;
}

.avatar-upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.avatar-save-btn {
    background: rgba(17, 153, 142, 0.8);
    color: white;
}

.avatar-cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.avatar-upload-btn:hover, .avatar-save-btn:hover, .avatar-cancel-btn:hover {
    transform: translateY(-2px);
}

.user-nickname-container {
    position: relative;
}

.user-nickname {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-nickname:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-nickname.can-edit:hover {
    background: rgba(255, 255, 255, 0.15);
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

.user-nickname-input {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 5px 10px;
    width: 150px;
    outline: none;
}

.user-nickname-input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.8);
            font-weight: 500;
            text-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }
        
        .user-id {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.6);
            font-weight: 400;
            text-shadow: 0 1px 3px rgba(0,0,0,0.2);
            margin-right: 15px;
            padding: 5px 10px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }

#logout-btn {
    padding: 8px 20px;
    background: rgba(255, 107, 107, 0.2);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#logout-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 107, 107, 0.3);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .user-name {
        font-size: 12px;
        margin-right: 0;
    }
    
    .user-id {
        font-size: 11px;
        padding: 3px 8px;
        margin-right: 0;
        border-radius: 10px;
    }
    
    #logout-btn {
        padding: 6px 16px;
        font-size: 12px;
        border-radius: 16px;
    }
    
    /* 确保容器有足够的空间 */
    .header {
        padding: 10px 15px;
    }
}

/* 小屏幕设备进一步调整 */
@media (max-width: 480px) {
    .user-info {
        gap: 6px;
    }
    
    .user-name {
        font-size: 11px;
    }
    
    .user-id {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 8px;
    }
    
    #logout-btn {
        padding: 5px 14px;
        font-size: 11px;
        border-radius: 14px;
    }
    
    .header {
        padding: 8px 12px;
    }
    
    /* 可能需要隐藏一些元素以节省空间 */
    .user-id {
        display: none !important;
    }
    
    /* 页面标题和用户ID的响应式调整 */
    .title-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }
    
    .page-title {
        font-size: 24px;
        flex: 1;
    }
    
    .user-id-display {
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 14px;
        flex-shrink: 0;
    }
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 20px;
}

/* 页面标题 */
.page-header {
    margin-bottom: 25px;
}

.page-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.title-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: space-between;
}

.page-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    flex: 1;
}

.user-id-display {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.page-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* 设备列表 */
.device-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 设备卡片 */
.device-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px 24px 24px 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    transform-style: preserve-3d;
    perspective: 1000px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.device-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* 设备头部 */
.device-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 0;
    flex-wrap: nowrap;
}

.device-header-left {
    flex: 1;
}

.device-name {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.device-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.device-status.online {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.3) 0%, rgba(56, 239, 125, 0.2) 100%);
    color: #38ef7d;
    box-shadow:
        0 4px 20px rgba(17, 153, 142, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 20px rgba(56, 239, 125, 0.15);
    border: 1px solid rgba(56, 239, 125, 0.3);
}

.device-status.offline {
    background: linear-gradient(135deg, rgba(235, 51, 73, 0.3) 0%, rgba(244, 92, 67, 0.2) 100%);
    color: #ff6b6b;
    box-shadow:
        0 4px 20px rgba(235, 51, 73, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 20px rgba(244, 92, 67, 0.15);
    border: 1px solid rgba(244, 92, 67, 0.3);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.device-status.online .status-dot {
    background: #38ef7d;
    box-shadow:
        0 0 10px #38ef7d,
        0 0 20px #38ef7d,
        0 0 30px rgba(56, 239, 125, 0.5);
    animation: pulse-glow 2s ease-in-out infinite;
    position: relative;
}

.device-status.online .status-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(56, 239, 125, 0.5);
    animation: ripple 2s ease-out infinite;
}

.device-status.online .status-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(56, 239, 125, 0.3);
    animation: ripple 2s ease-out infinite 0.5s;
}

.device-status.offline .status-dot {
    background: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.device-header-image {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 142px;
    height: 70px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-left: auto;
}

.device-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.device-header-image img:hover {
    transform: scale(1.1);
    box-shadow: 
        0 8px 30px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

/* 设备图片 */
.device-header-image img[src*="device_"] {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.device-header-image img[src*="device_"]:hover {
    transform: scale(1.1);
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.info-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px 12px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform-style: preserve-3d;
    perspective: 500px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.info-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-item:active {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.info-item.highlight {
    background: rgba(252, 182, 159, 0.2);
    border: 1px solid rgba(252, 182, 159, 0.25);
}

.info-item.status-online {
    background: linear-gradient(135deg, rgba(150, 230, 161, 0.25) 0%, rgba(212, 252, 121, 0.15) 100%);
    border: 1px solid rgba(150, 230, 161, 0.4);
    box-shadow:
        0 4px 15px rgba(150, 230, 161, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.info-item.status-offline {
    background: linear-gradient(135deg, rgba(252, 182, 159, 0.25) 0%, rgba(255, 200, 150, 0.15) 100%);
    border: 1px solid rgba(252, 182, 159, 0.4);
    box-shadow:
        0 4px 15px rgba(252, 182, 159, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.info-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-value {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 次要信息 */
.secondary-info {
    display: flex;
    gap: 12px;
    padding: 15px;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.secondary-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: transparent;
    border-radius: 0;
    text-align: left;
    border: none;
    backdrop-filter: none;
    flex: 1;
}

.secondary-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.secondary-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* 无设备提示 */
.no-device {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.9);
}

.no-device-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.8;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.no-device-text {
    font-size: 18px;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 图片放大模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0);
    transition: background-color 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-content-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 40px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.modal.show .modal-content-wrapper {
    transform: translateY(0);
}

.modal-device-name {
    position: relative;
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    padding: 14px 50px 14px 25px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    width: auto;
    min-width: 200px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalDeviceNameText {
    flex: 1;
}

.close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.95);
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    line-height: 1;
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) rotate(90deg);
}

.modal-content {
    display: block;
    max-width: 92%;
    max-height: 70vh;
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 设备图片模态框样式 */
.modal-content.device-image {
    max-width: 60vw;
    max-height: 90vh;
}

/* 雨滴效果 */
.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.raindrop {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border-radius: 0 0 2px 2px;
    animation: fall linear infinite;
    opacity: 0.6;
    z-index: 10;
}

@keyframes fall {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* 雨滴撞击卡片效果 */
.rain-splash {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 11;
    animation: splash 0.3s ease-out forwards;
}

@keyframes splash {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* 涟漪效果 */
.ripple-on-card {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 11;
    animation: ripple-on-card-anim 0.6s ease-out forwards;
}

@keyframes ripple-on-card-anim {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 40px;
        height: 40px;
        opacity: 0;
        margin-left: -20px;
        margin-top: -20px;
    }
}

/* 玻璃卡片上的水滴 */
.water-drop {
    position: absolute;
    background:
        radial-gradient(ellipse at 35% 25%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.5) 25%, transparent 45%),
        radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
    border-radius: var(--br-tl, 50%) var(--br-tr, 50%) var(--br-br, 50%) var(--br-bl, 50%) / var(--br-tl-y, 60%) var(--br-tr-y, 60%) var(--br-br-y, 40%) var(--br-bl-y, 40%);
    box-shadow:
        inset -1px -1px 3px rgba(0, 0, 0, 0.15),
        inset 1px 1px 3px rgba(255, 255, 255, 0.7),
        1px 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 12;
    animation: water-drop-slide var(--slide-duration, 1.5s) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.water-drop::before {
    content: '';
    position: absolute;
    top: var(--highlight-y, 12%);
    left: var(--highlight-x, 28%);
    width: var(--highlight-w, 30%);
    height: var(--highlight-h, 25%);
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.9) 0%, transparent 60%);
    border-radius: 50%;
    transform: rotate(var(--highlight-rotate, -30deg));
}

@keyframes water-drop-slide {
    0% {
        transform: translate(0, 0) scale(0.5, 0.3);
        opacity: 0;
    }
    10% {
        transform: translate(calc(var(--swing-x, 0px) * 0.1), 0) scale(1, 1.2);
        opacity: 0.85;
    }
    25% {
        transform: translate(calc(var(--swing-x, 0px) * 0.3), calc(var(--slide-distance, 100px) * 0.25)) scale(1, 1.15);
    }
    50% {
        transform: translate(calc(var(--swing-x, 0px) * 0.7), calc(var(--slide-distance, 100px) * 0.5)) scale(1, 1.1);
    }
    75% {
        transform: translate(calc(var(--swing-x, 0px) * 0.9), calc(var(--slide-distance, 100px) * 0.75)) scale(0.95, 1.1);
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate(var(--swing-x, 0px), var(--slide-distance, 100px)) scale(0.9, 1.1);
        opacity: 0;
    }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .navbar-content {
        padding: 12px 15px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .device-card {
        padding: 15px;
        border-radius: 16px;
    }
    
    .device-name {
        font-size: 18px;
    }
    
    .device-header-image img {
        width: 60px;
        height: 60px;
        border-radius: 12px;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .info-item {
        padding: 12px 10px;
    }
    
    .secondary-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .device-card {
        padding: 12px;
    }
    
    .info-grid {
        gap: 8px;
    }
    
    .info-item {
        padding: 10px 8px;
    }
    
    .info-label {
        font-size: 10px;
    }
    
    .info-value {
        font-size: 13px;
    }
    
    .secondary-info {
        gap: 6px;
    }
    
    .device-header-image img {
        width: 50px;
        height: 50px;
    }
}

/* 自定义确认对话框样式 */
.confirm-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 28px;
    padding: 45px 35px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    color: white;
    max-width: 420px;
    width: 90%;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 40px rgba(102, 126, 234, 0.1);
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.confirm-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    border-radius: 28px 28px 0 0;
}

.modal.show .confirm-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.confirm-icon {
    font-size: 70px;
    margin-bottom: 25px;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 20px rgba(255, 107, 107, 0.3));
    display: inline-block;
}

.confirm-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.confirm-message {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 35px;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.confirm-buttons {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: center;
}

.confirm-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 130px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.confirm-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.confirm-btn:hover::before {
    left: 100%;
}

.confirm-cancel {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 20px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
}

.confirm-ok {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    box-shadow:
        0 6px 20px rgba(255, 107, 107, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.confirm-ok:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 35px rgba(255, 107, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 30px rgba(255, 107, 107, 0.25);
}

.confirm-btn:active {
    transform: translateY(-1px);
    transition: all 0.1s ease;
}

@media screen and (max-width: 480px) {
    .confirm-container {
        padding: 35px 25px;
        width: 95%;
        border-radius: 24px;
    }

    .confirm-container::before {
        border-radius: 24px 24px 0 0;
    }

    .confirm-icon {
        font-size: 60px;
        margin-bottom: 20px;
    }

    .confirm-title {
        font-size: 20px;
    }

    .confirm-message {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .confirm-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .confirm-btn {
        width: 100%;
        min-width: auto;
        padding: 14px 20px;
    }
}