﻿/* === Globales Design === */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: visible;
    background: linear-gradient(to bottom, #000000 0%, #0a0a0a 40%, #000000 100%);
    color: white;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}

h1, .neon-title {
    font-size: 2.8rem;
    margin-top: 40px;
    color: #ff8800;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #ff8800, 0 0 20px #ff8800;
    z-index: 900;
}

.neon-text {
    max-width: 700px;
    margin: 20px auto 40px auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ffcc80;
    text-shadow: 0 0 4px #ff8800;
    z-index: 900;
}

.logo-corner {
    position: absolute;
    top: 20px;
    width: 400px;
    height: auto;
    filter: drop-shadow(0 0 8px #ff8800);
    animation: glow 3s ease-in-out infinite;
    opacity: 0.8;
    transition: transform 0.1s ease-out;
    z-index: 900;
}

    .logo-corner.left {
        left: 20px;
    }

    .logo-corner.right {
        right: 20px;
    }

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px #ff8800);
    }

    50% {
        filter: drop-shadow(0 0 25px #ff8800);
    }
}

.side-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

    .side-nav a {
        color: #ff8800;
        text-decoration: none;
        font-weight: bold;
        font-size: 1rem;
        border: 2px solid #ff8800;
        padding: 10px 16px;
        border-radius: 10px;
        background: #111;
        text-align: center;
        transition: 0.2s ease;
        box-shadow: 0 0 8px rgba(255, 136, 0, 0.3);
    }

        .side-nav a:hover {
            background-color: #ff8800;
            color: black;
            box-shadow: 0 0 15px #ff8800;
        }

/* === Spielerliste Grid === */
.player-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
    margin-left: 160px;
}

.player-card {
    background: #111;
    border: 2px solid #ff8800;
    border-radius: 16px;
    padding: 20px;
    width: 200px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.3);
}

    .player-card:hover {
        transform: scale(1.05);
        box-shadow: 0 0 20px #ff8800;
    }

    .player-card img {
        width: 200px;
        height: 200px;
        object-fit: cover !important;
        border-radius: 50%;
        margin-bottom: 15px;
        border: none;
    }

    .player-card h3 {
        color: #ff8800;
        text-shadow: 0 0 6px #ff8800;
        margin: 10px 0;
        font-size: 1.2rem;
    }

.player-class {
    color: #ffcc80;
    font-size: 1rem;
    margin: 5px 0;
    text-shadow: 0 0 3px #ff8800;
}


.select-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background: #ff8800;
    color: black;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.2s ease;
    box-shadow: 0 0 10px #ff8800;
}

    .select-button:hover {
        background: black;
        color: #ff8800;
        box-shadow: 0 0 20px #ff8800;
    }

/* === Freigeschaltete Achievements === */
.unlocked-achievements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.unlocked-achievement-card {
    position: relative;
    width: 160px;
    background: #111;
    border: 2px solid #ff8800;
    border-radius: 16px;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .unlocked-achievement-card:hover {
        transform: scale(1.05);
        box-shadow: 0 0 20px #ff8800;
    }

    .unlocked-achievement-card img {
        width: 100px;
        height: 100px;
        object-fit: contain;
        margin-bottom: 10px;
    }

.achievement-title {
    color: #ffcc80;
    font-weight: bold;
    font-size: 1rem;
    margin: 0;
    text-shadow: 0 0 4px #ff8800;
}


.remove-achievement-form {
    position: absolute;
    top: 8px;
    right: 8px;
}

.remove-button {
    background: transparent;
    border: none;
    color: #ff4444;
    font-size: 1rem;
    cursor: pointer;
    text-shadow: 0 0 5px #ff4444;
}

    .remove-button:hover {
        color: white;
        text-shadow: 0 0 10px red;
    }
    

.main-content {
    position: relative;
    z-index: 900;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}

.player-details-card {
    max-width: 500px;
    margin: 120px auto;
    padding: 30px;
    background: #111;
    border: 2px solid #ff8800;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

    .player-details-card img {
        width: 150px;
        height: 150px;
        object-fit: cover;
        border-radius: 50%;
        box-shadow: 0 0 15px #ff8800;
    }

    .player-details-card p {
        margin: 6px 0;
        font-size: 1.1rem;
        color: #ffcc80;
        text-shadow: 0 0 4px #ff8800;
    }

.card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 30px;
}

.card {
    background: #111;
    border: 2px solid #ff8800;
    border-radius: 16px;
    padding: 20px;
    width: 200px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.3);
}

    .card:hover {
        transform: scale(1.05);
        box-shadow: 0 0 20px #ff8800;
    }

    .card img {
        width: 100px;
        height: 100px;
        object-fit: contain;
        margin-bottom: 10px;
    }

