/* === ROOMMATE APP - VOLLSTÄNDIGES STYLESHEET === */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
  --primary-color: #3b82f6;
  --primary-dark: #1e40af;
  --secondary-color: #10b981;
  --secondary-dark: #059669;
  --background-color: #f3f4f6;
  --surface-color: #ffffff;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --border-radius: 0.75rem;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

html, body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  height: 100%;
  line-height: 1.6;
}

.app-container {
  max-width: 450px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--surface-color);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* === HEADER === */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--surface-color);
}

.app-header .back-arrow {
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--text-color);
  margin-right: 1rem;
  cursor: pointer;
}

.app-header h1 {
  font-size: 1.2rem;
  margin: 0;
  flex-grow: 1;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.header-action-btn {
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.header-action-btn:hover {
  background-color: var(--primary-dark);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--background-color);
  color: var(--text-color);
  text-decoration: none;
  transition: background-color 0.2s;
}

.header-icon-btn:hover {
  background-color: var(--border-color);
}

/* === PROFILE GREETING === */
.profile-greeting {
  display: flex;
  align-items: center;
  padding: 2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.avatar-display {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.2);
  border: 4px solid rgba(255, 255, 255, 0.3);
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.avatar-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.greeting-text {
  flex-grow: 1;
}

.greeting-text h2 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.profile-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.profile-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.profile-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.profile-btn.secondary {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* === MAIN CONTENT === */
.app-content {
  flex-grow: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* === MY LISTINGS === */
.my-listings-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.my-listings-header h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--text-color);
}

.my-listings-header span {
  color: var(--text-light);
  font-weight: 400;
}

/* === LISTINGS GRID === */
.listings-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}

/* === LISTING CARD (für Profil-Seite) === */
.listing-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}

.card-image-link {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.card-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #f0f0f0;
}

.card-content {
  padding: 1rem;
}

.card-content h4 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}

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

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

.btn-delete {
  background-color: #ef4444;
  color: white;
}

.btn-delete:hover {
  background-color: #dc2626;
}

/* === CARD (für Übersichtsseiten) === */
.card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #f0f0f0;
}

.card-body {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.1rem;
  margin: 0 0 0.25rem 0;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

.card-footer {
  padding: 0.75rem 1rem;
  background-color: #f9fafb;
  font-size: 0.8rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
}

/* === EMPTY STATE === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  grid-column: 1 / -1;
}

.empty-state svg {
  width: 60px;
  height: 60px;
  stroke-width: 1.5;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.empty-state h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.empty-state p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  max-width: 400px;
}

/* === FORMS === */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.submit-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

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

.submit-btn:disabled {
  background-color: var(--text-light);
  cursor: not-allowed;
}

/* === FOOTER NAVIGATION === */
.app-footer-nav {
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-color);
  background-color: var(--surface-color);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-light);
  padding: 0.5rem;
  font-size: 0.7rem;
  width: 65px;
  transition: color 0.2s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary-color);
}

.nav-item i {
  margin-bottom: 4px;
}

.nav-item i svg {
  width: 24px;
  height: 24px;
}

/* === RESPONSIVE === */
@media (min-width: 768px) {
  .app-container {
    max-width: 1200px;
    box-shadow: none;
  }

  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
/* 🔔 BADGE-COUNTER STYLES */
/* Füge das zu deiner style.css hinzu! */

.nav-item {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.75rem;
  background-color: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Für größere Bildschirme */
@media (min-width: 768px) {
  .nav-badge {
    top: 0.5rem;
    right: 1rem;
  }
}