/* AMBOSS-inspired Design System */

:root {
  /* AMBOSS Colors - based on #054f57 */
  --amboss-teal: #054f57;
  --amboss-teal-light: #0a7a85;
  --amboss-teal-dark: #033a40;
  --amboss-bg: #f0f4f5;
  --amboss-card-bg: #FFFFFF;
  --amboss-text-primary: #1a2e31;
  --amboss-text-secondary: #3d5a5f;
  --amboss-border: #d4e0e2;
  --amboss-accent: #0ea5b5;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
  font-family: Lato, -apple-system, BlinkMacSystemFont, "segoe ui", "avenir next", avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, arial, sans-serif;
  background-color: var(--amboss-bg);
  color: var(--amboss-text-primary);
  line-height: 1.6;
}

/* Navbar */
.navbar {
  background-color: var(--amboss-teal);
  padding: var(--spacing-sm) var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
}

.logo-icon {
  width: 39px;
  height: 39px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-direction: row-reverse;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
}

.nav-links a:hover {
  background-color: rgba(255,255,255,0.1);
}

.btn-mitmachen {
  background-color: white !important;
  color: var(--amboss-teal) !important;
  padding: 0.35rem 1rem !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-mitmachen:hover {
  background-color: var(--amboss-bg) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.nav-home {
  display: flex !important;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: white;
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm) !important;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
  white-space: nowrap;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background-color: white;
  color: var(--amboss-teal) !important;
  padding: var(--spacing-xs) var(--spacing-md) !important;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary:hover {
  background-color: var(--amboss-bg) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-logout {
  display: none;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
  color: white;
  font-family: inherit;
}

.user-menu-toggle:hover {
  background-color: rgba(255,255,255,0.1);
}

.user-avatar {
  width: 30px;
  height: 30px;
  background-color: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.user-pseudonym {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  background: var(--amboss-card-bg);
  border: 1px solid var(--amboss-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.15s ease;
  overflow: hidden;
  z-index: 200;
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--amboss-text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s;
}

.user-dropdown a:hover {
  background-color: var(--amboss-bg);
}

/* User info header inside dropdown */
.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--amboss-teal);
  color: white;
}

.user-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.user-dropdown-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.user-dropdown-pseudo {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.3;
}

.user-dropdown-level {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.95;
  line-height: 1.3;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--amboss-border);
}

.dropdown-logout {
  color: #dc2626 !important;
  border-top: 1px solid var(--amboss-border);
}

/* Avatar badge (notification count on user avatar) */
.user-menu-toggle {
  position: relative;
}

.user-avatar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  border: 2px solid var(--amboss-teal);
  z-index: 1;
}

/* Notification summary in user dropdown */
.user-dropdown-notif {
  padding: 0.6rem 1rem;
  background: #f0fdfa;
  border-bottom: 1px solid var(--amboss-border);
  color: var(--amboss-teal);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.user-dropdown-notif-icon {
  flex-shrink: 0;
}

/* Landing Page Layout */
.landing-layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

/* Hamburger Button */
.menu-toggle {
  position: static;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 6px;
  margin-right: 0.25rem;
  box-shadow: none;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: white;
  transition: all 0.3s;
  border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s;
}

.sidebar-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 70px;
  left: -300px;
  width: 280px;
  height: calc(100vh - 70px);
  background-color: var(--amboss-card-bg);
  border-right: 1px solid var(--amboss-border);
  padding: var(--spacing-md);
  overflow-y: auto;
  z-index: 160;
  transition: left 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.sidebar.open {
  left: 0;
}

.sidebar-nav h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--amboss-text-secondary);
  margin-bottom: var(--spacing-md);
  margin-top: var(--spacing-sm);
  font-weight: 600;
}

.semester-menu {
  list-style: none;
  padding: 0;
  margin: 0 calc(-1 * var(--spacing-md));
}

.semester-item {
  border-bottom: 1px solid var(--amboss-border);
}

.semester-item:last-child {
  border-bottom: none;
}