.card-title {
    color: #ffcc80;
    font-weight: bold;
    font-size: 1rem;
    margin: 0;
    text-shadow: 0 0 4px #ff8800;
}

.flip-card {
    width: 200px;
    height: 260px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .flip-card:hover {
        transform: scale(1.05);
        box-shadow: 0 0 20px #ff8800, 0 0 40px #ff8800;
    }

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    background-color: #111;
    color: #ff8800;
    box-shadow: 0 0 12px rgba(255, 136, 0, 0.4);
    padding: 20px;
    box-sizing: border-box;
}

.flip-card-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .flip-card-front img {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }

    .flip-card-front h3 {
        margin: 0;
        font-size: 1rem;
        color: #ffcc80;
        text-shadow: 0 0 5px #ff8800;
    }

.flip-card-back {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    font-size: 0.9rem;
    line-height: 1.3rem;
    background-color: #222;
    color: #ffcc80;
}

.flip-card.challenge-card .flip-card-front,
.flip-card.challenge-card .flip-card-back {
    background-color: #220000;
    border: 2px solid #ff4444;
    color: #ff9999;
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.6);
}

.flip-card.challenge-card:hover {
    box-shadow: 0 0 20px #ff4444, 0 0 40px #ff4444;
}

.add-achievement-section {
    margin-top: 40px;
    text-align: center;
}

.add-achievement-form label {
    color: #ffcc80;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 0 0 4px #ff8800;
    display: block;
    margin-bottom: 10px;
}

.add-achievement-form .input-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.add-achievement-form select {
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #ff8800;
    background: black;
    color: #ffcc80;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    box-shadow: 0 0 5px rgba(255, 136, 0, 0.4);
}

.add-achievement-form button {
    padding: 10px 16px;
    background: #ff8800;
    color: black;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 0 10px #ff8800;
    font-family: 'Orbitron', sans-serif;
}

    .add-achievement-form button:hover {
        background: black;
        color: #ff8800;
        box-shadow: 0 0 20px #ff8800;
    }

.section-title {
    margin-top: 50px;
    font-size: 1.6rem;
    color: #ffcc80;
    text-shadow: 0 0 6px #ff8800;
    font-weight: bold;
}

.player-form {
    max-width: 400px;
    margin: 100px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px;
    background: #111;
    border: 2px solid #ff8800;
    border-radius: 16px;
    box-shadow: 0 0 15px rgba(255, 136, 0, 0.4);
    z-index: 1;
}

    .player-form label {
        font-weight: bold;
        color: #ffcc80;
        font-size: 1.1rem;
        text-align: left;
        text-shadow: 0 0 4px #ff8800;
    }

    .player-form input {
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #ff8800;
        background: black;
        color: #ffcc80;
        font-family: 'Orbitron', sans-serif;
        box-shadow: 0 0 5px rgba(255, 136, 0, 0.4);
    }

    .player-form button {
        margin-top: 10px;
        padding: 12px;
        background: #ff8800;
        border: none;
        border-radius: 10px;
        color: black;
        font-weight: bold;
        font-size: 1rem;
        cursor: pointer;
        transition: 0.2s ease;
        box-shadow: 0 0 10px #ff8800;
        font-family: 'Orbitron', sans-serif;
    }

        .player-form button:hover {
            background: black;
            color: #ff8800;
            box-shadow: 0 0 20px #ff8800;
        }

