/* main.css */

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

html, body {
  min-height: 100%;
  height: auto;
  font-family: 'Inter', Arial, sans-serif;
  background-color: #1c1c1c;
  color: #f4f4f4;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: calc(10px + var(--warning-height, 0px));
  transition: padding-top 0.3s;
}

/* ===== Header ===== */
header {
  position: fixed;
  top: var(--warning-height, 0px);
  left: 0;
  width: 100%;
  padding: 25px;
  background-color: #1c1c1c;
  color: #ff6600;
  font-size: 1.8rem;
  font-weight: bold;
  text-align: center;
  border-bottom: 3px solid #ff6600;
  z-index: 1000;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  transition: padding 0.3s, font-size 0.3s;
}

header.shrink {
  padding: 15px;
  font-size: 1.4rem;
}

div.fnt {
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
}

p {
  padding: 20px 0;
}

/* ===== Warning Bar ===== */
.warning {
  display: block;
  top: 0;
  width: 100%;
  background-color: #ff6600;
  color: #1c1c1c;
  text-align: center;
  font-weight: bold;
  padding: 10px 0;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  position: fixed;
  z-index: 2000;
}

/* ===== Overview ===== */
#overview {
  background-color: #222222;
  color: #f4f4f4;
  padding: 20px;
  margin-top: 90px;
  border-bottom: 3px solid #ff6600;
  text-align: center;
}

#overview .overview-container {
  max-width: 1200px;
  margin: 0 auto;
}

#overview h1 {
  color: #ffaa33;
  font-size: 1.4rem;
  margin-top: 2em;
  margin-bottom: 0.8em;
  padding-left: 10px;
  text-align: left;
}

#overview .leftBorder {
  border-left: 4px solid #ff6600;
  border-radius: 10px;
}

#overview .lede {
  font-size: 1.15rem;
  color: #ddd;
  background: rgba(255, 102, 0, 0.08);
  padding: 15px 20px;
  margin-bottom: 2em;
  text-align: left;
  line-height: 1.75;
}

#overview p {
  font-size: 1rem;
  margin-bottom: 15px;
}

#overview .overview-buttons button {
  margin: 5px;
  padding: 8px 16px;
  font-size: 1rem;
  background: none;
  border: 2px solid #ff6600;
  border-radius: 6px;
  color: #ff6600;
  cursor: pointer;
  transition: all 0.3s;
}

#overview .overview-buttons button:hover {
  background-color: #ff6600;
  color: #1c1c1c;
}

/* ===== Main Grid & Tiles ===== */
main {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  grid-auto-rows: 1fr;
  gap: 20px;
  padding: 140px 20px 20px 20px;
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 10px 20px 20px 20px;
  background-color: #1e1e1e;
  border-radius: 12px;
  border: 2px solid #ff6600;
  transition: transform 0.3s, box-shadow 0.3s;
  color: #f4f4f4;
  cursor: pointer;
}

.tile:hover {
  /* hover is handled by .tile-unit wrapper */
  transform: none;
  box-shadow: none;
}

.tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tile-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff6600;
}

.tile-settings {
  text-decoration: none;
  color: #ff6600;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s;
  background: none;
  border: none;
}

.tile-settings:hover {
  color: #ffaa33;
}

.tile-content {
  flex: 1 1 auto;
  min-height: 0
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 1rem;
  min-height: 0;
  line-height: auto;
  color: #f4f4f4;
}

.tile-content.column {
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tile-content img,
.tile-content picture,
.tile-content video,
.tile-content svg {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  max-height: 55vh;
}

#overlayCopyLightningImg{
  width: 230px;
}

.prices {
  display: block;
  font-weight: bold;
  font-size: 1.2em;
}


.center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Tile-Unit: tile + explore button as one interactive unit ===== */
.tile-unit {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.3s;
}

.tile-unit:hover {
  transform: scale(1.05);
}

.tile-unit:hover .tile {
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 15px #ff6600;
}

.tile-unit:hover .tile-explore {
  background: #ff8822;
  border-color: #ff8822;
}

/* Tile inside unit: no bottom radius, no independent hover */
.tile-unit .tile {
  flex: 1 1 auto;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
  transition: box-shadow 0.3s;
  transform: none !important;
}

/* Explore button: flush under tile, rounded only at bottom */
.tile-explore {
  flex-shrink: 0;
  text-align: center;
  font-size: 1rem;
  font-family: monospace;
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.12em;
  padding: 13px 0;
  background: #ff6600;
  border-radius: 0 0 12px 12px;
  border: 2px solid #ff6600;
  border-top: none;
  cursor: pointer;
  transition: background 0.2s;
}

/* Override grid row height so tile-units determine their own height */
main {
  grid-auto-rows: auto;
}