.semester-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--amboss-text-primary);
  transition: all 0.2s;
}

.semester-toggle:hover {
  background-color: #edf2f3;
}

.semester-toggle:hover .semester-name {
  color: var(--amboss-text-primary);
}

.semester-name {
  font-weight: 500;
}

.toggle-arrow {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--amboss-text-secondary);
  transition: transform 0.2s;
  font-family: serif;
}

.semester-toggle.active .toggle-arrow {
  transform: rotate(90deg);
}

.semester-submenu {
  list-style: none;
  padding: 0;
  padding-left: var(--spacing-md);
  overflow: hidden;
  transition: all 0.3s ease;
  margin: 0 calc(-1 * var(--spacing-md));
}

.semester-submenu.collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

.semester-submenu.expanded {
  max-height: 300px;
  opacity: 1;
}

.semester-submenu li {
  margin: 0;
}

.semester-submenu a {
  display: block;
  padding: var(--spacing-xs) var(--spacing-md);
  padding-left: calc(var(--spacing-md) + 20px);
  color: var(--amboss-text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.semester-submenu a:hover {
  background-color: #edf2f3;
  color: var(--amboss-text-primary);
}

/* Auth Pages (Login/Register) */
.auth-page {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-md);
  background: linear-gradient(135deg, var(--amboss-bg) 0%, #e8eaed 100%);
}

.auth-card {
  background: var(--amboss-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  padding: 1.25rem 1.75rem;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.auth-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--amboss-text-primary);
  margin-bottom: 0;
}

.auth-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.auth-subtitle {
  color: var(--amboss-text-secondary);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.auth-form .form-group {
  margin-bottom: 0.65rem;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--amboss-text-secondary);
  margin-bottom: var(--spacing-xs);
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--amboss-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s;
  background: var(--amboss-card-bg);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--amboss-teal);
  box-shadow: 0 0 0 3px rgba(5, 79, 87, 0.1);
}

.auth-form input::placeholder {
  color: #9ca3af;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  font-size: 0.875rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  cursor: pointer;
  color: var(--amboss-text-secondary);
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1px solid var(--amboss-border);
  border-radius: 4px;
  cursor: pointer;
}

.forgot-password {
  color: var(--amboss-teal);
  text-decoration: none;
  font-weight: 500;
}

.forgot-password:hover {
  text-decoration: underline;
}

.btn-auth {
  width: 100%;
  padding: var(--spacing-sm);
  background-color: var(--amboss-teal);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-auth:hover {
  background-color: var(--amboss-teal-dark);
  transform: translateY(-1px);
}

.auth-footer {
  text-align: center;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--amboss-border);
}

.auth-footer p {
  color: var(--amboss-text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

.auth-footer a {
  color: var(--amboss-teal);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.skip-link {
  display: inline-block;
  margin-top: var(--spacing-sm);
  color: var(--amboss-text-secondary);
  font-size: 0.875rem;
}

.form-hint {
  display: block;
  margin-top: var(--spacing-xs);
  font-size: 0.8rem;
  color: var(--amboss-text-secondary);
}

.checkbox-group {
  margin-top: 0.75rem;
}

.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  width: auto !important;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--amboss-teal);
}

.checkbox-label span {
  line-height: 1.4;
}

/* Main Content */
.landing-main {
  flex: 1;
  padding: 2rem var(--spacing-lg);
  padding-left: 80px;
  text-align: center;
}

.landing-main h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--amboss-text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
}

.landing-logo {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
}

.or-text {
  margin: 0 1rem;
  color: var(--amboss-text-secondary);
}

.guest-link {
  margin-top: 1rem;
}

/* Landing Page */
.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
}

.landing-container h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--amboss-text-primary);
  margin-bottom: var(--spacing-sm);
}

.subtitle {
  font-size: 1.25rem;
  color: var(--amboss-text-secondary);
  margin-bottom: var(--spacing-xl);
}

