/* 智维云APP - 智能设备健康管理平台样式 */

/* 全局样式 */
body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* 页面容器样式 */
.page-container {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-title {
  text-align: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* iPhone15外观模拟 - 现代化升级 */
.iphone-frame {
  position: relative;
  width: 390px;
  height: 844px;
  margin: 40px auto;
  border-radius: 48px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.1);
  background: #000;
  border: 2px solid #1a1a1a;
  overflow: hidden;
  transition: all 0.3s ease;
}

.iphone-frame:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 56px rgba(0,0,0,0.2), 0 6px 20px rgba(0,0,0,0.15);
}

.iphone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 210px;
  height: 32px;
  background: #000;
  border-radius: 0 0 24px 24px;
  z-index: 10;
}

.iphone-homebar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  z-index: 10;
}

.iframe-content {
  width: 100%;
  height: 100%;
  border: none;
  background: #f8fafc;
  padding-top: 32px;
  padding-bottom: 0;
  box-sizing: border-box;
}

/* 迷你iPhone框架样式 */
.mini-iphone-frame {
  position: relative;
  width: 280px;
  height: 560px;
  margin: 0 auto;
  border-radius: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
  background: #000;
  border: 1px solid #1a1a1a;
  overflow: hidden;
  transition: all 0.3s ease;
}

.mini-iphone-frame:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
}

.mini-iphone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 20px;
  background: #000;
  border-radius: 0 0 16px 16px;
  z-index: 10;
}

.mini-iphone-homebar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  z-index: 10;
}

.mini-iframe-content {
  width: 100%;
  height: 100%;
  border: none;
  background: #f8fafc;
  padding-top: 20px;
  padding-bottom: 0;
  box-sizing: border-box;
}

/* 智维云APP专用样式 */
.phm-header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 1rem;
  border-radius: 0 0 20px 20px;
  margin-bottom: 1rem;
}

.phm-status-card {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-left: 4px solid #007AFF;
}

.phm-alert-card {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

.phm-chart-container {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.phm-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.phm-metric-item {
  background: white;
  border-radius: 12px;
  padding: 0.75rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.phm-metric-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #007AFF;
  margin-bottom: 0.25rem;
}

.phm-metric-label {
  font-size: 0.875rem;
  color: #666;
}

/* 底部导航栏样式 */
.iphone-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-top: 0.5px solid rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

.iphone-tabbar .tab-item {
  flex: 1;
  text-align: center;
  color: #8E8E93;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.iphone-tabbar .tab-item.active {
  color: #007AFF;
}

.iphone-tabbar .tab-item i {
  font-size: 22px;
  display: block;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.iphone-tabbar .tab-item:active i {
  transform: scale(0.9);
}

/* 智维云APP专用图标和颜色 */
.phm-icon-primary {
  color: #007AFF;
}

.phm-icon-success {
  color: #34C759;
}

.phm-icon-warning {
  color: #FF9500;
}

.phm-icon-danger {
  color: #FF3B30;
}

.phm-icon-info {
  color: #5AC8FA;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .mini-iphone-frame {
    width: 240px;
    height: 480px;
  }
  
  .mini-iphone-notch {
    width: 120px;
    height: 18px;
  }
  
  .mini-iphone-homebar {
    width: 80px;
    height: 3px;
  }
}

/* 全局动画和过渡效果 */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 脉冲动画 */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Toast 提示动画 */
@keyframes toastFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.toast-enter {
  animation: toastFadeIn 0.2s ease-out;
}

.toast-exit {
  animation: toastFadeOut 0.2s ease-in;
}

/* 自定义确认对话框样式 */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease-out;
}

.confirm-dialog {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin: 20px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

.confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
  text-align: center;
}

.confirm-message {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.5;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
}

.confirm-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.confirm-btn-cancel {
  background: #f3f4f6;
  color: #6b7280;
}

.confirm-btn-cancel:hover {
  background: #e5e7eb;
}

.confirm-btn-confirm {
  background: #ef4444;
  color: white;
}

.confirm-btn-confirm:hover {
  background: #dc2626;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
