 :root {
     --ui-gold: #ffcc00;
     --ui-bg: #03080c;
     --ui-panel: rgba(11, 21, 31, 0.95);
     --ui-border: #1a2a3a;
     --ui-input-bg: #050a0f;
     --ui-text-dim: #607d8b;
     --ui-green: #00ff88;
     --ui-blue: #00d4ff;
 }

 html,
 body {
     height: 100%;
     margin: 0;
 }

 body {
     background: var(--ui-bg);
     background-image: radial-gradient(circle at center, #0a1520 0%, #03080c 100%);
     color: white;
     font-family: 'Segoe UI', sans-serif;
     display: flex;
     flex-direction: column;
     min-height: 100vh;
     padding-top: 120px;
     /* Erhöht von 100px auf 140px, da die Navi jetzt höher ist */
 }


 h1 {
     color: var(--ui-gold);
     text-transform: uppercase;
     font-size: 1.5rem;
     border-bottom: 2px solid var(--ui-gold);
     padding-bottom: 10px;
     margin-top: 0;
     letter-spacing: 2px;

 }

 .lang-switch {
     display: flex;
     gap: 10px;
     margin-right: 20px;
     padding-right: 15px;
     border-right: 1px solid var(--ui-border);
     /* Trennlinie rechts, falls sie links vom Logo stehen */
     align-items: center;
 }

 .flag-link {
     text-decoration: none;
     transition: 0.3s;
     display: flex;
     align-items: center;
 }

 /* Der Filter liegt jetzt auf dem Bild */
 .flag-link img {
     filter: grayscale(100%);
     opacity: 0.4;
     transition: all 0.3s ease;
     border: 1px solid transparent;
 }

 .flag-link:hover img {
     filter: grayscale(0%);
     opacity: 0.8;
 }

 /* Leuchteffekt für die aktive Flagge */
 .flag-link.active img {
     filter: grayscale(0%);
     opacity: 1;
     border-color: var(--ui-gold);
     box-shadow: 0 0 10px var(--ui-gold);
     transform: scale(1.1);
 }

 h2 {
     color: #607d8b;
     font-size: 0.9rem;
     text-transform: uppercase;
     margin-top: 30px;
     letter-spacing: 1px;
 }


 .mining-list {
     display: flex;
     flex-direction: column;
     background: rgba(11, 21, 31, 0.5);
 }

 .list-header {
     display: flex;
     font-weight: bold;
     color: #4a5a6a;
     text-transform: uppercase;
     font-size: 0.7rem;
     padding: 10px;
     border-bottom: 2px solid var(--ui-border);
     background: rgba(0, 0, 0, 0.3);
 }

 .list-row {
     display: flex;
     padding: 10px;
     border-bottom: 1px solid var(--ui-border);
     align-items: center;
     transition: 0.2s;
 }

 .list-row:hover {
     background: rgba(255, 215, 0, 0.05);
 }

 .main-frame {
     flex: 1 0 auto;
     width: 95%;
     max-width: 1300px;
     margin: 100px auto 40px auto;
     background: var(--ui-panel);
     border: 1px solid var(--ui-border);
     border-top: 4px solid var(--ui-gold);
     padding: 30px;
     box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
     /* Standardmäßig kein Grid, damit Tabellen vollflächig sind */
 }

 .calc-grid {
     display: grid;
     grid-template-columns: 280px 1fr 320px;
     gap: 30px;
     align-items: start;
 }

 .calc-column {
     display: flex;
     flex-direction: column;
     gap: 15px;
 }

 .column-title {
     color: var(--ui-gold);
     text-transform: uppercase;
     font-size: 0.75em;
     letter-spacing: 1px;
     border-bottom: 1px solid var(--ui-border);
     padding-bottom: 10px;
 }


 #resource_list {
     max-height: 350px;
     overflow-y: auto;
     padding-right: 10px;
     border-bottom: 1px solid var(--ui-border);
 }

 #resource_list::-webkit-scrollbar {
     width: 4px;
 }

 #resource_list::-webkit-scrollbar-thumb {
     background: var(--ui-gold);
 }

 input,
 select {
     background: var(--ui-input-bg);
     color: white;
     border: 1px solid var(--ui-border);
     padding: 10px;
     transition: 0.3s;

 }

 input:focus,
 select:focus {
     border-color: var(--ui-gold);
     outline: none;
 }

 .resource-row {
     display: flex;
     gap: 8px;
     margin-bottom: 8px;
 }

 .btn-add {
     background: transparent;
     color: var(--ui-gold);
     border: 1px dashed var(--ui-gold);
     padding: 10px;
     cursor: pointer;
     text-transform: uppercase;
     font-size: 0.7em;
 }

 .btn-remove {
     background: rgba(255, 68, 68, 0.1);
     color: #ff4444;
     border: 1px solid #ff4444;
     cursor: pointer;
     padding: 0 10px;
 }

 .result-box {
     background: rgba(0, 0, 0, 0.3);
     border: 1px solid var(--ui-border);
     padding: 15px;
     text-align: right;
 }

 .big-number {
     font-family: monospace;
     font-size: 1.6em;
     font-weight: bold;
     display: block;
 }

 .station-info-box {
     padding: 12px;
     border-left: 2px solid var(--ui-gold);
     background: rgba(255, 204, 0, 0.03);
     margin-top: 10px;
 }

 .station-item {
     display: flex;
     justify-content: space-between;
     font-size: 0.8em;
     margin-bottom: 4px;
     border-bottom: 1px solid rgba(255, 255, 255, 0.03);
 }

 .station-name {
     color: var(--ui-gold);
     font-weight: bold;
 }

 footer {
     background: rgba(5, 10, 15, 0.98);
     padding: 40px 20px;
     border-top: 1px solid var(--ui-border);
     text-align: center;
     margin-top: auto;
 }

 footer a {
     color: var(--ui-text-dim);
     text-decoration: none;
     margin: 0 15px;
     text-transform: uppercase;
     font-size: 0.85em;
     transition: 0.2s;

 }

 footer a:hover {
     color: var(--ui-gold);
 }

 .code {
     color: var(--ui-gold);
     font-weight: bold;
     font-family: monospace;
     font-size: 0.85rem;
 }

 .referral-label {
     color: #aaa;
     font-size: 0.65rem;
     text-transform: uppercase;
     display: block;
 }

 .filter-section {
     background: rgba(16, 29, 41, 0.4);
     border: 1px solid var(--ui-border);
     padding: 20px;
     margin-bottom: 30px;
 }

 .filter-form {
     display: flex;
     flex-wrap: wrap;
     gap: 20px;
     align-items: flex-end;
 }

 .filter-group {
     display: flex;
     flex-direction: column;
     flex: 1;
     min-width: 200px;
 }

 .filter-group label {
     font-size: 0.75em;
     color: var(--ui-gold);
     text-transform: uppercase;
     margin-bottom: 8px;
 }

 .btn-filter {
     background: var(--ui-gold);
     color: #050a0f;
     border: none;
     padding: 11px 25px;
     font-weight: bold;
     cursor: pointer;
     text-transform: uppercase;
 }

 table {
     width: 100%;
     border-collapse: collapse;
     margin-top: 20px;
 }

 th {
     text-align: left;
     color: var(--ui-gold);
     border-bottom: 2px solid var(--ui-border);
     padding: 12px;
     font-size: 0.8em;
     text-transform: uppercase;
 }

 td {
     padding: 15px 12px;
     border-bottom: 1px solid var(--ui-border);
 }

 .ore-tag {
     display: inline-block;
     background: rgba(255, 204, 0, 0.1);
     color: var(--ui-gold);
     padding: 2px 8px;
     border-radius: 3px;
     font-size: 0.75em;
     margin: 2px;
     border: 1px solid rgba(255, 204, 0, 0.3);
 }

 .price-badge {
     color: #00ff88;
     font-family: monospace;
     font-weight: bold;
 }







 /* Spalten-Layout - Gemeinsame Basis für Header und Zeilen */
 .col-name {
     flex: 2;
     min-width: 140px;
     font-weight: bold;
     color: #fff;
 }

 .col-unit,
 .col-scu,
 .col-32,
 .col-96 {
     flex: 1;
     min-width: 80px;
     text-align: right;
     /* Wichtig: Beides rechtsbündig */
 }

 .col-updated {
     flex: 1;
     min-width: 90px;
     text-align: right;
     /* Rechtsbündig sieht in Tabellen meist sauberer aus */
     color: #607d8b;
     font-size: 0.8rem;
 }

 .col-station {
     flex: 2.5;
     /* Etwas mehr Platz für lange Stationsnamen */
     min-width: 150px;
     text-align: left;
     margin-left: 20px;
     /* Kleiner Abstand zur Zeit-Spalte */
     color: var(--ui-gold);
     font-size: 0.85rem;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
     /* Schneidet zu lange Namen mit ... ab */
 }

 /* Spezifische Farben für die Werte */
 .col-unit {
     color: #e49f20;
 }

 .col-scu {
     color: var(--ui-gold);
     font-weight: bold;
 }

 .col-32 {
     color: #b3ec0a;
 }

 .col-96 {
     color: #88bd00;
 }

 /* Header-Korrektur: Damit die Titel ÜBER den Werten stehen */
 .list-header .col-unit,
 .list-header .col-scu,
 .list-header .col-32,
 .list-header .col-96,
 .list-header .col-updated {
     text-align: right;
 }

 /* Monospace nur für die Zahlen-Spalten, damit sie perfekt untereinander stehen */
 .list-row .col-unit,
 .list-row .col-scu,
 .list-row .col-32,
 .list-row .col-96 {
     font-family: 'Courier New', monospace;
 }

 .top-nav {
     width: 100%;
     background: rgba(5, 10, 15, 0.95);
     backdrop-filter: blur(10px);
     border-bottom: 1px solid var(--ui-border);
     position: fixed;
     top: 0;
     left: 0;
     z-index: 1000;
     padding: 0;
 }

 .nav-row-top,
 .nav-row-bottom {
     width: 100%;
     max-width: 1400px;
     /* Begrenzt die Breite wie vorher */
     margin: 0 auto;
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 12px 20px;
     /* Etwas mehr "Luft" zum Atmen */
     box-sizing: border-box;
 }

 .nav-row-top {
     border-bottom: 1px solid rgba(26, 42, 58, 0.5);
     background: rgba(0, 0, 0, 0.2);
     /* Ganz leichte Abhebung der oberen Zeile */
 }

 .nav-logo-h1 {
     margin: 0;
     font-size: 1.2rem;
     color: var(--ui-gold);
     text-transform: uppercase;
     letter-spacing: 3px;
     border-bottom: none;
     /* Entfernt den unteren Strich, den globale h1 haben */
     padding-bottom: 0;
 }

 .top-nav::after {
     content: "";
     position: absolute;
     bottom: -2px;
     left: 0;
     width: 100%;
     height: 3px;
     background: linear-gradient(90deg,
             transparent 0%,
             var(--ui-gold) 50%,
             transparent 100%);
     box-shadow: 0px 2px 10px 1px rgba(255, 204, 0, 0.5);
     opacity: 0.8;
 }

 .nav-container {
     width: 100%;
     max-width: 1400px;
     margin: 0 auto;
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 0 20px;
 }

 .nav-logo {
     color: var(--ui-gold);
     text-decoration: none;
     font-weight: bold;
     letter-spacing: 2px;
     font-size: 1.1rem;
     text-transform: uppercase;
 }

 .referral-box {
     background: rgba(255, 204, 0, 0.05);
     border: 1px dashed rgba(255, 204, 0, 0.3);
     border-radius: 4px;
     transition: all 0.3s ease;
 }

 .referral-box:hover {
     background: rgba(255, 204, 0, 0.1);
     border-style: solid;
 }

 .referral-link-wrapper {
     display: flex;
     align-items: center;
     gap: 10px;
     /* Der Abstand zwischen Bild und Text */
     padding: 5px 12px;
     text-decoration: none;
 }

 .referral-img {
     width: 28px;
     height: 28px;
     object-fit: contain;
     display: block;
 }

 .referral-label {
     color: #aaa;
     font-size: 0.7rem;
     text-transform: uppercase;
 }

 .referral-text-wrapper {
     display: flex;
     flex-direction: column;
     /* Text untereinander: "Supportet mich" oben, Code unten */
     line-height: 1.2;
 }

 .referral-text-wrapper .code {
     color: var(--ui-gold);
     font-weight: bold;
     font-family: monospace;
     font-size: 0.85rem;
 }

 .referral-text-link {
     color: #aaa;
     text-decoration: none;
     font-size: 0.8rem;
     transition: 0.3s;
 }

 .referral-text-link .code {
     color: var(--ui-gold);
     font-weight: bold;
     font-family: monospace;
 }

 .referral-text-link:hover {
     color: #fff;
     background: rgba(255, 204, 0, 0.1);
 }

 .nav-links a {
     color: white;
     text-decoration: none;
     padding: 8px 15px;
     border: 1px solid var(--ui-border);
     font-size: 0.75em;
     text-transform: uppercase;
     margin-left: 5px;
     background: rgba(26, 42, 58, 0.2);
 }

 .nav-links a:hover,
 .nav-links a.active {
     color: var(--ui-gold);
 }

 .nav-links a.nav-external {
     color: var(--ui-blue);
     /* Nutzt dein definiertes Blau #00d4ff */
     border-color: rgba(0, 212, 255, 0.3);
     /* Dezenter blauer Rand */
     background: rgba(0, 212, 255, 0.05);
     /* Ganz leichter blauer Hintergrund-Schimmer */
 }

 .nav-links a.nav-external:hover {
     color: #fff;
     /* Beim Hover wird er weiß oder bleibt blau, je nach Geschmack */
     background: rgba(0, 212, 255, 0.2);
     border-color: var(--ui-blue);
     box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
     /* Blauer Glow-Effekt beim Drüberfahren */
 }

 /* Mobil-Optimierung */
 @media (max-width: 1100px) {
     .calc-grid {
         grid-template-columns: 1fr;
     }

     .referral-box {
         display: none;
     }

     /* Verstecken auf kleinen Handys */
     .nav-logo {
         font-size: 0.9rem;
     }
 }