@import url("https://fonts.googleapis.com/css2?family=Geologica:wght,CRSV@100..900,0&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
   /* COLORS */
  --color_white: #ffffff;
  --color_black: #1B1B1B;
  --color_grey: #6e6e6e;
  --color_light-grey: #f5f5f7;

  --color_accent-yellow: #FFF083;
  --color_accent-blue: #C9F5FF;
  --color_accent-pink: #F4C9FF;
  --color_accent-green: #EAFFC9;
  --color_accent-orange: #FFE3C9;

  --color_error: #c0392b;

  /* BUTTONS */
  --button_height: 56px;
  --button_radius: 30px;

  /* PAGE */
  --page_width: 393px;
  --content_width: 309px;
  --image_width: 255px;
}

  /* STYLE PAGE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,body {
  width: 100%;
  min-height: 100%;
}

body {
  background-color: var(--color_white);
  font-family: "Geologica", Helvetica, sans-serif;
  color: var(--color_black);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

main {
  padding: 42px 42px 0 42px;
  min-height: 100vh;
}
/* =========================================================
   STYLE ELEMENTS - HEADINGS, BUTTONS, INPUT FIELDS, NAVIGATION
   ========================================================= */

/*HEADINGS*/
h1 {  
  text-align: center;
  font-family: "Geologica", sans-serif;
  font-weight: 700;
  font-optical-sizing: auto;
  font-size: 35px;
  font-style: normal;
  line-height: 50px; 
  color: var(--color_black);
}

h2 {  
  text-align: center;
  font-family: "Geologica", sans-serif;
  font-weight: 700;
  font-optical-sizing: auto;
  font-size: 24px;
  font-style: normal;
  line-height: 24px; 
  color: var(--color_black);
}

h3{
  font-family: "Geologica", sans-serif;
  font-weight: 700;
  font-optical-sizing: auto;
  font-size: 18px;
  font-style: normal;
  line-height: 22px;
  color: var(--color_black);
}

p {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-style: normal;
  font-size: 14px;
  font-optical-sizing: auto;
  line-height: 20px;
  color: var(--color_grey);
}

.subtitle {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--color_grey);
}

/* BUTTONS */
.btn {
  width: 100%;
  height: var(--button_height);

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: var(--button_radius);
  font-family: "Geologica", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.btn_primary {
  background-color: var(--color_black);
  color: var(--color_white);
  border: 1px solid var(--color_black);
}

.btn_secondary {
  background-color: var(--color_white);
  color: var(--color_black);
  border: 1px solid var(--color_black);
}

.add_member_button {
  height: 58px;
  margin-top: 28px;
  border-radius: 10px;
}

button {
  cursor: pointer;
}

button, input {
  font: inherit;
}

/* Input Felder */
.form_input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--color_black);
  border-radius: var(--button_radius);
  padding-left: 16px;
  padding-right: 16px;

  font-size: 16px;
  font-family: "Roboto", sans-serif;
  font-weight: 300;

  color: var(--color_black);
  background-color: var(--color_white);
  outline: none;
}

.form_input::placeholder {
  color: var(--color_grey);
}

.form_input:focus {
  border: 2px solid var(--color_black);
}

/* BOTTOM NAVIGATION */
.bottom_nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  height: 74px;
  border-top: 1px solid var(--color_black);
  background: var(--color_white);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  z-index: 10;
}

.nav_link {
  height: 100%;
  color: var(--color_grey);
  opacity: 50%;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.nav_link img {
    opacity: 0.45;
}

.nav_link.is_active {
  color: var(--color_black);
  position: relative;
  opacity:1
}

.nav_link.is_active img {
  opacity: 1;
}

.nav_link.is_active::before {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color_accent-yellow);
  opacity:1;
  z-index: -1;
}


/* TOP NAVIGATION DESKTOP */

.top_nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 78px;
  padding: 0 40px;
  background: var(--color_white);
  border-bottom: 1px solid #e7e7e7;
  display: none;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  z-index: 200;
  box-sizing: border-box;
}

.top_nav_left {
  justify-self: start;
}

.brand_logo {
  text-decoration: none;
  color: var(--color_black);
  font-size: 22px;
  font-weight: 700;
}

.top_nav_center {
  justify-self: center;

  display: flex;
  align-items: center;
  gap: 42px;
}

.desktop_nav_link {
  text-decoration: none;
  color: var(--color_grey);

  font-size: 16px;
  font-weight: 700;

  transition: color 0.2s ease;
}

.desktop_nav_link:hover,
.desktop_nav_link.is_active {
  color: var(--color_black);
}

.top_nav_right {
  justify-self: end;
}

