:root {
  --primary-color: #4a90e2;
  --secondary-color: #f5f6fa;
  --success-color: #2ecc71;
  --text-color: #2c3e50;
  --border-color: #e1e8ed;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --background-color: #f8fafc;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.container {
  max-width: 900px !important;
  margin: 0 auto;
  padding: 2rem;
}

header {
  margin-bottom: 2rem;
  text-align: center;
}

h1 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.input-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 1rem;
}

button {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #357abd;
}

.result-area {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  min-height: 200px;
  background-color: white;
}

.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 8px 30px var(--shadow-color);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.card-title {
  color: var(--primary-color);
  font-weight: 600;
}

.form-control {
  border-radius: 10px;
  border: 2px solid var(--border-color);
  padding: 12px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.btn-primary {
  background-color: var(--primary-color);
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #357abd;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

#result {
  border-radius: 10px;
  background-color: var(--secondary-color);
  font-size: 1.1rem;
  line-height: 1.6;
}

.loading-spinner {
  margin: 2rem auto;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.6s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
}

/* 自定义 Toast 样式 */
.toastify {
  border-radius: 10px !important;
  font-weight: 500 !important;
}

/* 页脚样式 */
footer {
  font-size: 0.9rem;
  opacity: 0.8;
}

.template-btn {
    border-radius: 12px !important;
    transition: all 0.2s ease-in-out !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 120px !important;
}

.template-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-btn i {
    margin-bottom: 0.5rem;
}

#templateContainer .row {
    margin: 1rem -0.5rem;
}

#templateContainer .col-md-4 {
    padding: 0.5rem;
}

.btn-group-vertical {
    gap: 0.5rem;
}

.btn-group-vertical .btn {
    border-radius: 8px !important;
}

/* 导航样式 */
.sidebar {
    min-height: 100vh;
    border-right: 1px solid #eee;
}

.nav-link {
    color: #666;
    padding: 0.8rem 1rem;
    margin: 0.2rem 0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #333;
    background-color: #f8f9fa;
}

.nav-link.active {
    color: #fff;
    background-color: #0d6efd;
}

.nav-link i {
    margin-right: 0.5rem;
}

/* 内容区域样式 */
.result-area {
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    margin-top: 1rem;
}

/* 输入组样式 */
.input-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .nav-link {
        display: inline-block;
        margin: 0.2rem;
    }
}