/* Semester Grid */
.semester-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin-bottom: var(--spacing-xl);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.semester-card {
  background-color: var(--amboss-card-bg);
  border: 2px solid var(--amboss-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-decoration: none;
  color: var(--amboss-text-primary);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  box-shadow: var(--shadow-sm);
}

.semester-card:hover {
  border-color: var(--amboss-teal);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.sem-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--amboss-teal);
  line-height: 1;
}

.sem-label {
  font-size: 0.7rem;
  color: var(--amboss-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Login Hint */
.login-hint {
  background-color: var(--amboss-card-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  max-width: 500px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.login-hint p {
  color: var(--amboss-text-secondary);
  margin-bottom: var(--spacing-md);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--amboss-teal);
  color: var(--amboss-teal);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
}

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

.btn-text {
  color: var(--amboss-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-top: var(--spacing-sm);
  display: inline-block;
}

.btn-text:hover {
  color: var(--amboss-teal);
}

/* Flash Messages */
.flash-messages {
  max-width: 600px;
  margin: var(--spacing-md) auto;
  padding: 0 var(--spacing-lg);
}

.flash {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

.flash.success {
  background-color: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.flash.error {
  background-color: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.flash.warning {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

/* Home Page - Logged In Styles */
.landing-main h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--amboss-text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
}

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

.info-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--amboss-text-secondary);
  margin-bottom: 0.75rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}

.info-card {
  background: var(--amboss-card-bg);
  border: 1px solid var(--amboss-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: left;
  transition: all 0.2s;
}

.info-card:hover {
  border-color: var(--amboss-teal);
  box-shadow: var(--shadow-md);
}

.info-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amboss-teal);
  margin-bottom: 0.2rem;
}

.info-card p {
  font-size: 0.8rem;
  color: var(--amboss-text-secondary);
  line-height: 1.4;
}

/* Contribute Section */
.contribute-section {
  margin-bottom: 1.25rem;
}

.contribute-card {
  background: linear-gradient(135deg, var(--amboss-teal) 0%, var(--amboss-teal-dark) 100%);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
  color: white;
  text-align: center;
}

.contribute-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.btn-contribute {
  display: inline-block;
  background: white;
  color: var(--amboss-teal);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-contribute:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Semester Section */
.semester-section {
  margin-bottom: 1.25rem;
}

.semester-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--amboss-text-secondary);
  margin-bottom: 0.75rem;
}

/* Main Content */
main {
  min-height: calc(100vh - 70px);
}

/* Semester Page */
.semester-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem;
}

.semester-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.semester-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.semester-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--amboss-text-primary);
}

