/* ============================= */
/* 🌞 HACK TEMPLATE BASE STYLE  */
/* ============================= */

/* ========== BASICS ========== */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  color: var(--text, #1b1f40);
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  z-index: -10;
  opacity: 0.3; /* juster hvis ønsket */
}
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

/* ========== HEADER STRUCTURE ========== */

.hack-headercolor {
  background-image: var(--backgroundImage, none);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid var(--shadow, #eee);
}


.hack-header-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 3rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--heroBackground, var(--card, #fdf5dd));
}


/* === LEFT SIDE: progressbar + icon === */
.hack-left-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  flex: 1 1 380px;
}

/* === PROGRESS BAR === */
.vertical-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.vertical-progress .progress-bar {
  width: 16px;
  height: 191px;
  background-color: var(--progressBg, #fafafa);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.vertical-progress .progress-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--accent, #f6a400);
  transition: height 0.6s ease;
  border-radius: 0 0 10px 10px;
}

#progress-text {
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

/* === CATEGORY ICON + PROFILE === */
.icon-wrapper {
  position: relative;
  width: 220px;
  height: auto;
}

.icon-wrapper .icon {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.profile-badge {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  /*Delete?    background: var(--progressBg);*/
  box-shadow: 0 0 10px var(--accent);
  z-index: 2;
}

.profile-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === RIGHT SIDE: Text === */
.hack-right {
  flex: 1 1 400px;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 3rem;
}

.hack-right h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--title);
  margin: 0;
}

.hack-right p {
  font-size: 1.5rem;
  color: var(--text);
  opacity: 0.9;
  line-height: 1.6;
  margin: 0;
  margin-left: 0.3rem;
}








/* ========== HACK LIST ========== */
.hack-list {
  background-color: var(--background);
}
.hack-list .container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

/* ========== HACK CARD ========== */
.hack-card {
  position: relative;
  overflow: visible;
  padding-top: 2.8rem;
  background-color: var(--card, #ffffff);
  box-shadow: 4px 4px 0 var(--shadow, #ddd);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  transition: transform 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-left: 8px solid var(--accent, #f6a400);
}
.hack-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px var(--shadow, rgba(0, 0, 0, 0.1));
}
.hack-card h2 {
  margin-top: 0;
  font-size: 1.6rem;
  color: var(--accent, #1b1f40);
}
.hack-card p {
  font-size: 1.1rem;
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
  color: var(--text, #1b1f40);
}
.hack-card button {
  background-color: var(--button, #eee);
  color: var(--buttonText, #000);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 12px;
  margin: 0.3rem 0.5rem 0 0;
  font-weight: bold;
  box-shadow: 2px 2px 0 var(--shadow, #ccc);
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  align-self: flex-start;
}
.hack-card button:hover {
  background-color: var(--accent, #ddd);
  color: var(--text, #000);
}


/* HACK EXTRA GRID & VIDEO */
.hack-extra-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1rem;
}
.hack-extra-grid .left,
.hack-extra-grid .right {
  flex: 1 1 100%;
}
@media (min-width: 768px) {
  .hack-extra-grid .left {
    flex: 1 1 60%;
  }
  .hack-extra-grid .right {
    flex: 1 1 35%;
  }
}
.hack-extra-grid video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* HACK-EXTRA CONTAINER */
.hack-extra {
  display: none;
  width: 100%;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-top: 1px solid var(--shadow);
  box-sizing: border-box;
  transition: all 0.3s ease;
}
.hack-extra.open {
  display: block;
  padding-top: 1rem;
  margin-top: 1rem;
  animation: fadeInHack 0.3s ease-in-out;
}
@keyframes fadeInHack {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* VIDEO WRAPPER */
.video-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: max-height 0.3s ease;
  overflow: hidden;
}
.video-wrapper.collapsed {
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.video-wrapper.collapsed video {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: block;
}


video:fullscreen,
video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
}

.hack-video:fullscreen {
  max-height: none !important;
}

.video-wrapper:fullscreen,
.video-inner-wrapper:fullscreen {
  max-height: none !important;
}




.big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  width: 64px;
  height: 64px;
  cursor: pointer;
  z-index: 5;
}
.big-play-icon {
  width: 100%;
  height: 100%;
}
.play-bg {
  fill: var(--button);
}
.play-arrow {
  fill: var(--buttonText);
}

/* "DID IT" KNAP / XP KNAP */
.hack-footer {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--shadow);
  display: flex;
  justify-content: flex-end;
}
.done-btn {
  padding: 0.7rem 1.4rem;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--buttonText, #1b1f40);
  background-color: var(--button, #ffe278);
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--accent, #f6a400);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.done-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 8px var(--accent, #f6a400);
}

/* DROP DOWN */
.hack-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* TEXTAREA */
textarea {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--shadow);
  margin-top: 1rem;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

/* HOWTO BOX */
.hack-howto {
  background: var(--howtoBg, #fffdf6bc);
  padding: 1.2rem 1.5rem 1.5rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--shadow);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--howtoText, #1b1f40);
  box-shadow: 2px 4px 0 rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}
.hack-howto strong {
  display: block;
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* =====CHECKLIST====== */
.checklist {
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--shadow);
  margin-top: 2rem;
}
.new-task-input {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--shadow);
  font-size: 0.95rem;
  margin-right: 0.5rem;
}
.add-task {
  padding: 0.4rem 0.9rem;
  border: none;
  background: var(--accent);
  color: var(--buttonText);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: bold;
}
.task-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}
.task-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--shadow);
}
.task-list li label {
  flex-grow: 1;
  font-size: 0.95rem;
  cursor: pointer;
}
.task-list input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.delete-task {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 0.3rem;
}
.delete-task:hover {
  color: red;
}
.task-list li.completed label {
  text-decoration: line-through;
  opacity: 0.6;
}

/* 🎉 Konfetti container */
.confetti {
  position: fixed;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.8;
  animation: confetti-fall 1.2s ease-out forwards;
}
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(300px) rotate(720deg);
    opacity: 0;
  }
}