/* ===== No hover for specific tiles ===== */
.tile.no-hover,
.tile.no-hover:has(a),
.tile.no-hover:has(button) {
  transform: none !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6) !important;
  transition: none !important;
  pointer-events: auto;
}

.tile.no-pointer{
  pointer-events: none;
}

.tile.fng-tile.no-hover {
  transform: none !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6) !important;
  transition: none !important;
}

/* ===== Article Styles (from index.css) ===== */
article {
  max-width: 900px;
  margin: 50px auto 50px auto;
  padding: 40px 50px;
  background: rgba(28,28,28,0.85);
  color: #f4f4f4;
  border-radius: 16px;
  border: 2px solid #ff6600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: break-word;
}

article h1#article-title {
  font-size: 2rem;
  color: #ff6600;
  margin-bottom: 1.2em;
  text-align: center;
  text-shadow: 0 0 10px rgba(255,102,0,0.4);
}

article h2 {
  color: #ffaa33;
  font-size: 1.4rem;
  margin-top: 2em;
  margin-bottom: 0.8em;
  border-left: 4px solid #ff6600;
  padding-left: 10px;
}

article .lede {
  font-size: 1.15rem;
  color: #ddd;
  background: rgba(255,102,0,0.08);
  border-left: 4px solid #ff6600;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 2em;
}

article ul {
  margin: 1em 0 1.5em 1.4em;
  list-style-type: "➤ ";
}

article li {
  margin-bottom: 0.6em;
}

article .table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2em 0;
  border-radius: 10px;
}

article table.kpi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background-color: rgba(30, 30, 30, 0.9);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

article table.kpi-table th {
  background-color: #ff6600;
  color: #1c1c1c;
  text-align: left;
  padding: 12px;
  font-weight: bold;
}

article table.kpi-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

article table.kpi-table tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

article table.kpi-table tr:hover {
  background-color: rgba(255, 102, 0, 0.15);
  transition: background 0.3s;
}

article p {
  margin-bottom: 1.2em;
}

article p strong {
  color: #ffaa33;
}

/* ===== Overlay Containers (Fear & Greed / Trend) ===== */
.overlay-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.overlay-container img {
  width: 100%;
  height: auto;
  display: block;
}

.overlay-img {
  position: absolute;
  top: -2%;
  left: 0;
  width: 100%;
  transform-origin: 50% 70%;
  transition: transform 900ms cubic-bezier(.22,.9,.2,1);
  pointer-events: none;
}

.fng-value-overlay {
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translateX(-50%);
  color: #ff6600;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 0 5px #000;
}


/* ===== Links/Buttons ===== */
a, button {
  color: #ff6600;
  transition: color 0.3s;
}

a:hover, button:hover {
  color: #ffaa33;
}

/* ===== Mobile Optimization ===== */
@media (max-width: 900px) {
  article { padding: 30px 25px; font-size: 1rem; line-height: 1.75; }
}

@media (max-width: 600px) {
  article { padding: 25px 15px; font-size: 0.95rem; line-height: 1.7; border-radius: 12px; }
  article h1#article-title { font-size: 1.5rem; margin-bottom: 1em; }
  article h2 { font-size: 1.1rem; margin-top: 1.6em; padding-left: 8px; border-left-width: 3px; }
  article .lede { font-size: 1rem; padding: 12px 14px; }
}

@media (max-width: 420px) {
  main {
    grid-template-columns: 1fr;
    padding-left: 10px;
    padding-right: 10px;
  }
}

.btn{
  margin-top: 20px;
  padding: 5px 12px; 
  border-radius:6px; 
  border:2px solid #ffaa33; 
  background-color:#1c1c1c; 
  color:#ffaa33; 
  cursor:pointer;"
}




/* Feedback message above lightning qr-code */
#copyFeedback {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffaa33;
  color: #1c1c1c;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 6px;
  display: none;
  z-index: 10;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: opacity 0.3s ease;
}

#copyLightningImg {
  cursor: pointer;
  max-width: 100%;
  border-radius: 8px;
  display: block;
  width: 80%;
  padding: 10px 0;
}





/* ===== Footer ===== */
footer {
  background-color: #1c1c1c;
  color: #f4f4f4;
  padding: 30px 25px;            /* etwas mehr padding */
  border-top: 3px solid #ff6600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  text-align: center;            /* alles zentriert */
  line-height: 2.0;              /* Abstand zwischen den Zeilen */
}

footer p {
  margin: 10px 0;                /* Abstand zwischen Absätzen */
  font-size: 1rem;
  color: #f4f4f4;
}

footer .disclaimer p {
  display: block;
  font-size: 0.85rem;
  color: #888888;
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
  text-shadow: 0 0 2px rgba(0,0,0,0.5);
}
/* --- Mobile Stacking --- */
@media (max-width: 600px) {
  footer {
    flex-direction: column;
    text-align: center;
  }
}