.exam-countdowns {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.exam-countdown {
    font-size: 0.82rem;
    color: var(--amboss-text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

.exam-label {
    font-weight: 600;
    color: var(--amboss-text-primary);
}

.exam-timer {
    font-family: 'Lato', monospace;
    font-weight: 700;
    color: var(--amboss-teal);
}

.exam-date {
    color: var(--amboss-text-secondary);
}

.exam-reg {
    display: block;
    font-size: 0.78rem;
    color: var(--amboss-text-secondary);
    padding-left: 0.25rem;
    border-left: 2px solid var(--amboss-teal-light, #b2dfdb);
    margin-top: 0.1rem;
}



.btn-contribute-sm {
    display: inline-block;
    background: var(--amboss-teal);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-contribute-sm:hover {
    background: var(--amboss-teal-dark);
    transform: translateY(-1px);
}

/* Tabs */
.semester-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--amboss-border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.semester-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 0.65rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--amboss-text-secondary);
    transition: all 0.2s;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--amboss-text-primary);
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Category Blocks */
.category-block {
    border-bottom: 1px solid var(--amboss-border);
}

.category-block:last-child {
    border-bottom: none;
}

.category-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--amboss-text-primary);
    transition: background 0.2s;
    font-family: inherit;
}

.category-toggle:hover {
    background: #edf2f3;
}

.category-toggle.active {
    background: #edf2f3;
}

.cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--amboss-teal);
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.cat-label {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.cat-arrow {
    font-family: serif;
    font-size: 0.9rem;
    color: var(--amboss-text-secondary);
    transition: transform 0.2s;
}

.cat-lock {
    color: var(--amboss-text-secondary);
    font-size: 0.85rem;
}

/* File List */
.file-list {
    overflow: hidden;
    transition: all 0.3s ease;
}

.file-list.collapsed {
    max-height: 0;
    opacity: 0;
}

.file-list.expanded {
    max-height: 2000px;
    opacity: 1;
    padding: 0 0.5rem 0.75rem 0.5rem;
}

.file-list-loading {
    padding: 0.75rem;
    color: var(--amboss-text-secondary);
    font-size: 0.9rem;
}

/* File Row */
.file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.75rem;
    background: var(--amboss-card-bg);
    border: 1px solid var(--amboss-border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    transition: border-color 0.2s;
}

.file-row:hover {
    border-color: var(--amboss-teal);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.filename {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--amboss-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-desc {
    font-size: 0.8rem;
    color: var(--amboss-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--amboss-border);
    background: var(--amboss-card-bg);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--amboss-text-secondary);
    transition: all 0.2s;
}

.vote-btn:hover {
    border-color: var(--amboss-teal);
}

.vote-btn.like {
    color: #059669;
}

.vote-btn.like:hover {
    background: #ecfdf5;
    border-color: #059669;
}

.vote-btn.dislike {
    color: #dc2626;
}

.vote-btn.dislike:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.vote-count {
    font-size: 0.75rem;
}

.download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--amboss-border);
    color: var(--amboss-teal);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
}

.download-link:hover {
    background: #edf2f3;
    border-color: var(--amboss-teal);
}