.delete-button {
    background-color: #ff4444;
    color: white;
    font-weight: bold;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: 0.2s ease;
    box-shadow: 0 0 10px #ff4444;
}

    .delete-button:hover {
        background-color: black;
        color: #ff4444;
        box-shadow: 0 0 15px red;
    }

.side-nav-button {
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    border: 2px solid #ff8800;
    padding: 10px 16px;
    border-radius: 10px;
    background: #111;
    color: #ff8800;
    text-align: center;
    transition: 0.2s ease;
    box-shadow: 0 0 8px rgba(255, 136, 0, 0.3);
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
}

    .side-nav-button:hover {
        background-color: #ff8800;
        color: black;
        box-shadow: 0 0 15px #ff8800;
    }

/* Optional – leicht andere Farbe für delete */
.delete-nav-button {
    border-color: #ff4444;
    color: #ff4444;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

    .delete-nav-button:hover {
        background-color: #ff4444;
        color: black;
        box-shadow: 0 0 15px #ff4444;
    }

.delete-button {
    background-color: #ff4444;
    color: white;
    font-weight: bold;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: 0.2s ease;
    box-shadow: 0 0 10px #ff4444;
}

    .delete-button:hover {
        background-color: black;
        color: #ff4444;
        box-shadow: 0 0 15px red;
    }

.player-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

    .player-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
        border: solid 5px gold;
        box-shadow: 0 0 10px orange;
        display: block;
    }

.character-sheet {
    position: relative;
    max-width: 900px;
    margin: 10px auto;
    padding: 30px;
    background: #111;
    border: 2px solid #ff8800;
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(255, 136, 0, 0.4);
    font-family: 'Orbitron', sans-serif;
    color: #ffcc80;
}

.char-header {
    display: flex;
    flex-wrap: wrap; /* für kleinere Bildschirme flexibler */
    justify-content: flex-start;
    align-items: flex-start;
    gap: 40px;
}


.char-left {
    flex: 0 0 auto; /* Avatar bleibt fix */
    display: flex;
    flex-direction: column;
    align-items: center; /* Bild und Tokens zentrieren */
    gap: 10px;
}


.char-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}



.char-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid gold;
    box-shadow: 0 0  10px orange;
}


.property-pill {
    display: grid;
    grid-template-columns: auto 1fr; /* Icon links, Text rechts */
    align-items: center;
    gap: 10px;
    background-color: #1a1a1a;
    border: 1px solid #ff8800;
    border-radius: 20px;
    padding: 8px 14px;
    color: #ffcc80;
    font-size: 1rem;
    box-shadow: 0 0 8px rgba(255, 136, 0, 0.4);
    text-shadow: 0 0 3px #ff8800;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 10px;
    max-width: 300px;
    word-break: break-word;
    overflow-wrap: break-word;
    position: relative;
}

.custom-tooltip {
    visibility: hidden;
    opacity: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: #ffcc80;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid #ff8800;
    border-radius: 12px;
    position: absolute;
    top: 50%;
    left: 110%; /* Rechts neben der Pill */
    transform: translateY(-50%);
    transition: opacity 0.3s, left 0.3s;
    white-space: normal;
    width: 220px;
    z-index: 20;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.6);
    pointer-events: none;
}

.property-pill:hover .custom-tooltip {
    visibility: visible;
    opacity: 1;
    left: 115%; /* Kleines "Move-In" beim Hover */
}


.char-properties-clean {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 5px; /* 💨 Abstand nach dem Avatar */
}

.prop-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.edit-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 16px;
    background-color: #ff8800;
    color: black;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 0 10px #ff8800;
    transition: 0.2s ease;
    font-family: 'Orbitron', sans-serif;
}

    .edit-button:hover {
        background-color: black;
        color: #ff8800;
        box-shadow: 0 0 15px #ff8800;
    }