/* Real vs Fair Price Tile */
.real-fair-tile {
  display: flex;
  flex-direction: column;
  min-height: 0;
  align-items: stretch;
  justify-content: space-between;
  background: #1e1e1e;
  border: 2px solid #ff6600;
  border-radius: 12px 12px 0 0;
  padding: 10px 20px 20px 20px;
  color: #f4f4f4;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: none !important;
  transform: none !important;
}

/* --- Header --- */
.real-fair-tile .tile-header {
  text-align: center;
  margin-bottom: 10px;
}


.real-fair-tile .tile-title {
  /*font-size: 1.2rem;*/
  font-weight: 600;
  color: #ff6600;
}

/* --- Label-Bereiche links --- */
.real-fair-tile .labels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  margin: 0;
  padding: 0;
  min-height: 0;
}

.real-fair-tile .current-price-high,
.real-fair-tile .current-price-low,
.real-fair-tile .fair-value {
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0;
  padding: 0;
  color: #ffcc80;
  font-weight: 600;
}

.real-fair-tile .fair-value-in-bar {
  position: absolute;
  left: 50%;
  top: 0%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  z-index: 5;
}


.real-fair-tile .current-price-high{
  padding-top: 5px;
}

.real-fair-tile .current-price-low{
  padding-bottom: 10px;
}

.real-fair-tile .current-price-high,
.real-fair-tile .current-price-low {
  font-weight: 600;
}

.real-fair-tile .fair-value {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  text-align: left;
}

/* --- Hinweistext unten --- */
.real-fair-tile .days-hint {
  margin-top: auto;
  font-size: 0.8rem;
  color: #999;
  align-self: flex-start;
  padding-top: 6px;
}

/* --- Vertikale Balken (neu, 2 getrennte Container: up / down) --- */
.real-fair-tile .bar-container {
  position: absolute;
  min-height: 0;
  right: 25px;
  width: 50%;               /* bar width */
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: visible;
}

/* Balken nach oben (Current > Fair) */
.real-fair-tile .bar-container.up {
  bottom: 50%;               /* Startpunkt: Mitte */
  height: 39%;               /* wächst nach oben */
}

/* Balken nach unten (Current < Fair) */
.real-fair-tile .bar-container.down {
  top: 50%;                  /* Startpunkt: Mitte */
  height: 39%;               /* wächst nach unten */
}

/* --- Balkenfüllung (sichtbarer Balken) --- */
.real-fair-tile .bar-fill {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 0 5px rgba(0,0,0,0.6);
}

/* --- Balkenfüllung (sichtbarer Balken) --- */
.real-fair-tile .bar-container.up .bar-fill {
  border: 0.1px dotted #c0c0c0;
}

.real-fair-tile .bar-container.down .bar-fill {
  border: 0.1px dotted #ffaa33;
}


/* --- Text innerhalb des Balkens --- */
.real-fair-tile .bar-container.up .bar-text {
  position: absolute;
  width: 100%;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Preis oben, Prozent unten */
  align-items: center;            /* horizontal zentriert */
  text-align: center;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 0 5px rgba(0,0,0,0.6);
  padding: 4px 0;
}

.real-fair-tile .bar-container.down .bar-text {
  position: absolute;
  width: 100%;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column-reverse; /* Preis unten, Prozent oben */
  justify-content: space-between;
  align-items: center;
  text-align: center;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 0 5px rgba(0,0,0,0.6);
  padding: 4px 0;
}


.real-fair-tile .bar-text .percent {
  text-shadow: 0 0 5px rgba(0,0,0,0.6);
}

/* --- Responsive Anpassung --- */
@media (max-width: 768px) {
  .real-fair-tile {
    min-height: 460px;
  }
  .real-fair-tile .bar-container {
    right: 15px;
    width: 50%;
  }
  .real-fair-tile .bar-text {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .real-fair-tile {
    padding: 15px;
    min-height: 440px;
  }
  .real-fair-tile .bar-container {
    width: 48%;
    right: 10px;
  }
  .real-fair-tile .bar-text {
    font-size: 0.8rem;
  }

  .fng-value-overlay {
    top: 75%;
  }
}


/* ===== Large Overlay (minimal design, only X visible) ===== */
#largeOverlay {
  display: none;
  position: fixed;
  top: 0 !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5000;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
}


#largeOverlay iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: rgba(0,0,0,0.7);
}

.large-overlay-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 5100;
  background: none;
  border: none;
  color: #ff6600;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  border-radius: 6px;
}
.large-overlay-close:hover,
.large-overlay-close:focus {
  color: #ffaa33;
  outline: none;
}

body.large-overlay-open {
  overflow: hidden;
}

/* Wenn Seite im Overlay geladen wird → kein Body-Padding */
html:has(body[data-embedded="true"]) body {
  padding-top: 0 !important;
}