/* Tip Cards */
.tip-card {
    background: var(--amboss-card-bg);
    border: 1px solid var(--amboss-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.tip-header {
    font-weight: 700;
    font-size: 1rem;
    color: var(--amboss-text-primary);
    margin-bottom: 0.35rem;
}

.tip-body {
    font-size: 0.9rem;
    color: var(--amboss-text-secondary);
    line-height: 1.5;
}

.tip-meta {
    font-size: 0.75rem;
    color: var(--amboss-text-secondary);
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* FAQ Cards */
.faq-card {
    padding: 0;
    overflow: hidden;
}

.faq-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 0.75rem;
    font-family: inherit;
}

.faq-toggle:hover {
    background: var(--amboss-bg);
}

.faq-toggle.active {
    background: var(--amboss-bg);
}

.faq-question {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--amboss-text-primary);
}

.faq-arrow {
    font-size: 0.8rem;
    color: var(--amboss-text-secondary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-body {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-body.collapsed {
    max-height: 0;
}

.faq-body.expanded {
    max-height: 2000px;
}

.faq-content {
    padding: 0 1.25rem 0.85rem 1.25rem;
    font-size: 0.875rem;
    color: var(--amboss-text-secondary);
    line-height: 1.6;
}

.faq-content .tip-meta {
    padding-top: 0.5rem;
    border-top: 1px solid var(--amboss-border);
    margin-top: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--amboss-text-secondary);
}

.empty-state.small {
    padding: 1rem;
}

.empty-state p {
    margin-bottom: 0.75rem;
}

/* Login Notice */
.login-notice {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: #92400e;
}

.login-notice a {
    color: #059669;
    font-weight: 600;
}

/* Contribute Preview */
.contribute-preview-card {
    background: linear-gradient(135deg, var(--amboss-teal) 0%, var(--amboss-teal-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.contribute-preview-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.contribute-preview-card p {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: 1rem;
}

.contribute-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contribute-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--amboss-card-bg);
    border: 1px solid var(--amboss-border);
    border-radius: var(--radius-md);
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--amboss-teal);
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contribute-option strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.contribute-option p {
    font-size: 0.8rem;
    color: var(--amboss-text-secondary);
    margin: 0;
}

.contribute-option-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.15s;
}
.contribute-option-link:hover {
    transform: translateY(-1px);
}
.contribute-option-link:hover .contribute-option {
    border-color: var(--amboss-teal);
    box-shadow: 0 2px 8px rgba(0, 107, 107, 0.1);
}

/* Comments Section */
.comments-section {
    overflow: hidden;
    transition: all 0.3s ease;
}

.comments-section.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 0.5rem;
}

.comments-section.expanded {
    max-height: 2000px;
    opacity: 1;
    padding: 0.5rem 0.5rem 0.75rem 0.5rem;
}

.comments-list {
    margin-bottom: 0.5rem;
}

.comment-item {
    background: var(--amboss-card-bg);
    border: 1px solid var(--amboss-border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.4rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.comment-user {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--amboss-teal);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--amboss-text-secondary);
}

.comment-text {
    font-size: 0.875rem;
    color: var(--amboss-text-primary);
    line-height: 1.45;
    margin-bottom: 0.4rem;
}

.comment-vote-row {
    display: flex;
    gap: 0.3rem;
}

.vote-btn.comment-like {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
}

.vote-btn.comment-like.voted {
    background: #ecfdf5;
    border-color: #059669;
    color: #059669;
}

.vote-btn.comment-dislike {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
}

.vote-btn.comment-dislike.voted {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.comment-input-row {
    display: flex;
    gap: 0.4rem;
}

.comment-input {
    flex: 1;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--amboss-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    background: var(--amboss-card-bg);
    color: var(--amboss-text-primary);
}

.comment-input:focus {
    outline: none;
    border-color: var(--amboss-teal);
    box-shadow: 0 0 0 3px rgba(5, 79, 87, 0.1);
}

.comment-send-btn {
    padding: 0.45rem 0.85rem;
    background: var(--amboss-teal);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.comment-send-btn:hover {
    background: var(--amboss-teal-dark);
}

.comment-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    height: 32px;
    padding: 0 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--amboss-border);
    background: var(--amboss-card-bg);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.comment-toggle-btn:hover {
    border-color: var(--amboss-teal);
    background: #edf2f3;
}

.comment-toggle-btn.active {
    background: #edf2f3;
    border-color: var(--amboss-teal);
}

.comment-icon-bubble {
    display: inline-block;
    width: 14px;
    height: 12px;
    border: 1.5px solid var(--amboss-text-secondary);
    border-radius: 3px 3px 3px 3px;
    position: relative;
}

.comment-icon-bubble::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 3px;
    width: 5px;
    height: 4px;
    border-left: 1.5px solid var(--amboss-text-secondary);
    border-bottom: 1.5px solid var(--amboss-text-secondary);
}

.comment-count-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--amboss-text-secondary);
}

.no-comments {
    text-align: center;
    padding: 0.75rem;
    color: var(--amboss-text-secondary);
    font-size: 0.85rem;
}

/* Responsive */