.xp-bar-container {
    margin-top: 20px;
    text-align: center;
}

.xp-bar {
    width: 80%;
    height: 24px;
    background: #222;
    border: 2px solid #ff8800;
    border-radius: 12px;
    margin: 10px auto;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 136, 0, 0.4);
    position: relative;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff8800 0%, #ffaa00 50%, #ff8800 100%);
    box-shadow: 0 0 15px #ff8800, 0 0 25px #ff8800 inset;
    transition: width 0.8s ease-in-out;
}

.xp-text {
    margin-top: 8px;
    font-size: 1rem;
    color: #ffcc80;
    text-shadow: 0 0 4px #ff8800;
}

.token-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    background: #111;
    padding: 8px 14px;
    border: 2px solid #ff8800;
    border-radius: 30px;
    box-shadow: 0 0 12px rgba(255, 136, 0, 0.6);
    font-size: 1rem;
    color: #ffcc80;
    text-shadow: 0 0 4px #ff8800;
    z-index: 5;
}

    .token-badge:hover {
        transform: scale(1.05);
        box-shadow: 0 0 20px #ff8800;
    }

.token-icon {
    width: 30px;
    height: 30px;
    margin-right: 8px;
}

.token-count {
    font-weight: bold;
    font-size: 1.1rem;
}

.char-meta > h2 {
    font-size: 2.5rem;
    color: #ff8800;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #ff8800, 0 0 10px #ff8800, 0 0 20px #ff6600, 0 0 30px #ff6600;
    animation: neonPulse 2s infinite alternate;
}

@keyframes neonPulse {
    from {
        text-shadow: 0 0 5px #ff8800, 0 0 10px #ff8800, 0 0 20px #ff6600, 0 0 30px #ff6600;
    }

    to {
        text-shadow: 0 0 10px #ff8800, 0 0 20px #ff8800, 0 0 30px #ff6600, 0 0 40px #ff6600;
    }
}


.player-name-box {
    padding: 8px 16px; /* Weniger Padding */
    border: 2px solid #ff8800;
    border-radius: 12px;
    display: inline-block;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 12px #ff8800;
    margin-bottom: 10px;

    max-width: 300px; /* Begrenzung der maximalen Breite */
    word-break: break-word; /* Falls der Name zu lang ist */
    text-align: center; /* Text bleibt schön zentriert */
}


    .player-name-box h2 {
        font-size: 2rem;
        color: #ff8800;
        margin: 0;
        font-weight: bolder;
    }

.meta-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 1px;
    gap: 1px;
}

.meta-line {
    display: flex;
    align-items: center;
    gap: 1px;
}

.meta-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.meta-label {
    font-weight: bold;
    color: #ff8800;
    text-shadow: 0 0 4px #ff8800;
    margin-right: 6px;
    font-size: 1.2rem;
}

.meta-value {
    color: #ffcc80;
}



.achievements-section .section-title {
    text-align: center;
    margin-bottom: 20px;
    flex: 1;
    min-width: 300px;
    margin-top: 20px;
    text-align: left;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 12px;
    border: 2px dashed #ff8800;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.3);
}

.unlocked-achievements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.unlocked-achievement-card.small {
    width: 100px;
    background: #111;
    border: 2px solid #ff8800;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.3);
    text-align: center;
}

    .unlocked-achievement-card.small img {
        width: 60px;
        height: 60px;
        object-fit: contain;
        margin-bottom: 5px;
    }

    .unlocked-achievement-card.small p {
        font-size: 0.8rem;
        color: #ffcc80;
        text-shadow: 0 0 3px #ff8800;
    }

.add-achievement-form {
    margin-top: 10px;
}

.char-left {
    flex-shrink: 1;
}

.add-achievement-form select, 
.add-achievement-form button {
    width: auto;
}

.avatar-name-wrapper {
    display: flex;
    align-items: center;
    gap: 20px; /* Abstand zwischen Bild und Name */
}
