* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #FAF6F7;
}

.app-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: url('HG.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-color 0.4s ease;
}

/* Header */
.header {
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 50;
  position: relative;
  background-color: transparent;
  transition: background-color 0.4s ease;
}

.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.logo svg {
  width: 34px;
  height: 37px;
}

.logo-path {
  fill: #DC3644;
  transition: fill 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-icon {
  display: grid;
  grid-template-columns: repeat(2, 6px);
  gap: 4px;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.grid-icon div {
  width: 6px;
  height: 6px;
  background-color: #DCDCDA;
  border-radius: 50%;
  transition: background-color 0.4s ease;
}

.profile-btn {
  width: 32px;
  height: 32px;
  background-color: #DC3644;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Carlito', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-style: italic; /* Kursiver Schnitt */
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.4s ease, color 0.4s ease;
  z-index: 10;
}

.back-btn {
  position: absolute;
  left: 18px;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: opacity 0.3s ease;
  z-index: 20;
}

.back-arrow {
  width: 12px;
  height: 12px;
  border-top: 3px solid #ffffff;
  border-left: 3px solid #ffffff;
  transform: rotate(-45deg);
  border-radius: 2px;
}

/* Kacheln Stylings: Eingebundenes Gesamt-SVG zentriert und skaliert */
.card-container-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
  width: 100%;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 350px;
  padding: 0 16px;
}

.card-container svg {
  width: 100%;
  height: auto;
  display: block;
  filter: none !important;
}

/* Bottom Sheets */
.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100% - 78px);
  background-color: #ffffff;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.65s cubic-bezier(0.34, 1.45, 0.64, 1);
  touch-action: none;
  display: flex;
  flex-direction: column;
}

#sheet-tippen {
  height: calc(100% - 230px);
  transform: translateY(100%);
  z-index: 10;
}

#sheet-spieltag {
  transform: translateY(calc(100% - 135px));
  z-index: 20;
}

#sheet-tabelle {
  transform: translateY(calc(100% - 90px));
  z-index: 30;
}

#sheet-rangliste {
  transform: translateY(calc(100% - 45px));
  z-index: 40;
}

.bottom-sheet.open {
  transform: translateY(0) !important;
}

.sheet-header {
  padding: 10px 20px 8px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.sheet-title {
  font-size: 15px;
  font-weight: 700;
  color: #DCDCDA;
  margin-bottom: 5px;
}

.handle-bar {
  width: 42px;
  height: 3px;
  background-color: #DCDCDA;
  border-radius: 10px;
}

.sheet-content {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  color: #374151;
}

.sheet-content h3 {
  font-size: 22px;
  margin-bottom: 16px;
  color: #111827;
}

.sheet-content p {
  line-height: 1.6;
  margin-bottom: 12px;
  color: #4b5563;
}

/* Detail-Modus */
.app-container.detail-mode {
  background-color: #DC3644;
  background-image: none !important;
}

.app-container.detail-mode .header {
  background-color: #DC3644;
}

.app-container.detail-mode .card-container-wrapper {
  opacity: 0;
  pointer-events: none;
}

.app-container.detail-mode #header-logo {
  opacity: 1;
  pointer-events: auto;
}

.app-container.detail-mode .logo-path {
  fill: #ffffff;
}

.app-container.detail-mode .grid-icon,
.app-container.detail-mode .profile-btn {
  opacity: 0;
  pointer-events: none;
}

.app-container.detail-mode #back-btn {
  opacity: 1;
  pointer-events: auto;
}