/* ==========================================================================
   1. Konfiguration & Globale Stile
   ========================================================================== */

@font-face {
    font-family: 'Kaiser';
    src: url('../fonts/kaiser.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --font-style-normal: "Arial", sans-serif;
    --font-style-logo: "Kaiser", Times, serif;
    --font-style-kaiser: "Times New Roman", Times, serif;
    --font-color-base: #5e463a;
    --font-size-big: 26px;
    --font-size-base: 16px;
    --font-size-ressource: 13px;

    --background-color-white: #f4efe4;
    --background-color-beige: #efe3ca;

    --color-bg-light: #e8f0e1;
    --color-primary: #5d8c41;
    --color-primary-dark: #4a6735;
    --color-border-subtle: #d8d8d8;

    --color-success-bg: #d4edda;
    --color-success-text: #155724;
    --color-success-border: #c3e6cb;

    --color-error-bg: #f8d7da;
    --color-error-text: #721c24;
    --color-error-border: #f5c6cb;
}

@view-transition {
    navigation: auto;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    text-decoration: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

html {
    font-family: var(--font-style-normal);
    color: var(--font-color-base);
    font-size: var(--font-size-base);
    overflow-y: scroll;
    scrollbar-color: #939a7b #4e5927;
}

body {
    /* Wichtig: Das Bild kommt zuerst (vorne), dann das Komma, dann der Verlauf (hinten) */
    background-image: url("../images/background.jpg"), linear-gradient(180deg, #4292cf 0%, #79980b 100%);
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Spezifisch für die Homepage Zentrierung */
body.homepage-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

input {
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    width: auto;
}


/* ==========================================================================
   2. Layout Container & Boxen (Das Game-Design)
   ========================================================================== */

.mainBorder {
    position: relative;
    margin: 10px;
    border-radius: 3px;
    background: var(--background-color-beige);
    box-shadow:
        0 -1px 0 0.5px #aa9986,
        0 0 0 1px #aa9986,
        0 0 0 1.5px #564837,
        0 0 0 2px #615141,
        0 0 0 2.5px #615141,
        0 0 0 3px #796958,
        0 0 0 3.5px #c2b19d,
        0 0 0 4px #c2b19d,
        0 0 0 4.5px #c2b19d,
        0 0 0 5px #c2b19d,
        0 0 0 5.5px #ccbda9,
        0 0 0 6px #e0d5c2,
        0 0 0 6.5px #ebe2d0,
        0 0 0 7px #ebe2d0,
        0 0 0 7.5px #ebe2d0,
        0 0 0 8px #ebe2d0,
        0 0 0 8.5px #beb6a3,
        0 0 0 9px #615944,
        0 0 0 9.5px #332a15,
        inset 0 -2px 8px rgba(121,105,88,0.66),
        0 0 5px 9px rgba(0,0,0,0.66);
}

.sidebox {
    width: 300px;
    margin-bottom: 28px;
}

.mainbox {
    width: 600px;
    background: #ccb99e;
    padding: 4px;
}

/* Damit die Auswahlbox breiter sein kann */
.mainbox.wide {
    width: 1100px;
}

.mainbox .title {
    background: #9b8975;
    border-left: 3px solid #605443;
    border-right: 3px solid #605443;
    border-top: 3px solid #5f4e40;
    border-bottom: 3px solid #c0ac93;
    text-shadow: 1px 0 0 #b68363, 1px 1px 0 #b68363, 0 1px 0 #b68363, -1px 1px 0 #5e463a, -1px 0 0 #5e463a, -1px -1px 0 #5e463a, 0 -1px 0 #5e463a, 1px -1px 0 #5e463a;
    padding: 10px;
    color: #f2f2f2;
    border-radius: 10px 10px 0 0;
    font-size: var(--font-size-big);
    font-family: var(--font-style-kaiser);
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mainbox .content {
    color: #444;
    background: #ffffff;
    padding: 20px;
    border-left: 3px solid #716050;
    border-right: 3px solid #716050;
    border-top: 3px solid #c0ac93;
    border-bottom: 3px solid #716050;
    font-size: 14px;
}

/* --- Der Inhaltsbereich (Weicherer Hintergrund) --- */
.mainbox .content {
    color: #444;
    background: #fdfaf3; /* HIER GEÄNDERT: Ein sehr sanftes Creme/Pergament-Weiß statt hartem #ffffff */
    padding: 20px;
    border-left: 3px solid #716050;
    border-right: 3px solid #716050;
    border-top: 3px solid #c0ac93;
    border-bottom: 3px solid #716050;
    font-size: 14px;
}

/* --- Clean Table Design (Turn Summary) --- */
.mainbox .content table.turn-summary-table {
    width: 100%;
    border-collapse: collapse;
}

/* Tabellenkopf ("Bevölkerungsentwicklung") */
.mainbox .content table.turn-summary-table th {
    border-bottom: 2px solid #bbaea0;
    font-family: var(--font-style-kaiser);
    font-size: 1.2em;
    letter-spacing: 1px;
    color: var(--color-primary-dark);
    font-weight: bold;
    padding-bottom: 12px;
    text-align: left;
}

/* Normale Zeilen */
.mainbox .content table.turn-summary-table tr {
    border-bottom: 1px solid #e6decb;
}
.mainbox .content table.turn-summary-table tr:last-child {
    border-bottom: none;
}

.mainbox .content table.turn-summary-table td {
    padding: 8px 10px;
    color: var(--font-color-base);
    vertical-align: middle;
}

.col-icon {
    width: 40px;
    text-align: center;
}
.col-icon img {
    max-height: 24px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.col-sign {
    width: 30px;
    text-align: center;
}
.col-sign img {
    max-height: 16px;
    width: auto;
    vertical-align: middle;
    display: inline-block;
}
.col-sign.positive {
    color: var(--color-primary);
}
.col-sign.negative {
    color: #a83232;
}

.col-value {
    width: 80px;
    text-align: right;
    font-weight: bold;
    font-family: var(--font-style-kaiser);
    font-size: 1.1em;
    padding-right: 20px !important;
}

.col-reason {
    text-align: left;
    color: #555;
}
/* ==========================================================================
   3. Top Bar (Header im Spiel)
   ========================================================================== */

.top_bar {
    width: 100%;
    height: 115px;
    background: linear-gradient(
        to bottom,
        #e9e3d7 0%,
        #e9e3d7 33%,
        #c7b9a6 calc(33% + 1px),
        rgba(0,0,0,0.3) 33%,
        rgba(0,0,0,0) calc(33% + 6px),
        transparent 100%
    );
}

.top_bar_content {
    margin: 0 auto;
    width: 1440px;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}

.top_bar_left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    margin-right: 10px;
    height: 100%;
}

.server_time {
    display: flex;
    align-items: center;
    height: 38px;
}

.server_time p {
    background: #c7b9a6;
    padding: 2px 36px;
    border-radius: 13px;
    color: #73655a;
    font-weight: bold;
    font-size: 11px;
    box-shadow: inset 0 0 5px 0 rgba(0,0,0,.66);
}

.logo {
    display: flex;
    gap: 10px;
    position: relative;
    top: 12px;
    border: solid 1px #615944;
    border-radius: 6px;
    background-color: #dacebb;
    padding: 5px 12px;
    box-shadow:
        inset 1px 0 1px rgba(0,0,0,.35),
        inset -1px 0 1px rgba(0,0,0,.35),
        inset 0 -2px 1px rgba(0,0,0,.4),
        inset 0 2px 1px rgba(255,255,255,.3),
        0 0 5px 0 rgba(0,0,0,0.66);
}

.logo img {
    height: 44px;
    width: 44px;
}

.logo_image,
.logo_description {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.logo_description p {
    text-shadow: -1px -1px 0px #ebe2d0;
}

.logo_description p:first-child {
    font-family: var(--font-style-logo);
    font-size: 26px;
    letter-spacing: 5px;
    line-height: 26px;
    font-weight: bold;
}

.logo_description > div {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
}

.logo_description > div > p:first-child {
    font-family: var(--font-style-normal);
    font-size: 14px;
    letter-spacing: 2px;
    line-height: 14px;
    font-weight: normal;
}

.logo_description > div > p:last-child {
    font-family: var(--font-style-normal);
    font-size: 10px;
    line-height: 10px;
    text-shadow: none;
}

.top_bar_center {
    margin-top: 10px;
    border-radius: 0 0 3px 3px;
    background: #e9e3d7;
    box-shadow:
        0 0 0 1px #e9e3d7, 0 0 0 2px #e9e3d7, 0 0 0 3px #e5ded2,
        0 0 0 4px #e1d9cd, 0 0 0 5px #e0d6ca, 0 0 0 6px #d5c9b5,
        0 0 0 7px #c7b9a6, 0 0 0 8px #f4f3f0, 0 0 0 9px #efeeec,
        0 0 0 10px #beb2a4, 0 0 11px 8px rgba(0,0,0,1);
}

.ressource_box {
    display: grid;
    grid-template-columns: repeat(7, 120px);
    border: 1px solid #c7b9a6;
    border-bottom: 0;
    border-right: 0;
}

.ressource {
    transition: background-color 0.1s ease-in-out, border-color 0.1s ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: var(--font-size-ressource);
    font-family: var(--font-style-normal);
    color: #73594d;
    border-top: 1px solid #f4f3f0;
    border-right: 1px solid #d5c9b5;
    border-bottom: 1px solid #c7b9a6;
    border-left: 1px solid #f4f3f0;
    background: #e9e3d7;
}

.ressource:hover {
    background: #efeeec;
}

.ressource:active {
    background: #efeeec;
    border-bottom: 1px solid #f4f3f0;
    border-left: 1px solid #d5c9b5;
    border-top: 1px solid #c7b9a6;
    border-right: 1px solid #f4f3f0;
}

.ressource > :first-child { margin-left: 5px; }
.ressource > :last-child { margin-right: 5px; }
.ressource > img { height: 24px; }

.top_bar_right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    height: 38px;
}

.buttonFramed {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    z-index: 0;
    background-image: linear-gradient(to bottom, #b9a479 5%, #f3e2ae 13%, #e4c189 32%, #a4824e 48%, #866435 72%, #ab9154 93%, #c1b07f 100%);
    border: 1px solid #34220d;
    color: #fff;
    cursor: pointer;
}

.buttonFramed > img {
    height: 22px;
    width: 22px;
}

.buttonFramed::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    border: 1px solid #34220d;
    box-shadow: inset 0 -2px 1px 1px #a1a1a1, inset 2px -1px 1px 0 #e0e0e0, inset -2px -1px 1px 0 #e0e0e0, inset 0 2px 1px 1px #f0f0f0;
    z-index: -2;
}

.buttonFramed::after {
    content: "";
    position: absolute;
    top: 3px; right: 3px; bottom: 3px; left: 3px;
    border-radius: inherit;
    background-image: linear-gradient(to bottom, #e6e6e6, #999);
    z-index: -1;
}

.buttonFramed:hover::after { background-image: linear-gradient(to bottom, #fff, #d0d0d0); }
.buttonFramed:active::after { background-image: linear-gradient(to bottom, #e6e6e6, #666); }


/* ==========================================================================
   4. Middle Bar & Navigation
   ========================================================================== */

.middle_bar {
    margin: 0 auto;
    width: 1440px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.userdata {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.userdata > span > img { width: 50px; }
.userdata .name {
    font-size: var(--font-size-base);
    font-family: var(--font-style-kaiser);
    font-weight: bold;
}

.pointsbox {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: row;
    gap: 10px;
}

.pointsbox > span > img { width: 30px; }
.pointsbox > span {
    font-weight: thin;
    font-family: var(--font-style-kaiser);
    font-size: var(--font-size-base);
    letter-spacing: 1px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.navigation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    padding: 25px 15px;
    width: 100%;
}

.navigation .title {
    font-family: var(--font-style-kaiser);
    font-size: var(--font-size-base);
    letter-spacing: 1px;
    font-weight: bold;
    margin-bottom: 10px;
}

.hr {
    width: 100%;
    height: 1px;
    background:
        linear-gradient(to right, transparent 0, #baae98 2%, transparent, #baae98 4%, #baae98 6%, transparent, #baae98 7%, #baae98 8%, transparent, #baae98 9%, #baae98 50%, transparent 50%, transparent 100%),
        linear-gradient(to left, transparent 0, #baae98 2%, transparent, #baae98 4%, #baae98 6%, transparent, #baae98 7%, #baae98 8%, transparent, #baae98 9%, #baae98 50%, transparent 50%, transparent 100%);
}

.navigation > a {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    gap: 5px;
    width: 100%;
    padding: 0 15px;
}

.navigation > a:hover { background: #fff9eb; }
.navigation > a > img { width: 30px; padding: 2px; }

.navigation > a > span {
    display: flex;
    align-items: center;
    height: 25px;
    width: 25px;
    font-weight: thin;
    font-family: var(--font-style-kaiser);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
}

.navigation .info {
    margin-top: 10px;
    width: 100%;
    display: grid;
    place-items: center;
    padding: 6px 15px;
    text-align: center;
    font-family: var(--font-style-kaiser);
    font-size: var(--font-size-base);
    color: var(--font-color-base);
}

.zug {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    padding: 25px 15px;
    width: 100%;
    gap: 10px;
}

.zug img { width: 24px; height: 24px; }
.zug .title {
    font-family: var(--font-style-kaiser);
    font-size: var(--font-size-base);
    letter-spacing: 1px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 5px;
}

.zug .endedturns {
    font-family: var(--font-style-kaiser);
    font-size: var(--font-size-base);
    letter-spacing: 1px;
}

.zug .balken {
    width: 100%;
    background: #5f4e40;
    padding: 1px;
    border-radius: 4px;
}

.zug .percento {
    height: 10px;
    width: 90%;
    background: #546e39;
    box-shadow: inset 0px 0px 0px 2px #71c117;
    border-radius: 4px;
}

.zug .text {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 5px;
    font-family: var(--font-style-kaiser);
    font-size: var(--font-size-base);
}

.zug form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 5px;
}

.zug select, .zug button {
    background: #6c9924;
    color: #f2f2f2;
    padding: 4px 10px;
    border: 1px solid #2b3709;
    box-shadow: inset 0px 2px 1px 0px #b4e151, inset 0px -2px 1px 0px #3e5f13;
    border-radius: 5px;
}

.zug select:hover, .zug button:hover {
    background: #82af3b;
    border: 1px solid #4b5728;
    cursor: pointer;
}

.zug select:active, .zug button:active {
    background: #82af3b;
    border: 1px solid #4b5728;
    cursor: pointer;
    box-shadow: inset 0px -2px 1px 0px #b4e151, inset 0px 2px 1px 0px #3e5f13;
}


/* ==========================================================================
   5. Faction Select (Volkswahl)
   ========================================================================== */

/* Spezieller Abstand nur für diese Seite */
.faction-select-layout {
    margin-top: 50px;
    margin-bottom: 50px;
}

.faction-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Spalten für 12 Völker */
    gap: 30px;
    margin-top: 20px;
    padding-bottom: 20px;
}

.faction-card {
    /* Layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    height: 100%;
    margin: 0 !important;

    /* Design: Old Paper Style */
    background: #efe3ca;
    border: 2px solid #5f4e40;
    border-radius: 3px;

    /* Der Pergament-Effekt */
    box-shadow:
        inset 0 0 30px rgba(94, 70, 58, 0.25),
        inset 1px 1px 0 rgba(255, 255, 255, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.3);
}

.faction-card:hover {
    background: #f7efdc;
    transform: translateY(-3px);
    border-color: #4a3b32;
}

.faction-card img.faction-crest {
    max-width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.faction-card h4 {
    margin: 5px 0 10px 0;
    font-family: var(--font-style-kaiser);
    font-size: 1.3em;
    border-bottom: 1px solid #aaa;
    width: 100%;
    padding-bottom: 5px;
}

/* Container für den unteren Bereich */
.faction-bonus-container {
    margin-top: auto;
    width: 100%;
}

.bonus-label {
    color: var(--color-primary-dark);
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
    text-align: left;
    padding-left: 10px;
}

.bonus-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: #444;
    text-align: left;
    padding-left: 10px;
    padding-right: 5px;
}

.bonus-details span {
    flex: 1;
    line-height: 1.3;
}

.bonus-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: -2px;
}

/* Radio Button Logik */
.faction-card input[type="radio"] { display: none; }

/* Wenn ausgewählt */
.faction-card:has(input[type="radio"]:checked) {
    background: #dbead5;
    border-color: var(--color-primary);
    box-shadow:
        inset 0 0 20px rgba(62, 95, 19, 0.2),
        0 0 0 2px var(--color-primary);
}

/* Submit Button */
.submit-btn {
    display: block;
    width: 100%;
    margin-top: 30px;
    padding: 15px;
    background: var(--color-primary);
    color: white;
    font-size: 1.2rem;
    border: 2px solid #3e5f13;
    border-radius: 5px;
    font-family: var(--font-style-kaiser);
    cursor: pointer;
    box-shadow: inset 0px 2px 1px 0px #b4e151, inset 0px -2px 1px 0px #3e5f13;
    text-shadow: 1px 1px 0 #3e5f13;
}

.submit-btn:hover {
    background: var(--color-primary-dark);
}


/* ==========================================================================
   6. Homepage Styles
   ========================================================================== */

/* Erzwingt die korrekte Schriftart für den Homepage-Bereich */
.homepage-main, .homepage-content {
    font-family: var(--font-style-normal);
    color: #333;
}

.homepage-main {
    width: 960px;
    margin: 20px auto;
    position: relative;
}

.homepage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.homepage-content {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: #fff;
}

.content-wrapper {
    padding: 25px 30px;
    background: #ffffff;
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: 1px solid var(--color-border-subtle);
    overflow: hidden;
}

/* --- Banner --- */
.homepage-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    font-family: var(--font-style-kaiser);
    letter-spacing: 0.3rem;
    color: #333;
}

.homepage-banner img { max-width: 80px; height: auto; display: block; }
.homepage-banner > div:last-child { display: flex; flex-direction: column; align-items: center; text-transform: uppercase; }
.homepage-banner span:first-child { font-size: 2.5rem; line-height: 2.5rem; }
.homepage-banner span:last-child { font-size: 1.5rem; line-height: 1.5rem; }

.homepage-charakter { display: flex; align-items: flex-end; }
.homepage-charakter img { max-width: 50px; height: auto; display: block; position: relative; top: 6px; }

/* --- Login --- */
.login {
    padding: 10px;
    background: var(--color-bg-light);
    display: flex;
    justify-content: flex-end;
}

.login form {
    display: flex;
    gap: 5px;
    align-items: center;
}

#login-form { position: relative; }

.login input[type="text"],
.login input[type="password"] {
    background: #fff !important;
    border: 1px solid #b8b8b8 !important;
    color: #333;
    line-height: 1.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.25rem;
}

.login input[type="submit"] {
    padding: 8px 15px;
    font-size: 1rem;
    background-color: var(--color-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s;
    height: auto;
    line-height: normal;
}

.login input[type="submit"]:hover {
    background-color: var(--color-primary-dark) !important;
}

/* --- Registrierung --- */
.registration-container {
    float: left;
    width: 300px;
    margin-right: 30px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.registration-container p { margin-bottom: 12px; }

.registration-form div { margin-bottom: 15px; }
.registration-form label { display: block; margin-bottom: 5px; font-weight: bold; font-family: var(--font-style-normal); }

.registration-form input[type="text"],
.registration-form input[type="email"],
.registration-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc !important;
    border-radius: 4px;
    background-color: #fff !important;
    font-family: var(--font-style-normal);
    color: #333;
}

.registration-form input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(93, 140, 65, 0.2);
}

.registration-form button[type="submit"] {
    width: 100%;
    background-color: var(--color-primary);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    cursor: pointer;
    font-family: var(--font-style-normal);
}

.registration-form button[type="submit"]:hover {
    background-color: var(--color-primary-dark);
}

/* --- Captcha Styling --- */
.captcha-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

#captcha-image {
    border: 1px solid var(--color-border-subtle);
    border-radius: 4px;
    cursor: pointer;
    height: 40px;
    background-color: #fff;
    image-rendering: pixelated;
}

#captcha-image:hover { box-shadow: 0 0 0 2px rgba(93, 140, 65, 0.2); }
.captcha-wrapper input[type="text"] { flex: 1; }

/* --- Liga-Saisonplan Box (Kompakt) --- */
.league-schedule-container {
    float: left;
    width: 300px;
    clear: left; /* Zwingend unter die Registrierung */
    margin-right: 30px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.schedule-list li {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid var(--color-border-subtle);
    font-size: 0.9em;
}

.schedule-list li:last-child {
    margin-bottom: 0;
}

.round-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    font-family: var(--font-style-normal);
}

.schedule-list li.past,
.schedule-list li.future {
    opacity: 0.6;
    background: #fdfdfd;
}

.schedule-list li.past {
    opacity: 0.6;
    background: #fdfdfd;
}

.schedule-list li.current {
    background-color: var(--color-primary);
    border-color: var(--color-primary-dark);
    box-shadow: none;
    color: white;
}

.schedule-list li.current .round-dates {
    color: white;
    font-weight: bold;
}

.schedule-list li.current .round-title strong {
    color: white;
}

.schedule-list li.current .badge {
    background-color: white;
    color: var(--color-primary-dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.badge {
    background-color: var(--color-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    text-transform: uppercase;
    font-weight: bold;
}

/* --- Typografie & Content Bereich --- */
.main-text-content {
    overflow: hidden;
}

/* Einheitliche Überschriften-Styles für Content, Registrierung und Saisonplan */
.main-text-content h2,
.main-text-content h3,
.registration-container h2,
.league-schedule-container h2 {
    font-family: var(--font-style-kaiser);
    color: var(--color-primary-dark);
    margin-bottom: 15px;
}

.main-text-content h2,
.main-text-content h3 {
    margin-top: 25px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-bg-light);
}

.main-text-content h2:first-child,
.main-text-content h3:first-child {
    margin-top: 0;
}

.main-text-content h2 { font-size: 1.9em; }
.main-text-content h3 { font-size: 1.6em; }

/* Zentrierte, große Überschriften für Seitenboxen */
.registration-container h2,
.league-schedule-container h2 {
    font-size: 1.8em;
    text-align: center;
    margin-top: 0;
}

.main-text-content p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.intro-text p:last-child { margin-bottom: 0; }

.content-image-right {
    float: right;
    max-width: 100px;
    margin: 0 0 15px 20px;
    border-radius: 8px;
    background: var(--color-bg-light);
}

.features-list {
    list-style: none;
    column-count: 2;
    column-gap: 30px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    break-inside: avoid-column;
}

.list-icon {
    width: 24px;
    height: auto;
    margin-right: 12px;
    flex-shrink: 0;
}

/* --- Nachrichten --- */
.messages-box { padding: 3px; border-radius: 5px; font-size: 0.9em; }
.messages-box p { margin: 0; }
.messages-box.success { background-color: var(--color-success-bg); color: var(--color-success-text); border: 1px solid var(--color-success-border); }
.messages-box.error { background-color: var(--color-error-bg); color: var(--color-error-text); border: 1px solid var(--color-error-border); }
#registration-messages.messages-box { margin-top: 15px; }

#login-form .messages-box {
    position: absolute; top: 100%; right: 0; margin-top: 8px; z-index: 10; width: 320px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); text-align: left;
}

.error-text { color: var(--color-error-text); font-size: 0.9em; display: block; margin-top: 2px; }

/* --- Footer --- */
.homepage-content > div:last-child {
    background: #f0f4ec;
    padding: 10px;
    border-top: 1px solid #d8d8d8;
}














/* --- Schieberegler (Toggle Switch) im Header --- */
.detail-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: normal;
    text-shadow: none; /* Entfernt den klobigen Schatten vom Text daneben */
    font-family: var(--font-style-normal);
}

.toggle-text {
    color: #e9e3d7; /* Heller Beige-Ton, damit es auf dem dunklen Braun gut lesbar ist */
}

/* Die unsichtbare Checkbox, die die Logik steuert */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    margin: 0;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Der Hintergrund des Reglers (Grau/Braun für AUS) */
.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #5f4e40; /* Tiefes Kaiser-Braun */
    transition: .3s;
    border-radius: 22px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.6); /* Sieht aus wie in den Rahmen eingelassen */
    border: 1px solid #332a15;
}

/* Der Knopf selbst (Beige) */
.theme-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #e9e3d7;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5); /* Wirft einen leichten Schatten */
}

/* Wenn der Regler AN (checked) ist -> Wird Kaiser-Grün */
input:checked + .theme-slider {
    background-color: #6c9924;
}

/* Der Knopf rutscht nach rechts und wird weißer, wenn AN */
input:checked + .theme-slider:before {
    transform: translateX(22px);
    background-color: #ffffff;
}

/* --- Zusammenfassungs-Zeile (Gesamt) & Kompaktmodus --- */
/* (Dieser Teil bleibt exakt wie in meiner vorherigen Antwort) */
.summary-row td {
    border-top: 1px solid #c7b9a6;
    background-color: #f6f3eb;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.resource-group {
    border-bottom: 15px solid transparent;
}

.compact-view .detail-row {
    display: none;
}

.compact-view .summary-row td {
    border-top: none;
    background-color: transparent;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.compact-view .resource-group {
    border-bottom: 2px solid #e6decb;
}
.compact-view .resource-group:last-child {
    border-bottom: none;
}
