/* === Reset & Basics === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1a4d8f;
  --primary-dark: #0d3366;
  --primary-light: #2d6bc4;
  --secondary: #6c757d;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --light: #f8f9fa;
  --dark: #212529;
  --border: #dee2e6;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

/* === Navigation === */
.navbar {
  background: var(--primary-dark);
  color: white;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-brand a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: white;
}

/* === Hero Section === */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 80px 20px;
  text-align: center;
}

.hero-overlay h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}

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

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

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

.btn-secondary:hover {
  background: #5a6268;
}

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

.btn-success:hover {
  background: #218838;
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.85rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-header h3 {
  margin-bottom: 0;
}

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

.btn-danger:hover {
  background: #c82333;
}

.btn-large {
  padding: 14px 32px;
  font-size: 1.1rem;
}

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

.btn-small {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* === Property Overview === */
.property-overview {
  padding: 60px 0 40px;
}

.property-overview h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8rem;
}

.property-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.image-placeholder {
  background: #ddd;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 0.9rem;
}

.main-image {
  height: 300px;
  margin-bottom: 10px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.image-placeholder.small {
  height: 100px;
}

.property-details h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.property-description {
  margin-bottom: 20px;
  color: #555;
}

.property-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fact {
  display: flex;
  flex-direction: column;
}

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

.fact-value {
  font-weight: 600;
  font-size: 1rem;
}

/* === Info Cards === */
.auction-info {
  padding: 40px 0;
}

.auction-info h2 {
  text-align: center;
  margin-bottom: 30px;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.info-card h3 {
  margin-bottom: 15px;
  color: var(--primary);
}

.info-card ul {
  list-style: none;
  padding: 0;
}

.info-card li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 0.9rem;
}

.info-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* === Documents === */
.documents-section {
  padding: 40px 0;
}

.documents-section h2 {
  margin-bottom: 15px;
}

.document-list {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.document-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.document-list li::before {
  content: '📄';
  position: absolute;
  left: 0;
}

.note {
  margin-top: 15px;
  color: var(--secondary);
  font-style: italic;
}

/* === CTA Section === */
.cta-section {
  text-align: center;
  padding: 60px 0;
  background: white;
  border-radius: var(--radius);
  margin: 40px 0;
  box-shadow: var(--shadow);
}

.cta-section h2 {
  margin-bottom: 10px;
}

.cta-section p {
  margin-bottom: 20px;
  color: var(--secondary);
}

/* === Auth Forms === */
.auth-container {
  max-width: 450px;
  margin: 60px auto;
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-container-wide {
  max-width: 650px;
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 10px;
}

.auth-info {
  text-align: center;
  color: var(--secondary);
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.auth-form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.auth-form legend {
  font-weight: 600;
  padding: 0 10px;
  color: var(--primary);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 0.9rem;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 77, 143, 0.1);
}

.form-group-small {
  max-width: 120px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.checkbox-group {
  margin-bottom: 12px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
}

.auth-link a {
  color: var(--primary);
}

/* === Messages === */
.message {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.message-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* === Auction Room === */
.auction-room {
  padding: 40px 0;
}

.auction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.auction-status-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-ended {
  background: #f8d7da;
  color: #721c24;
}

.auction-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

/* Timer */
.timer-section {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.timer-label {
  font-size: 0.9rem;
  color: var(--secondary);
  margin-bottom: 8px;
}

.countdown {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.countdown.urgent {
  color: var(--danger);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.timer-info {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-top: 8px;
}

/* Current Bid */
.current-bid-section {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.bid-label {
  font-size: 0.9rem;
  color: var(--secondary);
  margin-bottom: 8px;
}

.current-bid {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--success);
}

.bid-count {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-top: 5px;
}

.reserve-price-status {
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reserve-price-status .reserve-icon {
  font-size: 1.1rem;
}

.reserve-price-status.reserve-met {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.reserve-price-status.reserve-not-met {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* Bid Section */
.bid-section {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.bid-section h3 {
  margin-bottom: 15px;
}

.bid-input-group {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.bid-input-group .form-group {
  flex: 1;
  margin-bottom: 0;
}

.hint {
  font-size: 0.8rem;
  color: var(--secondary);
  margin-top: 4px;
}

.bid-warning {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--danger);
  font-style: italic;
}

/* Login/Verify Prompts */
.login-prompt,
.verify-prompt {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}

.login-prompt .btn,
.verify-prompt .btn {
  margin: 5px;
}

.auction-ended {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
}

/* Bid History Sidebar */
.auction-sidebar .bid-history {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}

.bid-history h3 {
  margin-bottom: 10px;
}

.online-users {
  font-size: 0.8rem;
  color: var(--secondary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.bid-list {
  max-height: 400px;
  overflow-y: auto;
}

.bid-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

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

.bid-item-amount {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.bid-item-bidder {
  color: var(--secondary);
}

.bid-item-time {
  font-size: 0.75rem;
  color: #999;
}

.no-bids {
  color: var(--secondary);
  text-align: center;
  font-size: 0.9rem;
  padding: 20px 0;
}

/* === Admin Panel === */
.admin-grid {
  display: grid;
  gap: 30px;
  padding: 30px 0;
}

.admin-section {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.admin-section h3 {
  margin-bottom: 20px;
  color: var(--primary);
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.auction-status-info {
  margin-top: 15px;
  padding: 10px;
  background: var(--light);
  border-radius: var(--radius);
}

/* User List */
.user-list {
  max-height: 400px;
  overflow-y: auto;
}

.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
}

.user-email {
  font-size: 0.8rem;
  color: var(--secondary);
}

.user-details {
  font-size: 0.8rem;
  color: #666;
}

.user-status {
  margin: 0 15px;
}

.badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

/* === Legal Page === */
.legal-page {
  padding: 40px 20px;
  max-width: 800px;
}

.legal-page h1 {
  margin-bottom: 30px;
}

.legal-page section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.legal-page h2 {
  margin-bottom: 20px;
  color: var(--primary);
}

.legal-page h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

.legal-page p,
.legal-page li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.legal-page ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

/* === Footer === */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 30px 20px;
  margin-top: 40px;
}

.footer-content {
  text-align: center;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin: 0 10px;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: white;
}

.footer p {
  font-size: 0.8rem;
}

/* === Image Admin === */
.image-admin-list {
  display: grid;
  gap: 10px;
}

.image-admin-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--light);
}

.image-admin-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.image-admin-info {
  flex: 1;
  font-size: 0.85rem;
  color: var(--secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Property Gallery (Startseite) === */
.property-gallery-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.property-gallery-images .main-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: var(--radius);
}

.property-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.property-gallery-thumbs img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.property-gallery-thumbs img:hover {
  opacity: 0.8;
}

/* === Responsive === */
@media (max-width: 768px) {
  .property-grid {
    grid-template-columns: 1fr;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

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

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group-small {
    max-width: 100%;
  }

  .hero-overlay h1 {
    font-size: 1.8rem;
  }

  .countdown {
    font-size: 2.2rem;
  }

  .current-bid {
    font-size: 1.8rem;
  }

  .bid-input-group {
    flex-direction: column;
  }

  .nav-links {
    gap: 10px;
    font-size: 0.8rem;
  }

  .admin-actions {
    flex-direction: column;
  }

  .user-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* === Video im Karussell === */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-container video {
  object-fit: contain;
}

/* Video-Thumbnail mit Play-Icon */
.video-thumb {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.gallery-thumb {
  cursor: pointer;
  transition: opacity 0.2s;
}

.gallery-thumb:hover {
  opacity: 0.8;
}

.property-gallery-main {
  width: 100%;
}

/* Admin Media Thumbnails */
.media-thumb {
  flex-shrink: 0;
}

/* === 360-Grad-Panorama === */
.panorama-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

@media (max-width: 768px) {
  .panorama-container {
    height: 300px;
  }
}

/* === Matterport Embed === */
.matterport-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

.matterport-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
