/* App Layout */
.app {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #f8fafc;
  font-family: 'Inter', system-ui, sans-serif;
  position: relative;
}

/* 背景样式 */
.app-background-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.app-background-gradient-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.app-background-gradient-purple {
  background: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
}

.app-background-gradient-pink {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

.app-background-gradient-ocean {
  background: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);
}

.app-background-gradient-sunset {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.app-background-gradient-forest {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.app-background-solid {
  background: #f8fafc;
}

.app-background-dark {
  background: #1e293b;
}

.app-background-none {
  background: #ffffff;
}

/* 背景图片样式 */
.app-background-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.app-background-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(0.5px);
  z-index: 1;
}

.app-background-image > * {
  position: relative;
  z-index: 2;
}

.sidebar-container {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  width: 300px;
}

.sidebar-container.collapsed {
  width: 60px;
}

.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background: #f8fafc;
}

/* Button Styles */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  outline: none;
  border: none;
  background: none;
  transition: all 0.2s ease;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Input Styles */
input, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
  resize: none;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .app {
    flex-direction: column;
  }
  
  .sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar-container.open {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    display: block;
  }
  
  .main-container {
    width: 100%;
    height: 100vh;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

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

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-center {
  justify-content: center;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.p-1 {
  padding: 0.25rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.m-1 {
  margin: 0.25rem;
}

.m-2 {
  margin: 0.5rem;
}

.m-3 {
  margin: 0.75rem;
}

.m-4 {
  margin: 1rem;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.rounded {
  border-radius: 0.5rem;
}

.rounded-lg {
  border-radius: 0.75rem;
}

.rounded-xl {
  border-radius: 1rem;
}

.shadow {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