.logout_button {
  border: none;
  background: var(--color_black);
  color: var(--color_white);
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}


/* =========================================================
   AUTHENTICATION PAGE
   ========================================================= */
/* Welcome Page*/
.auth_page {
  width: 100%;
  min-height: 100%;
  display: flex;
  justify-content: center;
}

.auth_card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero_image {
  width: var(--image_width);
  display: block;
  margin: 0 auto 42px auto;
}

.button_group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 47px;
}

/* Register und Login Page*/
.auth_card {
 padding-top: 78px;
 width: 100%;
}

.form_area {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 0px;
}

.form_area .btn {
  border: none;
  cursor: pointer;
}

.form_message {
  min-height: 20px;
  font-size: 14px;
  line-height: 20px;
  color: var(--color_error);
}

.auth_hint {
  margin-top: -8px;

  font-size: 12px;
  line-height: 18px;

  color: var(--color_grey);
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
}

.auth_hint:hover {
  text-decoration: underline;
}

/* =========================================================
    HOME PAGE
   ========================================================= */

.app_body {
  min-height: 100vh;
}

.app_main {
  width: 100%;
  min-height: 100vh;
  padding: 48px 23px 110px 23px;
  margin: 0 auto;
}

.page_header {
  text-align: center;
  margin-bottom: 46px;
}

.page_header .subtitle {
  margin-top: 2px;
  margin-bottom: 0;
}

.section_title {
  margin: 28px 0 20px 0;
}

.active_goal_container{
  position: relative;
  width: 100%;
  border: 1px solid var(--color_black);
  border-radius: 14px;
  background: var(--color_white);
  padding: 32px 20px 28px 20px;
  text-align: center;
}

.goal_card {
  width: 100%;
  text-align: center;
}

.goal_badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 136px;
  height: 29px;
  padding: 0 15px;
  border: 1px solid var(--color_black);
  border-radius: 16px;
  background: var(--color_accent-yellow);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
}

.goal_image {
  width: 255px;
  max-width: 100%;
  display: block;
  margin: 2px auto 22px auto;
}

.goal_title {
  margin-bottom: 12px;
}

.goal_points {
   font-family: "Roboto", sans-serif;
  font-weight: 500;
  color: var(--color_black);
  margin-bottom: 18px;
}

.progress_bar {
  width: 100%;
  height: 20px;
  border: 1px solid var(--color_black);
  border-radius: 999px;
  background: var(--color_light-grey);
  overflow: hidden;
}

.progress_fill {
  width: 0%;
  height: 100%;
  background: var(--color_accent-yellow);
  border-right: 2px solid var(--color_black);
  transition: width 0.25s ease;
}

.empty_state {
  width: 100%;
  border: 1px solid var(--color_black);
  border-radius: 14px;
  padding: 26px 18px;
  text-align: center;
  background: var(--color_white);
}

.call_button {
  margin-top: 24px;
  gap: 10px;
}

.timer_card {
  display: none;
  margin-top: 24px;
  border: 1px solid var(--color_black);
  border-radius: 14px;
  background: var(--color_light-grey);
  padding: 24px;
  text-align: center;
}

.timer_card.is_visible {
  display: block;
}

.timer_display {
  font-size: 60px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 22px;
}

.timer_bar {
  height: 20px;
  margin-bottom: 18px;
}

.timer_fill {
  background: var(--color_black);
  border-right: none;
}

.timer_reset {
  width: 148px;
  margin: 0 auto;
  height: 45px;
  background: var(--color_white);
}

.buzzer_panel {
  display: none;
  margin-top: 24px;
  border: 1px solid var(--color_black);
  border-radius: 14px;
  padding: 28px 24px;
}

.buzzer_panel.is_visible {
  display: block;
}

.buzzer_grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.buzzer_button {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--color_black);
  border-radius: 50%;
  background: var(--color_light-grey);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 800;
}

.buzzer_button.blue {
  background: var(--color_accent-blue);
}

.buzzer_button.pink {
  background: var(--color_accent-pink);
}

.buzzer_button.green {
  background: var(--color_accent-green);
}

.buzzer_button.orange {
  background: var(--color_accent-orange);
}

.buzzer_button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.buzzer_button.is_clicked {
  border-width: 2px;
}

.buzzer_result {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
}


.goal_actions {
  margin-top: 18px;
}

.collect_button {
  display: none;
}

.collect_button.is_visible {
  display: flex;
}

/* =========================================================
   GOALS PAGE
   ========================================================= */

.goals_list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.goal_list_item {
  min-height: 82px;
  border: 1px solid var(--color_black);
  border-radius: 14px;
  background: var(--color_light-grey);
  padding: 16px 14px 16px 17px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
}

