/* vote.craftvalley.de — übernimmt den Stil von craftvalley.de:
   #1a1a1a-Grund, Manrope, Karten als 160deg-Verlauf mit Grün-Hover.
   Navigation/Footer/Cookie-Styles kommen aus craftvalley.de/css/common.css. */

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

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== Section ===== */

.vote-section {
    padding: 150px 50px 100px 50px;
    /* Minecraft-Art der Startseite oben, weich nach #1a1a1a auslaufend */
    background:
        linear-gradient(180deg,
            rgba(26, 26, 26, 0.72) 0%,
            rgba(26, 26, 26, 0.88) 38%,
            #1a1a1a 72%),
        url('https://craftvalley.de/images/home-community-bg.jpg') top center / cover no-repeat,
        #1a1a1a;
    min-height: 100vh;
}

.vote-container {
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-size: 56px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.section-subtitle {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    margin-bottom: 45px;
}

/* ===== Schritt-Flow: Elemente blenden weich ein ===== */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-platform:not([hidden]),
#voteArea:not([hidden]) {
    animation: fadeUp 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
    .step-platform:not([hidden]),
    #voteArea:not([hidden]) { animation: none; }
}

/* ===== Identitäts-Box ===== */

.vote-ident-box {
    background: linear-gradient(160deg, #242424 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 35px;
    transition: all 0.3s ease;
}

.vote-ident-box:hover {
    border-color: rgba(126, 211, 33, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.ident-grid {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* --- Minecraft-Kopf --- */

.ident-avatar {
    flex: 0 0 auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    line-height: 0;
    transition: all 0.35s ease;
}

.ident-avatar img {
    width: 110px;
    height: 110px;
    border-radius: 10px;
    image-rendering: pixelated;
    transition: opacity 0.2s ease;
}

.ident-avatar.is-ready {
    border-color: rgba(126, 211, 33, 0.7);
    box-shadow: 0 0 26px rgba(126, 211, 33, 0.25);
}

.ident-form { flex: 1 1 auto; min-width: 0; }

.ident-field { margin-bottom: 16px; }
.ident-field:last-of-type { margin-bottom: 0; }

.ident-field label,
.ident-field .ident-label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.ident-field label i,
.ident-field .ident-label i {
    color: #7ed321;
    margin-right: 7px;
}

#mcname {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.25s ease;
}

#mcname::placeholder { color: rgba(255, 255, 255, 0.3); font-weight: 400; }

#mcname:focus {
    outline: none;
    border-color: rgba(126, 211, 33, 0.6);
    box-shadow: 0 0 0 3px rgba(126, 211, 33, 0.12);
}

/* --- Plattform-Umschalter (Block-Icons von craftvalley.de) --- */

.platform { display: flex; gap: 12px; }

.plat {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 15px 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.plat img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: grayscale(0.7) opacity(0.55);
    transition: all 0.25s ease;
}

.plat:hover {
    color: #ffffff;
    border-color: rgba(126, 211, 33, 0.45);
    background: rgba(0, 0, 0, 0.4);
}
.plat:hover img { filter: none; transform: scale(1.08); }

.plat.is-active {
    color: #ffffff;
    background: linear-gradient(160deg, rgba(126, 211, 33, 0.16) 0%, rgba(126, 211, 33, 0.06) 100%);
    border-color: rgba(126, 211, 33, 0.8);
    box-shadow: 0 0 18px rgba(126, 211, 33, 0.18);
}

.plat.is-active img { filter: none; transform: scale(1.1); }

/* Haken-Badge — gleicher Stil wie an den erledigten Vote-Karten */
.plat.is-active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 21px;
    height: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #7ed321;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ident-hint {
    min-height: 22px;
    margin-top: 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.ident-hint.is-error { color: #f5a623; }

.linklike {
    font-family: inherit;
    font-size: 13px;
    color: #7ed321;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.mini-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mini-btn:hover { color: #ffffff; border-color: rgba(126, 211, 33, 0.4); }

/* ===== Fortschritt ===== */

.vote-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.progress-track {
    flex: 1 1 auto;
    height: 10px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #5fb814 0%, #7ed321 100%);
    border-radius: 999px;
    transition: width 0.45s ease;
}

.progress-label {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

/* ===== Vote-Liste ===== */

.vote-list { display: grid; gap: 16px; }

.vote-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(160deg, #242424 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 22px 25px;
    transition: all 0.3s ease;
}

.vote-item:hover {
    border-color: rgba(126, 211, 33, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.vote-item.is-cooldown { opacity: 0.6; }
.vote-item.is-cooldown:hover { transform: none; }

/* --- Favicon-Kachel mit Nummern-Badge / Erledigt-Haken --- */

.vote-icon {
    position: relative;
    flex: 0 0 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.vote-icon img { border-radius: 6px; }

.vote-num {
    position: absolute;
    top: -9px;
    left: -9px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #4b8ca5;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.vote-item.is-cooldown .vote-num {
    background: #7ed321;
    color: #1a1a1a;
    font-size: 0;
}

.vote-item.is-cooldown .vote-num::after {
    content: '✓';
    font-size: 13px;
}

.vote-meta { flex: 1 1 auto; min-width: 0; }

.vote-name {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.vote-status, .vote-note {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.vote-status.is-ready { color: #7ed321; font-weight: 600; }
.vote-status.is-wait  { color: #f5a623; }

.vote-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 30px;
    border-radius: 10px;
    background: #7ed321;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.25s ease;
}

.vote-btn:hover {
    background: #8fe830;
    box-shadow: 0 8px 24px rgba(126, 211, 33, 0.3);
}

.vote-btn.is-disabled {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.35);
    cursor: not-allowed;
    box-shadow: none;
}

/* ===== Info-Box ===== */

.vote-info-box {
    margin-top: 40px;
    background: linear-gradient(160deg, #242424 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s ease;
}

.vote-info-box:hover {
    border-color: rgba(126, 211, 33, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.vote-info-box h3 {
    font-size: 22px;
    margin-bottom: 14px;
    color: #ffffff;
}

.vote-info-box h3 i { color: #7ed321; margin-right: 9px; }

.vote-info-box p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

/* --- Belohnungs-Kacheln --- */

.reward-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 6px 0 18px;
}

.reward-tile {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 14px;
    text-align: center;
    transition: all 0.25s ease;
}

.reward-tile:hover {
    border-color: rgba(126, 211, 33, 0.4);
    transform: translateY(-3px);
}

.reward-tile i {
    display: block;
    font-size: 26px;
    color: #7ed321;
    margin-bottom: 10px;
}

.reward-name {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
}

.reward-desc {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.reward-party {
    padding: 12px 16px;
    background: rgba(75, 140, 165, 0.12);
    border: 1px solid rgba(75, 140, 165, 0.35);
    border-radius: 10px;
    font-size: 15px !important;
}

.reward-party i { color: #f5a623; margin-right: 7px; }

.reward-fineprint {
    margin-top: 14px;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.55) !important;
}

.vote-storage-note {
    margin-top: 14px;
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

.vote-storage-note i { margin-right: 6px; }

/* ===== Votestreak-Karte (Daten vom Server, sonst unsichtbar) ===== */

.streak-card {
    background: linear-gradient(160deg, #242424 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 24px 26px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.streak-card:not([hidden]) { animation: fadeUp 0.4s ease; }

.streak-card:hover {
    border-color: rgba(126, 211, 33, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.streak-card.is-week-done {
    border-color: rgba(126, 211, 33, 0.6);
    box-shadow: 0 0 26px rgba(126, 211, 33, 0.15);
}

.streak-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.streak-flame {
    flex: 0 0 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.35);
    color: #f5a623;
    font-size: 24px;
}

.streak-headline { flex: 1 1 auto; min-width: 0; }

.streak-title {
    font-size: 21px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.streak-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
}

.streak-card.is-week-done .streak-sub { color: #7ed321; font-weight: 700; }

.streak-best {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.streak-best i { color: #f5a623; }
.streak-best strong { color: #ffffff; }

/* --- 7-Tage-Leiste --- */

.streak-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.streak-day { text-align: center; min-width: 0; }

.streak-day-box {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.25);
    font-size: 15px;
    transition: all 0.25s ease;
}

.streak-day.is-open .fa-circle { font-size: 7px; }

.streak-day.has-bonus.is-open .streak-day-box { color: rgba(245, 166, 35, 0.6); }

.streak-day.is-done .streak-day-box {
    background: linear-gradient(160deg, #7ed321 0%, #5fb814 100%);
    border-color: #7ed321;
    color: #1a1a1a;
}

.streak-day.is-today .streak-day-box {
    background: rgba(245, 166, 35, 0.16);
    border: 2px solid #f5a623;
    color: #f5a623;
    box-shadow: 0 0 14px rgba(245, 166, 35, 0.25);
}

.streak-day-label {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.streak-day.is-today .streak-day-label { color: #f5a623; }
.streak-day.is-done .streak-day-label  { color: #7ed321; }

.streak-day-bonus {
    font-size: 11px;
    line-height: 1.3;
    color: #f5a623;
    overflow-wrap: anywhere;
}

.streak-legend {
    display: none;
    margin-top: 10px;
    font-size: 12px;
    color: #f5a623;
    text-align: center;
}

.streak-rewardline {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.streak-stale {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.vote-status.is-done { color: #7ed321; }

@media (prefers-reduced-motion: reduce) {
    .streak-card:not([hidden]) { animation: none; }
}

/* ===== Mobil (Bedrock-Spieler sind fast immer am Handy) ===== */

@media (max-width: 768px) {
    .vote-section { padding: 120px 20px 70px 20px; }
    .section-title { font-size: 38px; }
    .vote-ident-box, .vote-info-box { padding: 22px; }

    .ident-grid {
        flex-direction: column;
        gap: 20px;
    }
    .ident-avatar img { width: 90px; height: 90px; }
    .ident-form { width: 100%; }

    .vote-progress { flex-direction: column; gap: 8px; align-items: stretch; }
    .progress-label { text-align: center; }

    .vote-item {
        flex-wrap: wrap;
        row-gap: 14px;
        padding: 20px;
    }
    .vote-meta { flex: 1 1 55%; }
    .vote-btn {
        flex: 1 1 100%;
        justify-content: center;
        order: 3;
    }

    .reward-grid { grid-template-columns: 1fr; }
    .reward-tile { padding: 16px 14px; }

    .streak-card { padding: 20px 16px; }
    .streak-head { flex-wrap: wrap; gap: 12px; }
    .streak-flame { flex-basis: 44px; height: 44px; font-size: 20px; }
    .streak-headline { flex: 1 1 60%; }
    .streak-title { font-size: 18px; }
    .streak-best { flex: 1 1 100%; justify-content: center; }
    .streak-week { gap: 5px; }
    .streak-day-box { height: 38px; font-size: 13px; }
    .streak-day-label { font-size: 11px; }
    .streak-day-bonus { display: none; }
    .streak-legend:not([hidden]) { display: block; }
}
