/*
Theme Name: 崇明问问
Theme URI: https://ask.chongming.org
Author: 崇明问问
Description: 崇明本地问答社区主题
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chongming-ask
Tags: q-and-a, community,问答
*/

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #22c55e;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-hover);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-color);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 13px;
}

.card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
}

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.badge-gray {
  background: #f1f5f9;
  color: #475569;
}

.text-muted {
  color: var(--text-secondary);
}

.text-sm {
  font-size: 14px;
}

.text-xs {
  font-size: 12px;
}

.hidden {
  display: none !important;
}

#loginform-custom input[type="text"],
#loginform-custom input[type="password"],
#loginform-custom input[type="email"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 15px;
  outline: none;
  transition: border-color 0.2s;
}

#loginform-custom input:focus {
  border-color: var(--primary-color);
}

#loginform-custom label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

#loginform-custom .forgetmenot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

#loginform-custom .forgetmenot label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  font-weight: 400;
}

#loginform-custom .forgetmenot input[type="checkbox"] {
  width: auto;
  margin: 0;
}

#loginform-custom input[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

#loginform-custom input[type="submit"]:hover {
  background: var(--primary-hover);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.main-layout {
  padding-top: 30px;
  padding-bottom: 50px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

.header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 24px;
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .main-layout {
    padding-top: 20px;
    padding-bottom: 30px;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  header .container {
    height: auto;
    padding: 15px 0;
    flex-direction: column;
    gap: 15px;
  }
  
  header form {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  
  header > div > div:last-child {
    width: 100%;
    justify-content: space-between;
  }
  
  .btn {
    flex: 1;
    justify-content: center;
  }
  
  .question-item {
    grid-template-columns: 1fr;
    padding: 15px;
  }
  
  .question-item > div:last-child {
    display: none;
  }
  
  .sidebar {
    order: 2;
  }
}

@media (max-width: 480px) {
  header > div > div:last-child {
    flex-direction: column;
    gap: 10px;
  }
  
  .card {
    padding: 15px;
  }
  
  h1 {
    font-size: 20px;
  }
  
  .btn-sm {
    padding: 8px 12px;
  }
}