.icon_button {
  width: 39px;
  height: 39px;
  border: 1px solid var(--color_black);
  border-radius: 50%;
  background: var(--color_white);
  color: var(--color_black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.add_goal_button {
  margin-top: 12px;
  background: var(--color_white);
  color: var(--color_black);
  border: 1px solid var(--color_black);
  gap: 10px;
}

.goal_form_card {
  display: none;
  margin-top: 12px;
  border: 1px solid var(--color_black);
  border-radius: 14px;
  background: var(--color_light-grey);
  padding: 20px 16px 16px 16px;
  text-align: center;
}

.goal_form_card.is_visible {
  display: block;
}

.goal_form_card h2 {
  margin-bottom: 18px;
}

.goal_form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.goal_form_actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.goal_form_actions .btn {
  height: 43px;
}

.app_message {
  margin-top: 12px;
  text-align: center;
  min-height: 18px;
  color: var(--color_error);
}

/* =========================================================
   FAMILY PAGE
   ========================================================= */

.family_page {
  padding-bottom: 110px;
}

.family_members {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.family_member_card {
  background: var(--color_white);
  border: 1px solid var(--color_grey);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.family_member_card.blue {
  background: var(--color_accent-blue);
}

.family_member_card.pink {
  background: var(--color_accent-pink);
}

.family_member_card.green {
  background: var(--color_accent-green);
}

.family_member_card.orange {
  background: var(--color_accent-orange);
}

.family_member_left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member_actions {
  display: flex;
  gap: 8px;
}

.member_action_button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--color_black);
  border-radius: 50%;
  background: var(--color_white);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.member_icon_wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--color_black);
  background: var(--color_white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.member_icon {
  width: 34px;
  height: 34px;
}

.member_color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.member_color.blue {
  background: var(--color_accent-blue);
}

.member_color.pink {
  background: var(--color_accent-pink);
}

.member_color.green {
  background: var(--color_accent-green);
}

.member_color.orange {
  background: var(--color_accent-orange);
}

.member_modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.member_modal.is_hidden {
  display: none;
}

.member_modal_card {
  width: 90%;
  background: var(--color_white);
  border-radius: 28px;
  padding: 28px 20px 40px;
}


.member_modal_header {
  margin-bottom: 24px;
}


.member_modal_header h2 {
  font-size: 24px;
  font-weight: 700;
}


.form_group {
  margin-bottom: 28px;
}


.form_group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}


.form_group input {
  width: 100%;
  height: 52px;
  border-radius: 18px;
  border: 1px solid var(--color_grey);
  padding: 0 16px;
  font-size: 16px;
}


.icon_selection {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


.icon_selection .icon_button {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  border: 1px solid var(--color_grey);
  background: var(--color_white);
  width: calc((100% - 48px) / 5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon_selection .icon_button img {
  width: 28px;
  height: 28px;
}

.icon_selection .icon_button.is_selected {
  border: 2px solid var(--color_black);
}


.color_selection {
  display: flex;
  gap: 16px;
}


.color_button {
  width: 52px;
  height: 52px;
  border: 3px solid transparent;
  border-radius: 50%;
  border: 1px solid var(--color_grey);
}

.color_button.is_selected {
  border-color: var(--color_black);
}

.color_button.blue {
  background: var(--color_accent-blue);
}

.color_button.pink {
  background: var(--color_accent-pink);
}

.color_button.green {
  background: var(--color_accent-green);
}

.color_button.orange {
  background: var(--color_accent-orange);
}


.color_button:disabled {
  background: var(--color_light-grey);
}


.member_modal_actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.member_modal_actions .btn {
  flex: 1;
  height: 56px;
}

.delete_modal_card {
  width: 100%;
  max-width: var(--page_width);
  background: var(--color_white);
  border-radius: 28px;
  padding: 28px 20px 40px;
  text-align: center;
}

.delete_modal_text {
  margin-top: 12px;
  line-height: 20px;
}

.delete_modal_actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.delete_modal_actions .btn {
  flex: 1;
  height: 56px;
}

.delete_confirm_button {
  background: var(--color_error);
  border-color: var(--color_error);
  color: var(--color_white);
}

/* =========================================================
   STATS PAGE
   ========================================================= */

.stats_page {
  padding-bottom: 110px;
}

.stats_header {
  margin-bottom: 48px;
}

.stats_card {
  width: 100%;
  border: 1px solid var(--color_black);
  border-radius: 16px;
  background: var(--color_white);
  padding: 26px 24px 24px 24px;
  margin-bottom: 24px;
}

.stats_card h2 {
  margin-bottom: 24px;
}

.stats_members_list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stats_member_card {
  min-height: 88px;
  border: 1px solid var(--color_black);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stats_member_card.blue {
  background: var(--color_accent-blue);
}

.stats_member_card.pink {
  background: var(--color_accent-pink);
}

.stats_member_card.green {
  background: var(--color_accent-green);
}

.stats_member_card.orange {
  background: var(--color_accent-orange);
}

.stats_member_left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stats_icon_wrapper {
  width: 54px;
  height: 54px;
  border: 1px solid var(--color_black);
  border-radius: 50%;
  background: var(--color_white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats_icon_wrapper img {
  width: 30px;
  height: 30px;
}

.stats_member_card p {
  opacity: 1;
}

.stats_points {
  text-align: right;
}

.stats_points strong {
  display: block;
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
}


.stats_toggle_button {
  width: 148px;
  height: 45px;
  margin: 20px auto 0 auto;
  font-size: 14px;
}

.stats_chart_card {
  padding-bottom: 26px;
}

.stats_chart_card h2 {
  margin-bottom: 3px;
}

.stats_chart_subtitle {
  text-align: center;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 18px;
}

.weekly_chart {
  width: 100%;
}

.weekly_chart_svg {
  width: 100%;
  display: block;
}

.chart_grid_line {
  stroke: #d8d8d8;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart_axis_line {
  stroke: var(--color_grey);
  stroke-width: 1.2;
}

.chart_axis_label,
.chart_week_label {
  fill: var(--color_black);
  font-family: "Roboto", sans-serif;
  font-size: 12px;
}

.chart_bar {
  stroke: var(--color_black);
  stroke-width: 1;
}

.chart_bar.blue,
.chart_legend_dot.blue {
  fill: var(--color_accent-blue);
  background: var(--color_accent-blue);
}

.chart_bar.pink,
.chart_legend_dot.pink {
  fill: var(--color_accent-pink);
  background: var(--color_accent-pink);
}

.chart_bar.green,
.chart_legend_dot.green {
  fill: var(--color_accent-green);
  background: var(--color_accent-green);
}

.chart_bar.orange,
.chart_legend_dot.orange {
  fill: var(--color_accent-orange);
  background: var(--color_accent-orange);
}

.chart_legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  margin-top: -8px;
}

.chart_legend_item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--color_grey);
  font-family: "Roboto", sans-serif;
}

.chart_legend_dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* =========================================================
   APP TOPBAR / LOGOUT
   ========================================================= */

.change_family_button {
  height: 52px;
  margin-top: 18px;
  font-size: 15px;
}

.change_family_button:active {
  transform: scale(0.97);
}

/* =========================================================
   RESPONSIVE DESIGN - Es Problem für säter
   ========================================================= */
   
@media (max-width: 392px) {
  .app_main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .timer_display {
    font-size: 52px;
  }
}

/*
|--------------------------------------------------------------------------
| desktop
|--------------------------------------------------------------------------
*/

@media (min-width: 1024px) {

  .top_nav {
    display: grid;
  }

  body {
    padding-top: 78px;
    width: 100%;
  }

  .bottom_nav {
    display: none;
  }

  .auth_page {
  width: 35%;
  }

  .app_main {
    margin: 0% 10% 0% 10%;
    padding: 48px 0 0 0;
    justify-content: center;
  }

  .call_container{
    display: flex;
    flex-direction:column;
    align-items: center;
    gap: 20px;
    padding-bottom: 5%;
  }

  .dinner_call_container{
    width: 50%;
  }

  .timer_card.is_visible {
    margin-top: 0;
  }

  .buzzer_grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.buzzer_button {
  width: 130px;
  height: 130px;
  aspect-ratio: 1 / 1;
  flex: 0 0 130px;
  font-size: 16px;
}

.buzzer_button img {
  width: 38px;
  height: 38px;
}

.buzzer_result {
  font-size: 14px;
}

  .goals_container{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }

  .active_goal_container {
  width: 50%;
}

.goals_container .active_goal_container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.goals_container #active_goal_area {
  width: 100%;
}

.goals_container .goal_actions {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.goals_container .collect_button.is_visible {
  width: 160px;
  display: flex;
}

  .future_goals_container{
    width: 50%;
    position: relative;
    border: 1px solid var(--color_black);
    border-radius: 14px;
    background: var(--color_white);
    padding: 32px 20px 28px 20px;
  }

  .app_main_family_page{
    width:50%;
  }

  .icon_selection .icon_button {
  width: 80px;
  height: 80px;
  }

  .member_modal_card {
  width: 40%;
  }

  .stats_container{
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

}