/* Large tablets / small desktops */
@media (max-width: 1024px) {
  .landing-main {
    padding-left: var(--spacing-lg);
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .semester-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Tablets */
@media (max-width: 768px) {
  .navbar {
    padding: 0.6rem 1rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .nav-home {
    display: none !important;
  }

  .nav-divider {
    display: none;
  }

  .user-name,
  .user-pseudonym {
    display: none;
  }

  .btn-mitmachen {
    padding: 0.3rem 0.75rem !important;
    font-size: 0.8rem !important;
  }

  /* Landing / Home page */
  .landing-main {
    padding: 1.5rem 1rem;
    padding-left: 1rem;
  }

  .landing-main h1 {
    font-size: 1.5rem;
  }

  .landing-logo {
    width: 36px;
    height: 36px;
  }

  .landing-container h1 {
    font-size: 1.75rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .semester-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .sem-number {
    font-size: 1.25rem;
  }

  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .contribute-card {
    padding: 1.25rem;
  }

  .contribute-card h2 {
    font-size: 1rem;
  }

  /* Login hint */
  .login-hint {
    padding: 1.25rem;
  }

  .login-hint .or-text {
    display: block;
    margin: 0.5rem 0;
  }

  /* Auth pages */
  .auth-card {
    padding: 1.25rem 1.25rem;
    margin: 0 0.5rem;
  }

  .auth-header h1 {
    font-size: 1.2rem;
  }

  /* Semester page */
  .semester-page {
    padding: 1rem;
  }

  .semester-page-header h1 {
    font-size: 1.25rem;
  }


  .semester-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    -webkit-overflow-scrolling: auto;
  }

  .tab-btn {
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* File rows */
  .file-row {
    flex-wrap: wrap;
    padding: 0.6rem 0.65rem;
    gap: 0.4rem;
  }

  .file-info {
    flex: 1 1 calc(100% - 120px);
    min-width: 0;
  }

  .file-actions {
    flex: 0 0 auto;
    width: auto;
  }

  .filename {
    font-size: 0.85rem;
  }

  .file-desc {
    font-size: 0.75rem;
  }

  /* Category toggle */
  .category-toggle {
    padding: 0.75rem 0.4rem;
    font-size: 0.9rem;
  }

  /* Comments */
  .comments-section.expanded {
    padding: 0.4rem;
  }

  .comment-item {
    padding: 0.5rem 0.6rem;
  }

  .comment-input-row {
    flex-direction: column;
    gap: 0.3rem;
  }

  .comment-send-btn {
    width: 100%;
    text-align: center;
  }

  /* Account page */
  .account-page {
    padding: 1.25rem 1rem;
  }

  .account-row {
    flex-direction: column;
    gap: 0.15rem;
  }

  /* Sidebar */
  .sidebar {
    width: 260px;
    top: 56px;
    height: calc(100vh - 56px);
  }
}

/* Phones */
@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem 0.75rem;
  }

  .logo {
    font-size: 1.1rem;
    letter-spacing: -0.3px;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
  }

  .btn-mitmachen {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.75rem !important;
  }

  .btn-primary {
    padding: 0.3rem 0.75rem !important;
    font-size: 0.85rem;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }

  .menu-toggle {
    width: 32px;
    height: 32px;
  }

  .menu-toggle span {
    width: 18px;
  }

  /* Landing / Home */
  .landing-main {
    padding: 1.25rem 0.75rem;
    padding-left: 0.75rem;
  }

  .landing-main h1 {
    font-size: 1.25rem;
  }

  .landing-logo {
    width: 32px;
    height: 32px;
  }

  .landing-container {
    padding: 1.25rem 0.75rem;
  }

  .landing-container h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .semester-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .semester-card {
    padding: 0.6rem;
  }

  .sem-number {
    font-size: 1.1rem;
  }

  .sem-label {
    font-size: 0.6rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .info-card {
    padding: 0.75rem;
  }

  .contribute-card {
    padding: 1rem;
    border-radius: var(--radius-sm);
  }

  .contribute-card h2 {
    font-size: 0.95rem;
  }

  .btn-contribute {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
  }

  .login-hint {
    padding: 1rem;
  }

  .login-hint p {
    font-size: 0.85rem;
  }

  /* Auth pages */
  .auth-page {
    padding: 1rem 0.75rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .auth-card {
    padding: 1rem 1rem;
    border-radius: var(--radius-md);
  }

  .auth-header h1 {
    font-size: 1.1rem;
  }

  .auth-logo {
    width: 32px;
    height: 32px;
  }

  /* Semester page */
  .semester-page {
    padding: 0.75rem;
  }

  .semester-page-header {
    margin-bottom: 0.75rem;
  }

  .semester-page-header h1 {
    font-size: 1.15rem;
  }


  .btn-contribute-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }

  .tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  /* File row on phone */
  .file-row {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    gap: 0.35rem;
  }

  .file-info {
    flex: 1 1 100%;
  }

  .file-actions {
    justify-content: flex-end;
    gap: 0.3rem;
  }

  .vote-btn {
    width: 30px;
    height: 30px;
  }

  .download-link {
    width: 30px;
    height: 30px;
  }

  .comment-toggle-btn {
    height: 30px;
  }

  /* Comments on phone */
  .comments-section.expanded {
    padding: 0.3rem;
  }

  .comment-item {
    padding: 0.45rem 0.5rem;
  }

  .comment-header {
    flex-wrap: wrap;
    gap: 0.2rem;
  }

  .comment-user {
    font-size: 0.8rem;
  }

  .comment-text {
    font-size: 0.825rem;
  }

  .comment-input {
    font-size: 0.8rem;
    padding: 0.4rem 0.55rem;
  }

  .comment-send-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Category toggle on phone */
  .category-toggle {
    padding: 0.65rem 0.3rem;
    gap: 0.5rem;
  }

  .cat-icon {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  .cat-label {
    font-size: 0.875rem;
  }

  /* Tip cards */
  .tip-card {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
  }

  .tip-header {
    font-size: 0.9rem;
  }

  .tip-body {
    font-size: 0.85rem;
  }

  /* Contribute preview on phone */
  .contribute-preview-card {
    padding: 1.15rem;
    border-radius: var(--radius-sm);
  }

  .contribute-preview-card h2 {
    font-size: 1.05rem;
  }

  .contribute-option {
    padding: 0.75rem;
    gap: 0.6rem;
  }

  .option-letter {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  /* Account page on phone */
  .account-page {
    padding: 1rem 0.75rem;
  }

  .account-card {
    padding: 1rem;
    border-radius: var(--radius-sm);
  }

  .account-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .account-avatar-large {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  /* Sidebar on phone */
  .sidebar {
    width: 240px;
    padding: var(--spacing-sm);
  }

  /* Empty state */
  .empty-state {
    padding: 1.5rem 0.75rem;
  }

  /* Flash messages */
  .flash-messages {
    padding: 0 0.75rem;
  }
}

/* ============ Community Tipps Page ============ */

.community-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
}

.community-breadcrumb {
  font-size: 0.85rem;
  color: var(--amboss-text-secondary);
  margin-bottom: 1rem;
}

.community-breadcrumb a {
  color: var(--amboss-teal);
  text-decoration: none;
}

.community-breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 0.4rem;
  color: var(--amboss-border);
}

.community-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--amboss-text-primary);
  margin-bottom: 0.25rem;
}

.community-subtitle {
  font-size: 0.9rem;
  color: var(--amboss-text-secondary);
  margin-bottom: 1.5rem;
}

/* New tip form */
.community-new-tip {
  background: var(--amboss-card-bg);
  border: 1px solid var(--amboss-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

#tipForm textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--amboss-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--amboss-bg);
  color: var(--amboss-text-primary);
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
}

#tipForm textarea:focus {
  outline: none;
  border-color: var(--amboss-teal);
  box-shadow: 0 0 0 3px rgba(5, 79, 87, 0.1);
}

.tip-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.char-count {
  font-size: 0.8rem;
  color: var(--amboss-text-secondary);
}

.btn-tip-submit {
  padding: 0.5rem 1.25rem;
  background: var(--amboss-teal);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-tip-submit:hover:not(:disabled) {
  background: var(--amboss-teal-dark);
}

.btn-tip-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tip card */
.ctip-card {
  background: var(--amboss-card-bg);
  border: 1px solid var(--amboss-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.ctip-card:hover {
  border-color: var(--amboss-teal);
}

.ctip-main {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
}

/* Vote column */
.ctip-vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 38px;
  flex-shrink: 0;
}

.ctip-vote-btn {
  background: none;
  border: 1px solid var(--amboss-border);
  border-radius: 4px;
  width: 32px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amboss-text-secondary);
  font-size: 0.7rem;
  transition: all 0.15s;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}

.ctip-vote-btn:hover {
  border-color: var(--amboss-teal);
  color: var(--amboss-teal);
}

.ctip-vote-btn.ctip-up.active {
  background: var(--amboss-teal);
  border-color: var(--amboss-teal);
  color: white;
}

.ctip-vote-btn.ctip-down.active {
  background: #b91c1c;
  border-color: #b91c1c;
  color: white;
}

.ctip-score {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--amboss-teal);
  min-width: 20px;
  text-align: center;
}

/* Tip content */
.ctip-content {
  flex: 1;
  min-width: 0;
}

.ctip-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--amboss-text-primary);
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ctip-meta {
  font-size: 0.8rem;
  color: var(--amboss-text-secondary);
  display: flex;
  gap: 0.75rem;
}

.ctip-user {
  font-weight: 600;
  color: var(--amboss-teal);
}

/* Comments section */
.ctip-comments-section {
  border-top: 1px solid var(--amboss-border);
  padding: 0.65rem 1.25rem;
  background: var(--amboss-bg);
}

.ctip-comment-toggle {
  background: none;
  border: none;
  color: var(--amboss-teal);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0;
}

.ctip-comment-toggle:hover {
  text-decoration: underline;
}

.ctip-comment-toggle.open {
  margin-bottom: 0.5rem;
}

/* Comment items */
.ccomment-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--amboss-border);
}

