/* =================================== */
/* GENERELLER STYLE           */
/* =================================== */
/* Globale Regel, um Breitenberechnungen zu vereinfachen */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding-top: 70px; /* Platz für die feste Navbar */
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

a {
    color: #bb86fc;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #a362fa;
}

/* =================================== */
/* NAVIGATION                 */
/* =================================== */
.navbar {
    background-color: #1f1f1f;
    border-bottom: 1px solid #333;
    padding: 0 20px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.navbar-links a {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 1em;
}

.search-form {
    display: flex;
}

.search-form input[type="search"] {
    background-color: #333;
    border: 1px solid #555;
    border-radius: 5px 0 0 5px;
    color: #fff;
    padding: 8px 12px;
    width: 300px;
}

.search-form button {
    background-color: #bb86fc;
    border: none;
    border-radius: 0 5px 5px 0;
    color: #000;
    padding: 8px 12px;
    cursor: pointer;
}

.profile-area {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 55px;
    background-color: #2c2c2c;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-content a {
    color: #e0e0e0;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #444;
}

.show {
    display: block;
}

/* =================================== */
/* BUTTONS & FORMULARE        */
/* =================================== */
.btn {
    display: inline-block;
    background-color: #bb86fc;
    color: #121212;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #a362fa;
}

.btn-danger {
    background-color: #cf6679;
}

.btn-danger:hover {
    background-color: #b0495a;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 5px;
    color: #e0e0e0;
}

/* =================================== */
/* SPEZIFISCHE ELEMENTE       */
/* =================================== */
.hack-list .hack-item {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #bb86fc;
}

.hack-item h2 {
    margin-top: 0;
}

.sticky-search-bar {
    position: sticky;
    top: 70px;
    background-color: #1e1e1e;
    padding: 20px 0;
    z-index: 900;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.sticky-search-bar .search-form {
    width: 100%;
    margin-top: 10px;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.thumbnail-grid .gallery-item img,
.thumbnail-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s;
    cursor: pointer;
}

.thumbnail-grid .gallery-item img:hover {
    transform: scale(1.05);
}

.thumbnail-item {
    position: relative;
}

.thumbnail-item .btn-danger {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 2px 8px;
    font-size: 0.8em;
}

/* =================================== */
/* BEWERTUNGEN & KOMMENTARE     */
/* =================================== */
.reviews-section {
    margin-top: 40px;
    border-top: 1px solid #444;
    padding-top: 20px;
}

.average-rating-display {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.average-rating-display .avg-rating-number {
    font-size: 3em;
    font-weight: bold;
    color: #fff;
}

.average-rating-display .total-reviews {
    color: #aaa;
}

/* Das neue, einfache Sterne-System */
.star-rating-input {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.star-rating-input .star {
    font-size: 2.5em;
    color: #555;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating-input .star.hover,
.star-rating-input .star.selected {
    color: #bb86fc;
}

.review-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.review-item:last-child {
    border-bottom: none;
}

.review-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.review-content strong {
    color: #fff;
}

.review-content .review-meta {
    font-size: 0.8em;
    color: #aaa;
}

.review-content p {
    margin-top: 5px;
}

.star-rating-display {
    color: #bb86fc;
}

.star-rating-display .star-gray {
    color: #555;
}

/* =================================== */
/* RESPONSIVE DESIGN (MOBILE)     */
/* =================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 2rem;
        height: 2rem;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10;
    }

    .hamburger span {
        width: 2rem;
        height: 0.25rem;
        background: #e0e0e0;
        border-radius: 10px;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        background-color: #1f1f1f;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        border-top: 1px solid #333;
    }

    .navbar-links.active {
        display: flex;
    }

    .navbar-links .search-form,
    .sticky-search-bar .search-form {
        width: 100%;
        padding: 0 20px;
    }
    
    .navbar-links .search-form input[type="search"],
    .sticky-search-bar .search-form input[type="search"] {
        width: 100%;
    }

    .navbar-links .profile-area {
        flex-direction: column;
        gap: 20px;
    }
    
    .profile-area .btn {
        width: 90%;
        text-align: center;
    }

    .container div[style*="flex"] {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
}
