﻿/* Grundlegende Stile */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: #fff;
    color: #333;
}

/* Header-Stile */
header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
}

.banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 30px 0 30px 0px;
    cursor: pointer;
    transition: 1.5s filter;
}

.banner:hover {
    filter: grayscale(1);
}

.banner::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: -6px;
    right: -6px;
    background: url(assets/images/web.png) no-repeat center/cover;
    filter: blur(3px) contrast(1.1);
    z-index: 1;
}

.banner img {
    width: 100%;
}

.logo {
    flex-basis: 100%;
    text-align: center;
    margin: 28px 0;
}

.logo img {
    height: 100px;
    margin-right: 20px;
    position: absolute;
    top: 0px;
    left: 94px;
    -moz-user-select: none; 
    -webkit-user-select: none; 
    user-select: none; 
    -webkit-user-drag: none; 
    user-drag: none;
}

.profile-menu {
    position: absolute;
    right: 10px;
    top: 10px;
}

.logo h1 {
    color: #ffa500;
    margin: 0;
    text-shadow: 1px 1px 2px black;
    user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
}

.profile-menu {
    position: absolute;
    right: 6%;
    top: 28px;
}

.profile-pic {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    border: 2px solid #ffa500;
    cursor: pointer;
}

ul.dropdown {
    min-width: 206px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 30;
    border-radius: 8px;
    border: 1px solid #d3a008;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #e7e7e7;
}

.dropdown-content a:hover {
    background-color: #ffa500;
    color: #fff;
    border-radius: 5px;
}

.profile-menu:hover .dropdown-content, .profile-menu:focus .dropdown-content, .profile-menu:active .dropdown-content {
    display: block;
}

#news, #updates, #events {
    padding: 20px 4%;
    float: none;
}
#news h2, #updates h2, #events h2 {
    color: #333;
}

/* Footer-Stile */
footer {
    background-color: #f2f2f2;
    color: #333;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Menüleisten-Stile */
nav.main-menu {
    width: 100%;
}

nav.main-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav.main-menu li {
    position: relative;
    padding: 10px;
}

nav.main-menu li a {
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    display: block;
}

nav.main-menu ul li:hover > a {
    background-color: #ffa500;
    color: white;
}

nav.main-menu .dropdown {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
}

.dropdown li a {
    padding: 10px 15px;
    display: block;
    color: #333;
}

nav.main-menu li:hover .dropdown {
    display: block;
}

main.logReg, main.inGame {
    min-height: 72vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

main {
    min-height: 66vh;
}

section#register, section#login {
    max-width: 484px;
    width: 100%; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 10px;
    box-sizing: border-box; 
    height: fit-content;
}

.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
}

.form-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

input[type="text"],
input[type="password"],
input[type="submit"] {
    width: calc(100% - 20px);
    margin-bottom: 1rem;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

input[type="submit"] {
    background-color: #ffa500;
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
}

input[type="submit"]:hover {
    background-color: #e69500;
}

.error {
    color: red;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* INGAME */

.inGame > p {
    font-size: 2em;
}

/* Hauptstil */
.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
}

/* Kartenstil */
.card {
    background-color: #f0f0f0;
    border-radius: 20px;
    padding: 30px;
    min-width: 352px;
    border: 1px solid lightgray;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    margin: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
}

.card-header {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 24px;
}

.card-content p {
    margin: 10px 0;
    color: #333;
}

.card-content p strong {
    color: #000;
}

/* Inventargitter */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 15px;
}

/* Inventargegenstand */
.inventory-item {
    background-color: #ffffff;
    border-radius: 10px; 
    padding: 20px; 
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border: none; 
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.1);
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    gap: 10px; 
}

.inventory-item:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15); 
}

.inventory-item p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
    max-width: 100%;
    line-height: 26px;
}

.player-data {
    min-width: 80%;
}

.userSpez {
    min-width: 428px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

/* ADMIN */

main.main-content.admin {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    min-height: 72vh;
}

.user-list {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    background-color: #fff;
    max-width: 600px;
}

  .user-list th,
  .user-list td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    transition: 1s all;
  }

  .user-list th {
    background-color: #f4a713;
    color: #fff;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
  }

  .user-list tr:last-child td {
    border-bottom: none;
  }

  .user-list tr:hover {
    background-color: #f5f5f5;
  }

.user-list td[contenteditable="true"]:hover {
    background-color: #ffb553;
    color: black;
    outline: none;
}

select.dropBox {
    width: 100%;
    height: 47px;
    border-radius: 5px;
    margin-bottom: 16px;
    padding: 5px;
    border-color: #a96d00;
}

/* NEWS */

/* Aktualisierte Styles mit CSS Grid */
.newsArticle {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Container für jede Zeile mit zwei Artikeln */
.news-row {
    display: flex;
    gap: 20px;
}

/* Stil für jeden Artikel */
.news-post {
    flex: 1;
    border: 1px solid lightgray;
    padding: 28px;
    transition: 0.8s all;
    background-color: #fff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Hover-Effekt für Artikel */
.news-post:hover {
    border-color: #ff9900;
    background: #ff9900AA;
}

/* Überschrift des Artikels */
.news-post h3 {
    font-size: 2em;
}

/* Inhalt des Artikels */
.news-post p {
    font-size: 1.3em;
    flex-grow: 1;
}

/* Datum des Artikels */
.news-post time {
    font-size: 0.8em;
    text-align: right;
}

textarea {
    width: 97%;
    border: 1px solid lightgray;
    padding: 10px;
    border-radius: 5px;
    height: 140px;
}

button {
    margin-top: 12px;
    width: 100%;
    height: 50px;
    border-radius: 10px;
    background: white;
    border: 2px solid #d98f07;
    transition: 1.5s all;
    cursor: pointer;
}

button:hover {
    border: 2px solid white;
    background: #d98f07;
}

/* 3D LOGO */
#container3D {
    max-height: 0vh;
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-menu {
        align-self: flex-end;
        margin-top: 10px;
    }

    .logo {
        margin: 10px 0;
        display: flex;
        flex-basis: auto;
        align-items: center;
        flex-direction: column;
        align-content: center;
        justify-content: center;
    }

    .banner::before {
        background: url(assets/images/handy_web.png) no-repeat center/cover;
    }

    .logo img {
        margin-right: 0px !important;
        position: relative;
        left: 0px !important;
    }

    .logo h1 {
        font-size: 1.4em;
        margin: 54px 0;
        margin-top: 0px;
    }

    .profile-menu {
        position: relative;
        top: 16px;
        left: 44.5%;
        right: 0 !important;
        align-self: center;
        margin-top: 10px;
        margin-bottom: 50px;
        width: 44px;
    }

    .dropdown-content {
        right: 0;
        left: -60px;
    }

    .player-data, .userSpez {
        min-width: 0px;
        width: 100% !important;
    }

    .newsArticle {
        grid-template-columns: 1fr;
    }

    .news-row {
        flex-direction: column;
    }

    article.news-post {
        width: 100%;
        margin-top: 20px;
    }

    nav.main-menu ul {
        flex-direction: column;
    }

    nav.main-menu li {
        text-align: center;
    }

    .main-content, .userSpez, .player-data {
        flex-direction: column; 
        align-items: center;
    }

    .inventory-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .card, .user-list, section#register, section#login, .form-container {
        width: 82%;
        min-width: 0;
        margin: 10px 0;
    }

    main.logReg, main.inGame {
        min-height: 72vh;
        display: flex;
        justify-content: center;
    }
}