/* ========== SAVE HACK TAG ========== */
.save-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease;
  
  
}
.heart-icon {
  width: 42px;
  height: auto;
  transition: transform 0.2s ease;
}

.save-tag:hover .heart-icon {
  transform: scale(1.08);
}

/* "I DID IT" knap / Popup */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.popup-box {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  max-width: 400px;
  width: 90%;
  position: relative;
}
.popup-box textarea {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}
.close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.5em;
  cursor: pointer;
  color: #888;
  transition: color 0.2s;
}
.close-popup:hover {
  color: #d00;
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  padding: 2rem;
  background-color: transparent;
}
.toolbox-link {
  display: inline-block;
  background: var(--button, #eee);
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
  color: var(--buttonText, #000);
  box-shadow: 2px 4px 0 var(--shadow, #ccc);
}
.toolbox-link:hover {
  background-color: var(--accent, #ddd);
  color: var(--text, #000);
}

/* ========== RESPONSIVE ========== */

/*MOBIL*/
@media (max-width: 859px) {
  .hack-header-container {

    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
  }

  .hack-left-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
  }

.hack-right {
    text-align: center;
    margin: 0 auto;
}
 }
/* === Pomodoro inside Hacks === */

.hack-card .pomodoro-btn {

  background-color: #ff89bb !important;
  color: white !important;
  border-radius: 20px;
  padding: 0.2rem 1.2rem;
  font-weight: bold;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 4px 10px rgba(60, 10, 114, 0.464);
  margin-left: 45px;
}

.hack-card .pomodoro-settings-popup button {
  background-color: #ff89bb;
  border: none;
  color: white;
  font-weight: bold;
  padding: 0.2rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.hack-card .pomodoro-btn:hover {
  background-color: #ff6ca6 !important;
  transform: scale(1.05);
}