.ccomment-item:last-of-type {
  border-bottom: none;
}

.ccomment-vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 30px;
  flex-shrink: 0;
}

.ccomment-vote-btn {
  background: none;
  border: 1px solid var(--amboss-border);
  border-radius: 3px;
  width: 26px;
  height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amboss-text-secondary);
  font-size: 0.6rem;
  transition: all 0.15s;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}

.ccomment-vote-btn:hover {
  border-color: var(--amboss-teal);
  color: var(--amboss-teal);
}

.ccomment-vote-btn.ccomment-up.active {
  background: var(--amboss-teal);
  border-color: var(--amboss-teal);
  color: white;
}

.ccomment-vote-btn.ccomment-down.active {
  background: #b91c1c;
  border-color: #b91c1c;
  color: white;
}

.ccomment-score {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amboss-teal);
  min-width: 16px;
  text-align: center;
}

.ccomment-content {
  flex: 1;
  min-width: 0;
}

.ccomment-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--amboss-text-primary);
  margin-bottom: 0.3rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ccomment-meta {
  font-size: 0.75rem;
  color: var(--amboss-text-secondary);
  display: flex;
  gap: 0.65rem;
}

.ccomment-user {
  font-weight: 600;
  color: var(--amboss-teal);
}

/* Comment form */
.ccomment-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--amboss-border);
}

