/* Shared Card Styles */
.card,
.feature-card,
.form-card,
.submission-card,
.login-card,
.error-card,
.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

/* Shared Grid Styles */
.grid,
.features-grid,
.forms-grid {
  display: grid;
  gap: 16px;
}

.features-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.forms-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
}

.modal form {
  padding: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

/* Utility Flex and Margin Classes */
.flex {
  display: flex;
}

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

.flex-row {
  flex-direction: row;
}

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

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 16px;
  /* Reduced from 24 */
}

.mb-4 {
  margin-bottom: 12px;
  /* Reduced from 16 */
}

.mb-6 {
  margin-bottom: 20px;
  /* Reduced from 24 */
}

.mt-4 {
  margin-top: 12px;
  /* Reduced from 16 */
}

.mt-6 {
  margin-top: 20px;
  /* Reduced from 24 */
}

.p-4 {
  padding: 12px;
  /* Reduced from 16 */
}

.p-6 {
  padding: 20px;
  /* Reduced from 24 */
}

.rounded {
  border-radius: 6px;
}

/* GitHub-inspired Dark Theme */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border-color: #30363d;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #238636;
  --accent-hover: #2ea043;
  --success: #3fb950;
  --danger: #f85149;
  --warning: #d29922;
}

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

body {
  font-family: 'JetBrains Mono', 'Fira Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  /* Reduced from 1.6 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  /* Explicit base font size */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  /* Reduced from 20 */
  width: 100%;
}

/* Header */
.header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  /* Reduced from 16 */
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  /* Reduced from 18 */
}

.logo:hover {
  color: var(--accent);
}

.logo .ti {
  font-size: 20px;
  /* Reduced from 24 */
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  /* Reduced from 20 */
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 13px;
}

.nav-link:hover {
  color: var(--text-primary);
}

.avatar {
  width: 28px;
  /* Reduced from 32 */
  height: 28px;
  /* Reduced from 32 */
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 24px 0;
  /* Reduced from 40 */
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 50px 0;
  /* Reduced from 80 */
}

.hero-title {
  font-size: 36px;
  /* Reduced from 48 */
  font-weight: 600;
  margin-bottom: 12px;
  /* Reduced from 16 */
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 16px;
  /* Reduced from 20 */
  color: var(--text-secondary);
  margin-bottom: 24px;
  /* Reduced from 32 */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  /* Reduced from 10px 20px */
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s;
  font-size: 13px;
  /* Reduced from 14 */
}

.btn:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent);
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

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

.btn-large {
  padding: 10px 20px;
  /* Reduced from 12 24 */
  font-size: 14px;
  /* Reduced from 16 */
}

.btn-small {
  padding: 4px 8px;
  /* Reduced from 6 12 */
  font-size: 11px;
  /* Reduced from 12 */
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-icon .ti {
  font-size: 16px;
}

.btn-icon:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-danger:hover {
  color: var(--danger);
}

/* Tabler Icons */
.ti {
  display: inline-block;
  vertical-align: middle;
}

.btn .ti {
  margin-right: 6px;
  /* Reduced from 8 */
}

.btn .ti:only-child {
  margin-right: 0;
}

/* Features Section */
.features {
  padding: 50px 0;
  /* Reduced from 80 */
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  /* Reduced from 24 */
  margin-top: 32px;
  /* Reduced from 40 */
}

.feature-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 20px;
  /* Reduced from 24 */
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
}

.feature-icon {
  font-size: 24px;
  /* Reduced from 32 */
  margin-bottom: 12px;
  /* Reduced from 16 */
  color: var(--accent);
}

.feature-icon .ti {
  font-size: 24px;
  /* Reduced from 32 */
}

.feature-card h3 {
  margin-bottom: 6px;
  /* Reduced from 8 */
  color: var(--text-primary);
  font-size: 16px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Login Section */
.login-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  /* Reduced from 60 */
}

.login-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 24px;
  /* Reduced from 40 */
  max-width: 360px;
  /* Reduced from 400 */
  width: 100%;
  text-align: center;
}

.login-card h1 {
  margin-bottom: 6px;
  /* Reduced from 8 */
  font-size: 24px;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  /* Reduced from 24 */
}

.login-card .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Error Section */
.error-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.error-card {
  text-align: center;
  max-width: 400px;
}

.error-card h1 {
  font-size: 36px;
  /* Reduced from 48 */
  margin-bottom: 12px;
  color: var(--danger);
}

.error-card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 16px;
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 16px 0;
  /* Reduced from 24 */
  margin-top: auto;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Form Elements */
.form-group {
  margin-bottom: 16px;
  /* Reduced from 20 */
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  /* Reduced from 8 */
  color: var(--text-primary);
  font-weight: 500;
  font-size: 13px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 6px 10px;
  /* Reduced from 8 12 */
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  /* Reduced from 14 */
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

textarea {
  resize: vertical;
  min-height: 80px;
  /* Reduced from 100 */
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

input[type="checkbox"] {
  cursor: pointer;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  /* Reduced from 60 20 */
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 28px;
    /* Reduced from 32 */
  }

  .hero-subtitle {
    font-size: 16px;
    /* Reduced from 18 */
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 20px;
  }
}