.ccomment-input {
  flex: 1;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--amboss-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--amboss-card-bg);
  color: var(--amboss-text-primary);
}

.ccomment-input:focus {
  outline: none;
  border-color: var(--amboss-teal);
  box-shadow: 0 0 0 3px rgba(5, 79, 87, 0.1);
}

.ccomment-submit {
  padding: 0.45rem 0.85rem;
  background: var(--amboss-teal);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.ccomment-submit:hover:not(:disabled) {
  background: var(--amboss-teal-dark);
}

.ccomment-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive - Community page */
@media (max-width: 768px) {
  .community-page {
    padding: 1rem;
  }
  .community-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .community-page {
    padding: 0.75rem;
  }
  .community-title {
    font-size: 1.15rem;
  }
  .ctip-main {
    gap: 0.65rem;
    padding: 0.85rem 1rem;
  }
  .ctip-text {
    font-size: 0.85rem;
  }
  .ctip-comments-section {
    padding: 0.5rem 1rem;
  }
  .ccomment-form {
    flex-direction: column;
    gap: 0.35rem;
  }
  .ccomment-submit {
    width: 100%;
    text-align: center;
  }
  .ccomment-item {
    gap: 0.45rem;
  }
  .ctip-vote-col {
    min-width: 32px;
  }
  .ctip-vote-btn {
    width: 28px;
    height: 24px;
  }
}