/* Bootstrap Integration & Global Styles */
* {
    box-sizing: border-box;
}

/* Touch optimization for mobile */
@media (hover: none) and (pointer: coarse) {
    button, a, .game-thumbnail, .avatar-option {
        -webkit-tap-highlight-color: rgba(255, 255, 0, 0.2);
    }
}

/* Improve Bootstrap button integration */
.btn {
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Responsive utilities */
.text-truncate-mobile {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #89CFF0 0%, #5BA3D0 100%);
    color: #2c3e50;
    display: grid;
    grid-template-columns: 150px 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: 
        "header header"
        "sidebar main"
        "sidebar footer";
    min-height: 100vh;
    margin:0;
    overflow-x: hidden;
}

header {
    grid-area: header;
    background-image: url('/public/images/header_600x.gif?v=2');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: #001b1a;
    color: rgb(255, 255, 255);
    padding: 0;
    flex-direction: column;
    text-align: center;
    min-height: 150px;
    height: auto;
    padding-top: clamp(80px, 12vw, 180px);
    overflow: visible;
    width: 100%;
}

main {
    grid-area: main;
    padding: 20px;
    overflow-x: hidden;
}

footer {
    grid-area: footer;
    background: linear-gradient(180deg, #8B4513 0%, #6D3410 100%);
    color: white;
    padding: 8px 10px;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* Footer ausblenden beim Spielen */
body.in-game footer {
    display: none;
}

#sidebar {
    grid-area: sidebar;
    background: linear-gradient(180deg, #4CAF50 0%, #45a049 100%);
    padding: 20px;
    color: white;
    height: 100%;
    width: 150px;
    min-width: 150px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

/* Hamburger Menu Button - hidden on desktop */
#menu-toggle,
.menu-toggle {
    display: none !important;
    position: absolute;
    left: 10px;
    top: 10px;
    background: linear-gradient(180deg, #4CAF50 0%, #45a049 100%);
    border: 2px solid #ffff00;
    border-radius: 8px;
    color: white;
    font-size: 24px;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 1600;
    line-height: 1;
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: linear-gradient(180deg, #66bb6a 0%, #4CAF50 100%);
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* Zeige Hamburger nur auf Mobile */
@media (max-width: 768px) {
    #menu-toggle,
    .menu-toggle {
        display: block !important;
    }
}

/* Verstecke Hamburger explizit auf Desktop */
@media (min-width: 769px) {
    #menu-toggle,
    .menu-toggle {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Header Controls - Desktop positioning */
#logged-in-controls,
#not-logged-in-controls {
    position: absolute;
    top: 10px;
    right: 20px;
    display: none;
}

#sidebar ul {
    list-style-type: none;
    padding: 0;
}

#sidebar ul li a {
    text-decoration: none;
    color: white;
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s, color 0.3s;
}

#sidebar ul li a:hover {
    background-color: #66bb6a;
    color: #FFD700;
}

#drawingCanvas {
    border: 2px solid #000;
    background-color: #fff;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
}

.game-thumbnail {
    width: 200px;
    height: auto;
    cursor: pointer;
    border: 2px solid #000;
    margin: 10px;
    transition: transform 0.2s;
    border-radius: 50%;
}

.game-thumbnail:hover {
    transform: scale(1.05);
    border-color: #FFD700;
    box-shadow: 0 0 15px #FFD700;
}

/* Netflix-Style Games Carousel */
.games-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffff00;
    margin-bottom: 15px;
    padding-left: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.games-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.carousel-nav {
    position: absolute;
    top: 70px;
    height: 140px;
    width: 80px;
    z-index: 100;
    cursor: pointer;
    background: transparent;
    transition: background 0.3s;
    border-radius: 8px;
}

.carousel-nav:hover {
    opacity: 1;
}

.carousel-nav-left {
    left: 20px;
}

.carousel-nav-left:hover {
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

.carousel-nav-right {
    right: 20px;
}

.carousel-nav-right:hover {
    background: linear-gradient(to left, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

.carousel-nav-left:after {
    content: '‹';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}

.carousel-nav-right:after {
    content: '›';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}

.games-carousel-wrapper:hover .carousel-nav:after {
    opacity: 1;
}

.carousel-nav:hover:after {
    opacity: 1;
}

.row {
    overflow: hidden;
    width: 100%;
    padding: 0 20px;
}

.row__inner {
    transition: 450ms transform;
    font-size: 0;
    white-space: nowrap;
    margin: 70px 0;
    padding-bottom: 10px;
    transform: translate3d(0, 0, 0);
}

.tile {
    position: relative;
    display: inline-block;
    width: 250px;
    height: 140px;
    margin-right: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: 450ms all;
    transform-origin: center left;
}

.tile__img {
    width: 250px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.tile__details {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    font-size: 10px;
    opacity: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    transition: 450ms opacity;
}

.tile__details:after,
.tile__details:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
}

.tile__details:after {
    margin-top: -25px;
    margin-left: -25px;
    width: 50px;
    height: 50px;
    border: 3px solid #ecf0f1;
    line-height: 50px;
    text-align: center;
    border-radius: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.tile__details:before {
    content: '▶';
    left: 50%;
    top: 50%;
    font-size: 30px;
    transform: translate(-45%, -50%);
    z-index: 2;
    color: #ecf0f1;
}

.tile:hover .tile__details {
    opacity: 1;
}

.tile__title {
    position: absolute;
    bottom: 0;
    padding: 10px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Hover effects */
.row__inner:hover {
    transform: translate3d(-62.5px, 0, 0);
}

.row__inner:hover .tile {
    opacity: 0.3;
}

.row__inner:hover .tile:hover {
    transform: scale(1.5);
    opacity: 1;
}

.tile:hover ~ .tile {
    transform: translate3d(125px, 0, 0);
}

/* Gallery Slideshow */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.slideshow-container {
    position: relative;
    background-color: #302d2d;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slideshow-main {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
}

.slideshow-info {
    margin-top: 20px;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 48px;
    width: 60px;
    height: 80px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 10;
}

.slideshow-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.slideshow-prev {
    left: 10px;
}

.slideshow-next {
    right: 10px;
}

/* Gallery Thumbnails Row */
.gallery-thumbnails-wrapper {
    margin-top: 30px;
    position: relative;
}

.gallery-thumbnails-wrapper .carousel-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 100;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-thumbnails-wrapper .carousel-nav:hover {
    opacity: 1;
}

.gallery-thumbnails-wrapper .carousel-nav-left {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
}

.gallery-thumbnails-wrapper .carousel-nav-right {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
}

.gallery-thumbnails-wrapper .carousel-nav-left:after {
    content: '‹';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: white;
    font-weight: bold;
}

.gallery-thumbnails-wrapper .carousel-nav-right:after {
    content: '›';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: white;
    font-weight: bold;
}

/* ─── Home Cards (Bild des Monats + Quizionnaire) ─────────────────────────── */
/* ─── Announcements ────────────────────────────────────────────────────────── */
.announcement-card {
    background: linear-gradient(160deg, #1a5c5a 0%, #0e3d3b 100%);
    border: 2px solid;
    border-radius: 14px;
    padding: 22px 20px;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.announcement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.announcement-card.color-green {
    border-color: rgba(42, 209, 75, 0.5);
    background: linear-gradient(160deg, rgba(42, 209, 75, 0.15) 0%, rgba(42, 209, 75, 0.05) 100%);
}

.announcement-card.color-yellow {
    border-color: rgba(255, 193, 7, 0.5);
    background: linear-gradient(160deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.05) 100%);
}

.announcement-card.color-red {
    border-color: rgba(244, 67, 54, 0.5);
    background: linear-gradient(160deg, rgba(244, 67, 54, 0.15) 0%, rgba(244, 67, 54, 0.05) 100%);
}

.announcement-card.color-purple {
    border-color: rgba(156, 39, 176, 0.5);
    background: linear-gradient(160deg, rgba(156, 39, 176, 0.15) 0%, rgba(156, 39, 176, 0.05) 100%);
}

.announcement-card h3 {
    color: #ffff00;
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.announcement-card p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.announcement-card a {
    color: #2ad14b;
    text-decoration: underline;
}

.announcement-card a:hover {
    color: #3ef065;
}

.announcement-card img {
    max-width: 100%;
    max-height: 350px;
    border-radius: 10px;
    margin-top: 15px;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.home-card {
    background: linear-gradient(160deg, #1a5c5a 0%, #0e3d3b 100%);
    border: 2px solid rgba(255, 255, 0, 0.35);
    border-radius: 14px;
    padding: 22px 20px;
    height: 100%;
    color: white;
}

.home-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 0, 0.2);
    padding-bottom: 10px;
}

.home-card__icon {
    font-size: 28px;
    line-height: 1;
}

.home-card__title {
    margin: 0;
    font-size: 1.3rem;
    color: #ffff00;
    font-weight: 700;
    flex: 1;
}

.home-card__deadline {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0,0,0,0.25);
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}

.home-card__intro {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
}

.home-card__empty {
    text-align: center;
    color: rgba(255,255,255,0.55);
    padding: 20px 0;
    font-style: italic;
    font-size: 0.9rem;
}

.home-card__status {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    text-align: center;
}

/* Nominations grid */
.nominations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.nomination-card {
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    position: relative;
}

.nomination-card:hover {
    border-color: rgba(255,255,0,0.55);
    transform: translateY(-2px);
}

.nomination-card.voted {
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.45);
}

.nomination-card.own {
    border-color: rgba(255,200,0,0.5);
    cursor: default;
}

.nomination-card__img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
}

.nomination-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nomination-card__info {
    padding: 8px;
}

.nomination-card__user {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.nomination-card__avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.nomination-card__username {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nomination-card__title {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nomination-card__votes {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffff00;
    margin-top: 4px;
}

.nomination-card__badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #4CAF50;
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 1px 7px;
}

.nomination-card__badge.own {
    background: rgba(255,200,0,0.8);
    color: #000;
}

/* Winner display */
.home-winner {
    text-align: center;
}

.home-winner__badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #000;
    font-weight: 900;
    border-radius: 20px;
    padding: 3px 14px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.home-winner__img {
    max-width: 100%;
    max-height: 260px;
    border-radius: 10px;
    border: 3px solid gold;
    display: block;
    margin: 0 auto 14px;
    object-fit: contain;
}

.home-winner__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.home-winner__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-winner__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid gold;
    object-fit: cover;
}

.home-winner__name {
    font-weight: 700;
    color: #ffff00;
    font-size: 1rem;
}

.home-winner__subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.home-winner__votes {
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
}

.home-winner__prize {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Submit nomination button (in gallery) */
.nomination-submit-btn {
    width: 100%;
    margin-top: 6px;
    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2a43d1, #1e3299);
    color: white;
    border: 1px solid #ffff00;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nomination-submit-btn:hover { opacity: 0.85; }
.nomination-submit-btn:disabled { opacity: 0.45; cursor: default; }

/* Withdraw nomination button (red) */
.nomination-withdraw-btn {
    width: 100%;
    margin-top: 6px;
    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nomination-withdraw-btn:hover { opacity: 0.85; }

/* Replace nomination button (orange) */
.nomination-replace-btn {
    width: 100%;
    margin-top: 6px;
    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: 1px solid #ffe0b2;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nomination-replace-btn:hover { opacity: 0.85; }

/* Survey Slide-In Panel */
.survey-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(33vw, 520px);
    min-width: 320px;
    max-width: 100%;
    background: linear-gradient(180deg, #4CAF50 0%, #45a049 100%);
    border-left: 3px solid #ffff00;
    box-shadow: -12px 0 24px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    z-index: 1400;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.survey-panel.visible {
    transform: translateX(0);
}

.survey-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 0, 0.25);
    padding-bottom: 10px;
}

.survey-panel__title {
    margin: 0;
    color: yellow;
    font-size: clamp(20px, 2.2vw, 24px);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

.survey-panel__close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #2a43d1 0%, #1e3299 100%);
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 0, 0.45);
}

.survey-panel__subtitle {
    color: white;
    margin: 10px 0 20px;
    opacity: 0.95;
}

.survey-panel__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.survey-panel__questions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.survey-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.survey-field__label {
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.survey-field__required {
    color: #ff5555;
}

.survey-field__input,
.survey-field__textarea {
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.16);
    color: white;
    font-size: 16px;
}

.survey-field__input::placeholder,
.survey-field__textarea::placeholder {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.survey-field__input:focus,
.survey-field__textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.survey-field__textarea {
    resize: vertical;
}

.survey-field__radio-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.survey-field__radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    padding: 10px 12px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease;
}

.survey-field__radio-option:hover {
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.08);
}

.survey-field__option-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.survey-heart-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.survey-heart-rating__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.survey-heart-rating__label {
    display: inline-flex;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.survey-heart-rating__icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    transition: transform 0.15s ease;
}

.survey-heart-rating__label:hover .survey-heart-rating__icon {
    transform: scale(1.08);
}

.survey-panel__validation {
    display: none;
    color: #ff5555;
    background: rgba(255, 85, 85, 0.15);
    border-left: 3px solid #ff5555;
    border-radius: 4px;
    padding: 8px 10px;
}

.survey-panel__validation.visible {
    display: block;
}

.survey-panel__submit {
    background: linear-gradient(135deg, #2a43d1 0%, #1e3299 100%);
    color: white;
    border: 2px solid rgba(255, 255, 0, 0.45);
    padding: 14px;
    min-height: 46px;
    font-weight: bold;
    border-radius: 8px;
    text-transform: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

.survey-panel__submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.survey-post-submit {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    padding: 14px;
    color: white;
    text-align: center;
}

.survey-post-submit.visible {
    display: block;
}

.survey-post-submit__title {
    margin: 0 0 8px;
    color: yellow;
    font-size: 18px;
}

.survey-post-submit__text {
    margin: 0;
    line-height: 1.45;
}

.survey-post-submit__voucher {
    margin: 14px auto 0;
    display: block;
    width: min(92%, 360px);
    max-width: 100%;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 0, 0.6);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.profile-voucher-area {
    margin: 10px 0 18px;
}

.profile-voucher-button {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.profile-voucher-image {
    max-width: 260px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 0, 0.6);
}

.voucher-modal-container {
    max-width: 640px;
}

.voucher-modal-image {
    width: 100%;
    max-width: 560px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 0, 0.6);
    margin: 8px 0 16px;
}

.voucher-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.voucher-modal-actions .profile-close {
    min-width: 180px;
}

.voucher-keep-btn {
    background: linear-gradient(135deg, #666 0%, #555 100%);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.voucher-use-btn {
    background: linear-gradient(135deg, #2ad14b 0%, #20a038 100%);
    border: 2px solid rgba(255, 255, 0, 0.45);
}

.voucher-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.voucher-badge.active {
    background: rgba(42, 209, 75, 0.2);
    color: #2ad14b;
}

.voucher-badge.used {
    background: rgba(255, 170, 0, 0.18);
    color: #ffcc66;
}

.voucher-badge.none {
    background: rgba(255, 255, 255, 0.14);
    color: #ddd;
}

@media (max-width: 1100px) {
    .survey-panel {
        width: min(40vw, 520px);
    }
}

@media (max-width: 768px) {
    .survey-panel {
        width: 100vw;
        min-width: 0;
        padding: 16px;
        border-left: none;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .survey-panel__header {
        position: sticky;
        top: 0;
        z-index: 3;
        background: linear-gradient(180deg, #4CAF50 0%, #45a049 100%);
        padding-bottom: 8px;
    }

    .survey-panel__subtitle {
        margin: 8px 0 14px;
        font-size: 14px;
    }

    .survey-field__label {
        font-size: 14px;
    }

    .survey-field__radio-group {
        gap: 10px;
    }

    .survey-field__radio-option {
        flex: 1 1 calc(50% - 10px);
    }

    .survey-heart-rating__icon {
        width: 30px;
        height: 30px;
    }

    .survey-panel__submit {
        position: static;
        width: 100%;
        margin-top: 6px;
        box-shadow: none;
        z-index: auto;
    }
}

@media (max-width: 480px) {
    .survey-panel {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .survey-panel__title {
        font-size: 20px;
    }

    .survey-field__radio-option {
        flex: 1 1 100%;
    }

    .survey-heart-rating {
        gap: 4px;
    }

    .survey-heart-rating__icon {
        width: 26px;
        height: 26px;
    }

    .survey-post-submit__voucher {
        width: min(96%, 320px);
    }
}

.gallery-row {
    overflow: hidden;
    width: 100%;
    padding: 0 20px;
}

.gallery-row__inner {
    transition: 450ms transform;
    font-size: 0;
    white-space: nowrap;
    padding: 20px 0;
    transform: translate3d(0, 0, 0);
}

.gallery-thumb {
    position: relative;
    display: inline-block;
    width: 200px;
    height: 150px;
    margin-right: 10px;
    cursor: pointer;
    transition: 450ms all;
    transform-origin: center left;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-thumb img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border: 3px solid #FFD700;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.gallery-thumb:hover img {
    border-color: #FFA500;
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
}

.gallery-thumb.active img {
    border-color: #2ad14b;
    box-shadow: 0 6px 25px rgba(42, 209, 75, 0.8);
}

.gallery-thumb-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 10px;
    font-size: 12px;
    color: white;
}

.gallery-thumb-username {
    font-weight: bold;
    color: yellow;
}

/* Gallery Like Buttons */
.gallery-thumb-like-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2;
    pointer-events: auto;
}

.gallery-thumb-like-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(42, 209, 75, 0.6);
    transform: scale(1.1);
}

.gallery-thumb-like-btn img {
    width: 16px;
    height: 16px;
}

.gallery-thumb-like-btn .like-count {
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.slide-like-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.slide-like-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(42, 209, 75, 0.6);
    transform: scale(1.05);
}

.slide-like-btn .like-count {
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Hover effects for gallery row */
.gallery-row__inner:hover {
    transform: translate3d(-50px, 0, 0);
}

.gallery-row__inner:hover .gallery-thumb {
    opacity: 0.6;
}

.gallery-row__inner:hover .gallery-thumb:hover {
    transform: scale(1.2);
    opacity: 1;
    z-index: 10;
}

.gallery-thumb:hover ~ .gallery-thumb {
    transform: translate3d(40px, 0, 0);
}

.text-center {
    text-align: center;
}

.game-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    justify-items: left;
    align-items: center;
}

#home-link {
    text-decoration: none;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.scroll-top {
    text-decoration: none;
    color: white;
    font-size: 14px;
}

@media (max-width: 768px) {
    /* Gallery responsive fixes */
    .gallery-row {
        padding: 0 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .gallery-row__inner {
        padding: 10px 0;
    }
    
    .gallery-thumb {
        width: 160px;
        height: 120px;
        margin-right: 8px;
    }
    
    .gallery-thumb img {
        width: 160px;
        height: 120px;
    }
    
    /* Disable hover transforms on mobile */
    .gallery-row__inner:hover {
        transform: translate3d(0, 0, 0);
    }
    
    .gallery-row__inner:hover .gallery-thumb {
        opacity: 1;
    }
    
    .gallery-row__inner:hover .gallery-thumb:hover {
        transform: scale(1);
    }
    
    .gallery-thumb:hover ~ .gallery-thumb {
        transform: translate3d(0, 0, 0);
    }
    
    .gallery-thumb-like-btn {
        padding: 6px 12px;
        top: 5px;
        right: 5px;
    }
    
    .gallery-thumb-info {
        padding: 8px;
        font-size: 11px;
    }

    /* MOBILE LAYOUT VERSION 7 - Proper alignment */
    body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas: 
            "header"
            "sidebar"
            "main"
            "footer";
        padding: 0;
    }
    
    header {
        padding: 10px 5px 0;
        padding-top: clamp(60px, 15vw, 120px);
        min-height: 100px;
        position: relative;
    }
    
    /* Ensure header content stays behind sidebar on mobile */
    header .container-fluid {
        position: relative;
        z-index: 1;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    /* Mobile Header Controls - center them below logo */
    header #not-logged-in-controls {
        position: static !important;
        width: 100%;
        justify-content: center !important;
        margin: 10px auto 0 !important;
        padding: 0 10px;
    }
    
    /* Logged-in controls - same position as not-logged-in by default */
    header #logged-in-controls {
        position: static !important;
        width: 100%;
        justify-content: center !important;
        margin: 10px auto 0 !important;
        padding: 0 10px;
        align-items: flex-start !important;
        transition: transform 0.3s ease;
    }
    
    /* Push logged-in controls down when body has logged-in class - use transform */
    body.logged-in header #logged-in-controls {
        transform: translateY(9px) !important;
    }
    
    /* Avatar icon slightly less shifted */
    body.logged-in header #logged-in-controls .avatar-container {
        transform: translateY(-1px) !important;
    }
    
    /* Adjust avatar container to align with buttons */
    header #logged-in-controls .avatar-container {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Hamburger Menu Button - align with login buttons vertically */
    /* Visibility controlled at line ~107 */
    #menu-toggle,
    .menu-toggle {
        display: block !important;
        position: absolute !important;
        top: clamp(70px, calc(12vw + 10px), 190px) !important;
        left: 10px !important;
    }
    
    /* Hamburger Button - lower position when logged in - use transform */
    body.logged-in #menu-toggle,
    body.logged-in .menu-toggle {
        transform: translateY(9px) !important;
    }
    
    #sidebar {
        display: flex;
        flex-direction: row;
        width: 100%;
        height: auto;
        padding: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        max-height: 0;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        padding-top: 0;
        padding-bottom: 0;
    }
    
    #sidebar.mobile-menu-open {
        max-height: 60px;
        opacity: 1;
        padding: 10px;
        z-index: 1500;
        background: linear-gradient(180deg, #4CAF50 0%, #45a049 100%);
        position: relative;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        border-top: 2px solid rgba(255, 255, 0, 0.3);
    }
    
    #sidebar ul {
        display: flex;
        flex-direction: row;
        width: 100%;
        gap: 0;
        margin: 0;
    }
    
    #sidebar ul li {
        flex: 1;
    }
    
    #sidebar ul li a,
    #sidebar .nav-link {
        padding: 10px 15px;
        white-space: nowrap;
        font-size: 14px;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white !important;
        text-decoration: none;
    }
    
    main {
        padding: 15px 10px;
        overflow-x: hidden;
    }
    
    footer {
        flex-direction: column;
        gap: 5px;
        padding: 8px 10px;
        text-align: center;
        font-size: 12px;
    }
    
    /* Netflix Carousel Responsive */
    /* Hide games carousel arrows on mobile – swipe handles navigation */
    .games-carousel-wrapper .carousel-nav {
        display: none;
    }

    .carousel-nav {
        width: 50px;
        height: 101px;
    }
    
    .carousel-nav-left:after,
    .carousel-nav-right:after {
        font-size: 40px;
    }
    
    .carousel-nav-left:after {
        left: 10px;
    }
    
    .carousel-nav-right:after {
        right: 10px;
    }
    
    .row {
        padding: 0 10px;
    }
    
    .tile {
        width: 180px;
        height: 101px;
    }
    
    .tile__img {
        width: 180px;
        height: 101px;
    }
    
    .tile__details:after {
        width: 40px;
        height: 40px;
        margin-top: -20px;
        margin-left: -20px;
    }
    
    .tile__details:before {
        font-size: 24px;
        transform: translate(-45%, -50%);
    }
    
    .tile__title {
        font-size: 12px;
        padding: 8px;
    }
    
    .row__inner:hover {
        transform: translate3d(-45px, 0, 0);
    }
    
    .tile:hover ~ .tile {
        transform: translate3d(90px, 0, 0);
    }
    
    /* Gallery Responsive */
    .slideshow-container {
        padding: 20px;
        min-height: 300px;
    }
    
    .slideshow-main {
        min-height: 250px;
    }
    
    .slideshow-nav {
        width: 40px;
        height: 60px;
        font-size: 32px;
    }
    
    .gallery-thumb {
        width: 150px;
        height: 112px;
    }
    
    .gallery-thumb img {
        width: 150px;
        height: 112px;
    }
    
    .gallery-row__inner:hover {
        transform: translate3d(-37.5px, 0, 0);
    }
    
    .gallery-thumb:hover ~ .gallery-thumb {
        transform: translate3d(30px, 0, 0);
    }
    
    /* Hide gallery carousel arrows on mobile – swipe handles navigation */
    .gallery-thumbnails-wrapper .carousel-nav {
        display: none;
    }
    
    .gallery-thumbnails-wrapper .carousel-nav-left:after,
    .gallery-thumbnails-wrapper .carousel-nav-right:after {
        font-size: 40px;
    }
    
    .gallery-thumbnails-wrapper .carousel-nav-left:after {
        left: 10px;
    }
    
    .gallery-thumbnails-wrapper .carousel-nav-right:after {
        right: 10px;
    }

    .game-thumbnail {
        width: 100%;
        max-width: 150px;
        margin: 5px auto;
        display: block;
    }
    
    .game-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        justify-items: center;
    }
    
    /* Profile Modal Responsive */
    .profile-container {
        width: 95%;
        padding: 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-username {
        font-size: 24px;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .paintings-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    /* Users Grid Responsive */
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
}

/* Hide sidebar and chat in landscape mobile mode */
@media (max-width: 900px) and (orientation: landscape) {
    #sidebar {
        display: none !important;
    }
    
    #sidebar.mobile-menu-open {
        display: none !important;
    }
    
    /* Hide chat completely in landscape mode */
    #chatWrapper,
    #chatWrapper.visible,
    #chatWrapper.minimized {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    header {
        padding-top: clamp(50px, 12vw, 90px);
        min-height: 80px;
    }
    
    header h1 {
        font-size: 18px;
    }
    
    #sidebar ul li a,
    #sidebar .nav-link {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    main {
        padding: 10px 5px;
        overflow-x: hidden;
    }
    
    footer {
        padding: 5px 8px;
        font-size: 11px;
        gap: 3px;
    }
    
    /* Netflix Carousel Small Screens */
    .carousel-nav {
        width: 40px;
    }
    
    .carousel-nav-left:after,
    .carousel-nav-right:after {
        font-size: 30px;
    }
    
    .carousel-nav-left:after {
        left: 8px;
    }
    
    .carousel-nav-right:after {
        right: 8px;
    }
    
    .row {
        padding: 0 5px;
    }
    
    .tile {
        width: 140px;
        height: 79px;
    }
    
    .tile__img {
        width: 140px;
        height: 79px;
    }
    
    .tile__details:after {
        width: 35px;
        height: 35px;
        margin-top: -17.5px;
        margin-left: -17.5px;
        border-width: 2px;
    }
    
    .tile__details:before {
        font-size: 20px;
        margin-top: -12px;
        margin-left: 5px;
    }
    
    .tile__title {
        font-size: 11px;
        padding: 6px;
    }
    
    .row__inner {
        margin: 50px 0;
    }
    
    .row__inner:hover {
        transform: translate3d(-35px, 0, 0);
    }
    
    .tile:hover ~ .tile {
        transform: translate3d(70px, 0, 0);
    }
    
    /* Gallery Small Screens */
    .slideshow-container {
        padding: 15px;
        min-height: 250px;
    }
    
    .slideshow-main {
        min-height: 200px;
    }
    
    .slideshow-main img {
        max-height: 300px !important;
    }
    
    .slideshow-nav {
        width: 35px;
        height: 50px;
        font-size: 28px;
    }
    
    .slideshow-prev {
        left: 5px;
    }
    
    .slideshow-next {
        right: 5px;
    }
    
    .gallery-thumb {
        width: 120px;
        height: 90px;
    }
    
    .gallery-thumb img {
        width: 120px;
        height: 90px;
    }
    
    .gallery-thumb-info {
        font-size: 10px;
        padding: 6px;
    }
    
    .gallery-row__inner:hover {
        transform: translate3d(-30px, 0, 0);
    }
    
    .gallery-thumb:hover ~ .gallery-thumb {
        transform: translate3d(24px, 0, 0);
    }
    
    .gallery-thumbnails-wrapper .carousel-nav {
        width: 40px;
    }
    
    .gallery-thumbnails-wrapper .carousel-nav-left:after,
    .gallery-thumbnails-wrapper .carousel-nav-right:after {
        font-size: 30px;
    }
    
    .gallery-thumbnails-wrapper .carousel-nav-left:after {
        left: 8px;
    }
    
    .gallery-thumbnails-wrapper .carousel-nav-right:after {
        right: 8px;
    }

    .game-thumbnail {
        width: 100%;
        max-width: 120px;
    }
    
    .game-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    /* Header buttons smaller on very small screens */
    header button {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    
    .user-avatar {
        width: 30px;
        height: 30px;
    }
    
    /* Profile Modal */
    .profile-container {
        padding: 15px;
    }
    
    .profile-username {
        font-size: 20px;
    }
    
    .profile-avatar-large {
        width: 70px;
        height: 70px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .profile-section-title {
        font-size: 18px;
    }
}

.avatar-container {
                display: inline-flex;
                align-items: center;
                gap: 10px;
                cursor: pointer;
                padding: 5px 10px;
                border-radius: 5px;
                transition: background-color 0.3s;
            }
            
            .avatar-container:hover {
                background-color: rgba(255, 255, 0, 0.1);
            }
            
            .user-avatar {
                width: 45px; /* Increased from 30px */
                height: 45px; /* Increased from 30px */
                border-radius: 50%;
                border: 2px solid yellow;
                object-fit: cover;
            }
            
            .avatar-modal {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: rgba(0, 0, 0, 0.8);
                z-index: 10000;
                justify-content: center;
                align-items: center;
            }
            
            .avatar-modal.active {
                display: flex;
            }
            
            .avatar-selection {
                background: linear-gradient(135deg, #89CFF0 0%, #5BA3D0 100%);
                padding: 30px;
                border-radius: 12px;
                max-width: 600px;
                max-height: 80vh;
                overflow-y: auto;
            }
            
            .avatar-selection h2 {
                color: #ffff00;
                text-align: center;
                margin-top: 0;
            }
            
            .avatar-grid {
                display: grid;
                grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
                gap: 15px;
                margin: 20px 0;
            }
            
            .avatar-option {
                width: 80px;
                height: 80px;
                border-radius: 50%;
                cursor: pointer;
                border: 3px solid transparent;
                transition: all 0.3s;
                object-fit: cover;
            }
            
            .avatar-option:hover {
                border-color: #2ad14b;
                transform: scale(1.1);
            }
            
            .avatar-option.selected {
                border-color: #ffff00;
                box-shadow: 0 0 15px rgba(255, 255, 0, 0.5);
            }
            
            .avatar-buttons {
                display: flex;
                gap: 10px;
                justify-content: center;
                margin-top: 20px;
            }
            
            .avatar-buttons button {
                padding: 10px 20px;
                cursor: pointer;
                border: none;
                border-radius: 5px;
                font-weight: bold;
            }
            
            .avatar-save {
                background-color: #2ad14b;
                color: white;
            }
            
            .avatar-cancel {
                background-color: #d12a2a;
                color: white;
            }
            
            .logout-btn {
                padding: 8px 20px;
                cursor: pointer;
                background: linear-gradient(135deg, #d12a2a 0%, #a01f1f 100%);
                color: white;
                border: 2px solid #ffff00;
                border-radius: 8px;
                font-weight: bold;
                font-size: 14px;
                transition: all 0.3s;
                margin-left: 10px;
            }
            
            .logout-btn:hover {
                background: linear-gradient(135deg, #a01f1f 0%, #d12a2a 100%);
                transform: translateY(-2px);
                box-shadow: 0 4px 12px rgba(209, 42, 42, 0.4);
            }
            
            .logout-btn:active {
                transform: translateY(0);
            }
            
            .admin-btn {
                padding: 8px 20px;
                cursor: pointer;
                background: linear-gradient(135deg, #ff8800 0%, #cc6600 100%);
                color: white;
                border: 2px solid #ffff00;
                border-radius: 8px;
                font-weight: bold;
                font-size: 14px;
                transition: all 0.3s;
                margin-left: 10px;
            }
            
            .admin-btn:hover {
                background: linear-gradient(135deg, #cc6600 0%, #ff8800 100%);
                transform: translateY(-2px);
                box-shadow: 0 4px 12px rgba(255, 136, 0, 0.4);
            }
            
            .header-controls {
                display: flex;
                align-items: center;
                gap: 5px;
            }
            
            /* Mobile Responsive Styles */
            @media (max-width: 768px) {
                .header-controls {
                    position: static !important;
                    justify-content: center;
                    flex-wrap: wrap;
                    margin-top: 10px;
                    gap: 8px;
                }
                
                .avatar-container {
                    padding: 5px;
                }
                
                .user-avatar {
                    width: 35px;
                    height: 35px;
                }
                
                .logout-btn, .admin-btn {
                    padding: 6px 12px !important;
                    font-size: 13px;
                    margin-left: 0;
                }
                
                .avatar-modal .avatar-selection {
                    max-width: 95%;
                    padding: 20px;
                }
                
                .avatar-grid {
                    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
                    gap: 10px;
                }
                
                .avatar-option {
                    width: 60px;
                    height: 60px;
                }
                
                .avatar-selection h2 {
                    font-size: 20px;
                }
            }
            
            @media (max-width: 480px) {
                #username-display {
                    font-size: 14px;
                }
                
                .logout-btn, .admin-btn {
                    padding: 5px 10px !important;
                    font-size: 12px;
                }
                
                button[onclick*="login"], button[onclick*="register"] {
                    padding: 5px 10px !important;
                    font-size: 12px !important;
                }
                
                .avatar-grid {
                    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
                    gap: 8px;
                }
                
                .avatar-option {
                    width: 50px;
                    height: 50px;
                }
                
                .avatar-selection {
                    padding: 15px;
                }
                
                .avatar-selection h2 {
                    font-size: 18px;
                }
                
                .avatar-buttons button {
                    padding: 8px 15px;
                    font-size: 14px;
                }
            }
            
            /* Profile Modal */
            .profile-modal {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: rgba(0, 0, 0, 0.8);
                z-index: 10000;
                justify-content: center;
                align-items: center;
                overflow-y: auto;
            }
            
            .profile-modal.active {
                display: flex;
            }
            
            .profile-container {
                background: linear-gradient(135deg, #2a43d1 0%, #1a2d8f 100%);
                padding: 30px;
                border-radius: 15px;
                max-width: 800px;
                width: 90%;
                max-height: 90vh;
                overflow-y: auto;
                box-shadow: 0 5px 30px rgba(42, 67, 209, 0.5);
            }
            
            .profile-header {
                display: flex;
                align-items: center;
                gap: 20px;
                margin-bottom: 30px;
                padding-bottom: 20px;
                border-bottom: 2px solid rgba(255, 255, 255, 0.2);
            }
            
            .profile-avatar-wrapper {
                position: relative;
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 10px;
            }
            
            .profile-avatar-large {
                width: 100px;
                height: 100px;
                border-radius: 50%;
                border: 4px solid #2ad14b;
            }
            
            .change-avatar-btn {
                background: #2ad14b;
                color: white;
                border: 2px solid #ffff00;
                padding: 8px 15px;
                border-radius: 6px;
                font-weight: bold;
                font-size: 13px;
                cursor: pointer;
                transition: all 0.3s;
            }
            
            .change-avatar-btn:hover {
                background: #20a038;
                transform: translateY(-2px);
                box-shadow: 0 4px 12px rgba(42, 209, 75, 0.4);
            }
            
            .profile-info {
                flex: 1;
            }
            
            .profile-username {
                font-size: 32px;
                font-weight: bold;
                color: #ffff00;
                margin-bottom: 5px;
            }
            
            .profile-joined {
                color: rgba(255, 255, 255, 0.7);
                font-size: 14px;
            }
            
            .profile-quizionnaire-badge {
                display: flex;
                align-items: center;
                margin-top: 8px;
                padding: 6px 12px;
                background: rgba(255, 215, 0, 0.15);
                border-radius: 8px;
                border: 1px solid rgba(255, 215, 0, 0.3);
                width: fit-content;
                font-size: 14px;
            }
            
            .profile-stats {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
                gap: 15px;
                margin-bottom: 30px;
            }
            
            .stat-card {
                background: rgba(255, 255, 255, 0.1);
                padding: 20px;
                border-radius: 10px;
                text-align: center;
            }
            
            .stat-value {
                font-size: 36px;
                font-weight: bold;
                color: #2ad14b;
                margin-bottom: 5px;
            }
            
            .stat-label {
                color: rgba(255, 255, 255, 0.8);
                font-size: 14px;
            }
            
            .profile-section-title {
                font-size: 24px;
                font-weight: bold;
                color: #ffff00;
                margin: 20px 0 15px 0;
            }
            
            .paintings-grid {
                display: grid;
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 15px;
                margin-bottom: 20px;
            }
            
            .painting-item {
                position: relative;
                aspect-ratio: 1;
                background: rgba(0, 0, 0, 0.3);
                border-radius: 8px;
                overflow: hidden;
                cursor: pointer;
                transition: transform 0.2s;
            }
            
            .painting-item:hover {
                transform: scale(1.05);
            }
            
            .painting-image {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
            
            .painting-delete {
                position: absolute;
                top: 5px;
                right: 5px;
                background: rgba(209, 42, 42, 0.9);
                color: white;
                border: none;
                border-radius: 50%;
                width: 25px;
                height: 25px;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 16px;
            }
            
            .painting-delete:hover {
                background: #d12a2a;
            }

            .painting-item .nomination-submit-btn {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                width: 100%;
                margin: 0;
                border-radius: 0 0 8px 8px;
                font-size: 0.72rem;
                padding: 5px 4px;
                opacity: 0;
                transform: translateY(100%);
                transition: opacity 0.2s, transform 0.2s;
                pointer-events: none;
            }

            .painting-item:hover .nomination-submit-btn {
                opacity: 1;
                transform: translateY(0);
                pointer-events: auto;
            }

            .painting-item .nomination-submit-btn:disabled {
                opacity: 1 !important;
                transform: translateY(0) !important;
                pointer-events: none;
                background: #3a6a68;
                color: #aaa;
            }

            /* Same styling for withdraw and replace buttons on mobile */
            .painting-item .nomination-withdraw-btn,
            .painting-item .nomination-replace-btn {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                width: 100%;
                margin: 0;
                border-radius: 0 0 8px 8px;
                font-size: 0.72rem;
                padding: 5px 4px;
                opacity: 0;
                transform: translateY(100%);
                transition: opacity 0.2s, transform 0.2s;
                pointer-events: none;
            }

            .painting-item:hover .nomination-withdraw-btn,
            .painting-item:hover .nomination-replace-btn {
                opacity: 1;
                transform: translateY(0);
                pointer-events: auto;
            }
            
            .no-paintings {
                text-align: center;
                color: rgba(255, 255, 255, 0.6);
                padding: 40px;
                font-size: 16px;
            }
            
            .profile-close {
                background: #d12a2a;
                color: white;
                border: 2px solid #ffff00;
                padding: 10px 30px;
                border-radius: 8px;
                font-weight: bold;
                font-size: 16px;
                cursor: pointer;
                display: block;
                margin: 20px auto 0;
            }
            
            .profile-close:hover {
                background: #a01f1f;
            }
            
            /* Users List */
            .users-container {
                max-width: 1200px;
                margin: 0 auto;
                padding: 20px;
            }
            
            .users-grid {
                display: grid;
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
                gap: 20px;
                margin-top: 20px;
            }
            
            .user-card {
                background: linear-gradient(135deg, #2a43d1 0%, #1a2d8f 100%);
                padding: 20px;
                border-radius: 12px;
                text-align: center;
                cursor: pointer;
                transition: all 0.3s;
                border: 2px solid transparent;
            }
            
            .user-card:hover {
                transform: translateY(-5px);
                box-shadow: 0 8px 20px rgba(42, 67, 209, 0.4);
                border-color: #2ad14b;
            }
            
            .user-card-avatar {
                width: 80px;
                height: 80px;
                border-radius: 50%;
                border: 3px solid #2ad14b;
                margin: 0 auto 15px;
            }
            
            .user-card-name {
                font-size: 18px;
                font-weight: bold;
                color: #ffff00;
                margin-bottom: 10px;
            }
            
            .user-card-stats {
                display: flex;
                justify-content: space-around;
                margin-top: 10px;
                padding-top: 10px;
                border-top: 1px solid rgba(255, 255, 255, 0.2);
            }
            
            .user-card-stat {
                text-align: center;
            }
            
            .user-card-stat-value {
                font-size: 20px;
                font-weight: bold;
                color: #2ad14b;
            }
            
            .user-card-stat-label {
                font-size: 11px;
                color: rgba(255, 255, 255, 0.7);
            }

/* Chat Styles */
#chatWrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: 2px solid #FFD700;
    border-radius: 12px;
    display: none; /* Hidden by default - only show for logged-in users */
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: max-height 0.3s ease, border-radius 0.3s;
}

#chatWrapper.visible {
    display: flex;
}

#chatWrapper.minimized {
    max-height: 48px;
    height: auto;
    width: auto;
    min-width: auto;
    border: none;
}

#chatWrapper.minimized #chatMessages,
#chatWrapper.minimized #chatInputContainer,
#chatWrapper.minimized .private-chat-messages,
#chatWrapper.minimized .private-chat-input-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

#chatWrapper.minimized #chatHeader {
    border-radius: 10px;
    padding: 10px 15px;
}

#chatHeader {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #2c3e50;
    padding: 12px;
    font-weight: bold;
    text-align: center;
    border-radius: 10px 10px 0 0;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    user-select: none;
    transition: background-color 0.3s;
    position: relative;
}

#chatHeader:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
}

#chatNotificationBadge {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 12px;
    height: 12px;
    background-color: #ff4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

#chatToggleIcon {
    font-size: 12px;
    transition: transform 0.3s;
}

#clearChatBtn {
    background: rgba(255, 0, 0, 0.7);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
    margin: 0 5px;
}

#clearChatBtn:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.05);
}

#clearChatBtn:active {
    transform: scale(0.95);
}

#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #FFD700;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.chat-username {
    font-weight: bold;
    color: #4CAF50;
    font-size: 14px;
}

.chat-timestamp {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.chat-delete-btn {
    background: rgba(255, 0, 0, 0.7);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.chat-delete-btn:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.1);
}

.chat-delete-btn:active {
    transform: scale(0.95);
}

/* Delete button for own messages (different color) */
.chat-delete-btn.chat-delete-own {
    background: rgba(255, 152, 0, 0.7);
}

.chat-delete-btn.chat-delete-own:hover {
    background: rgba(255, 152, 0, 0.9);
}

.chat-message-text {
    color: #2c3e50;
    font-size: 14px;
    word-wrap: break-word;
    line-height: 1.4;
}

.chat-invite-message {
    background-color: rgba(33, 150, 243, 0.1);
    border-left: 3px solid #2196F3;
}

.chat-invite-button {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.3);
}

.chat-invite-button:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

.chat-invite-button:active {
    transform: translateY(0);
}

.chat-invite-button small {
    display: block;
    font-size: 11px;
    opacity: 0.9;
    margin-top: 3px;
    font-weight: normal;
}

.chat-error-message {
    background-color: #d12a2a;
    color: white;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    animation: slideIn 0.3s ease;
}

#chatInputContainer {
    display: flex;
    gap: 0;
    border-radius: 0 0 10px 10px;
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

#chatInput {
    border: none;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    font-size: 14px;
    outline: none;
    flex: 1;
    border-radius: 0;
}

#chatInput::placeholder {
    color: rgba(44, 62, 80, 0.5);
}

#chatInput:focus {
    background-color: white;
}

#chatSendBtn {
    border: none;
    padding: 12px 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    font-size: 16px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

#chatSendBtn:hover {
    background: linear-gradient(135deg, #66bb6a 0%, #4CAF50 100%);
}

#chatSendBtn:active {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
}

/* ── Wünsche Button ── */
.wishes-btn {
    position: fixed;
    bottom: 530px; /* Initial position, will be updated by JavaScript */
    right: 20px; /* Same as chat */
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #2c3e50;
    border: 3px solid #ffff00;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: bottom 0.3s ease, transform 0.3s ease; /* Smooth transition when position changes */
    z-index: 900;
    display: none;
}

.wishes-btn:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.wishes-btn:active {
    transform: translateY(-1px);
}

/* Wishes Modal Styling */
.wishes-modal-container {
    max-width: 600px;
    width: 90%;
}

.wishes-modal-container h2 {
    color: #FFD700;
    margin-bottom: 10px;
    font-size: 24px;
}

/* ── Online Users Section ── */
.online-users-section {
    margin-top: 20px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.online-users-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.online-users-title {
    font-weight: bold;
    color: #ffffff;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-users-list {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

.online-users-list::-webkit-scrollbar {
    width: 8px;
}

.online-users-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 4px;
}

.online-users-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s;
}

.online-users-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.online-user-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    margin-bottom: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.online-user-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* User in game - different color */
.online-user-item.in-game {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

.online-user-item.in-game:hover {
    background: rgba(255, 215, 0, 0.35);
    border-color: rgba(255, 215, 0, 0.5);
}

.online-user-item.in-game .online-user-avatar {
    border-color: rgba(255, 215, 0, 0.7);
}

.online-user-item.in-game:hover .online-user-avatar {
    border-color: #FFD700;
}

.online-user-item.in-game .online-user-name {
    color: #FFD700;
}

.online-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.online-user-item:hover .online-user-avatar {
    transform: scale(1.1);
    border-color: #ffffff;
}

.online-user-name {
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    max-width: 100%;
}

.online-users-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 25px;
    font-size: 13px;
    font-style: italic;
}

.online-users-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 25px;
    font-size: 13px;
    font-style: italic;
}

/* Mobile Chat Styles */
@media (max-width: 768px) {
    /* Hide online users section on mobile */
    .online-users-section {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    #chatWrapper {
        width: calc(100% - 20px);
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-height: 400px;
    }
    
    #chatWrapper.minimized {
        max-height: 42px;
        min-width: 140px;
        width: auto;
        left: auto;
        right: 10px;
        border: none;
    }
    
    #chatWrapper.minimized #chatHeader {
        padding: 8px 12px;
        font-size: 14px;
    }

    #chatMessages {
        min-height: 200px;
        max-height: 300px;
    }
    
    /* Hide hidden mobile content completely */
    .mobile-hidden {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Private chat messages inside main chat wrapper on mobile */
    #chatWrapper .private-chat-messages.mobile-chat-content {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
        background-color: rgba(255, 255, 255, 0.9);
        display: none; /* Hidden by default */
        flex-direction: column;
        gap: 12px;
        min-height: 200px;
        max-height: 300px;
    }
    
    /* Private chat input inside main chat wrapper on mobile */
    #chatWrapper .private-chat-input-container.mobile-chat-content {
        display: none; /* Hidden by default, shown via JS inline style */
        gap: 0;
        padding: 0;
        background: transparent;
        border-top: 2px solid rgba(255, 215, 0, 0.3);
        flex-shrink: 0;
        border-radius: 0 0 10px 10px;
        overflow: hidden;
    }
    
    #chatWrapper .private-chat-input {
        flex: 1;
        padding: 12px;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 0;
        font-size: 14px;
        color: #2c3e50;
        outline: none;
    }
    
    #chatWrapper .private-chat-input::placeholder {
        color: rgba(44, 62, 80, 0.5);
    }
    
    #chatWrapper .private-chat-send {
        padding: 12px 15px;
        background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
        border: none;
        font-size: 18px;
        color: white;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
    }
    
    #chatWrapper .private-chat-send:active {
        background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
        transform: scale(0.95);
    }
    
    /* Private messages styling inside mobile chat - override desktop styles */
    #chatWrapper .private-chat-messages .private-message {
        display: flex;
        flex-direction: column;
        margin-bottom: 12px;
    }
    
    #chatWrapper .private-chat-messages .private-message.own {
        align-items: flex-end;
    }
    
    #chatWrapper .private-chat-messages .private-message.other {
        align-items: flex-start;
    }
    
    #chatWrapper .private-chat-messages .private-message-bubble {
        display: flex;
        align-items: flex-end;
        gap: 8px;
        max-width: 80%;
    }
    
    #chatWrapper .private-chat-messages .private-message.own .private-message-bubble {
        flex-direction: row-reverse;
    }
    
    #chatWrapper .private-chat-messages .private-msg-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 2px solid rgba(255, 215, 0, 0.3);
        flex-shrink: 0;
        object-fit: cover;
        margin-bottom: 4px;
    }
    
    #chatWrapper .private-chat-messages .private-message-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
        background: transparent;
        padding: 0;
    }
    
    #chatWrapper .private-chat-messages .private-message-sender {
        font-weight: bold;
        font-size: 11px;
        color: rgba(44, 62, 80, 0.6);
        padding: 0 4px;
        margin-bottom: 2px;
    }
    
    #chatWrapper .private-chat-messages .private-message-text {
        background: rgba(255, 255, 255, 0.95);
        padding: 10px 14px;
        border-radius: 16px;
        font-size: 14px;
        word-wrap: break-word;
        line-height: 1.4;
        color: #2c3e50;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    #chatWrapper .private-chat-messages .private-message.own .private-message-text {
        background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
        color: #2c3e50;
        border-radius: 16px;
    }
    
    #chatWrapper .private-chat-messages .private-message-time {
        font-size: 10px;
        opacity: 0.6;
        padding: 0 4px;
        margin-top: 2px;
        color: #2c3e50;
    }
    
    #chatWrapper .private-chat-messages .pm-delete-btn {
        background: rgba(255, 59, 59, 0.8);
        border: none;
        color: white;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        flex-shrink: 0;
        margin-bottom: 4px;
    }
    
    #chatWrapper .private-chat-messages .pm-delete-btn:active {
        transform: scale(0.9);
        background: rgba(255, 0, 0, 0.9);
    }
    
    /* Mobile Wishes Button */
    .wishes-btn {
        bottom: 10px;
        right: 10px;
        left: auto;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    #chatWrapper.minimized ~ .wishes-btn {
        bottom: 60px;
    }
}

@media (max-width: 480px) {
    #chatWrapper {
        width: calc(100% - 10px);
        bottom: 5px;
        right: 5px;
        left: 5px;
        max-height: 350px;
    }

    #chatMessages {
        min-height: 180px;
        max-height: 250px;
        padding: 10px;
    }

    .chat-avatar {
        width: 30px;
        height: 30px;
    }

    .chat-username {
        font-size: 13px;
    }

    .chat-message-text {
        font-size: 13px;
    }
}

/* ─── PRIVATE CHAT ─────────────────────────────────────────────────────────── */

/* Desktop: floating windows left of the main chat */
#privateChatContainer {
    position: fixed;
    bottom: 0;
    right: 380px; /* fallback – JS overrides this dynamically via repositionPrivateChatContainer() */
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 10px;
    z-index: 998;
    pointer-events: none;
}

/* ── Window ── */
.private-chat-window {
    width: 280px;
    background: linear-gradient(180deg, #1b2a3a 0%, #0d1a25 100%);
    border: 2px solid #FFD700;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    pointer-events: all;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.private-chat-window:hover {
    box-shadow: 0 -6px 30px rgba(255,215,0,0.18);
}

/* ── Header (matches main chat header style) ── */
.private-chat-header {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a00;
    padding: 9px 10px 9px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    user-select: none;
    border-bottom: 1px solid rgba(0,0,0,0.15);
}

.private-chat-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    flex-shrink: 0;
    object-fit: cover;
}

.private-chat-username {
    flex: 1;
    font-weight: bold;
    font-size: 13px;
    color: #1a1200;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.private-chat-badge {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(231,76,60,0.6);
}

.private-chat-close {
    background: rgba(0,0,0,0.15);
    border: none;
    color: rgba(0,0,0,0.6);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.private-chat-close:hover {
    background: #e74c3c;
    color: #fff;
}

.private-chat-toggle {
    color: rgba(0,0,0,0.4);
    font-size: 11px;
    flex-shrink: 0;
}

/* ── Messages area ── */
.private-chat-messages {
    flex: 1;
    max-height: 270px;
    min-height: 190px;
    overflow-y: auto;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,215,0,0.3) transparent;
}
.private-chat-messages::-webkit-scrollbar { width: 4px; }
.private-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,215,0,0.3);
    border-radius: 2px;
}

/* ── Input row ── */
.private-chat-input-container {
    display: flex;
    gap: 5px;
    padding: 7px 8px;
    background: rgba(0,0,0,0.25);
    border-top: 1px solid rgba(255,215,0,0.2);
}

.private-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,215,0,0.3);
    color: #fff;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s;
}
.private-chat-input::placeholder { color: rgba(255,255,255,0.35); }
.private-chat-input:focus { border-color: #FFD700; background: rgba(255,255,255,0.12); }

.private-chat-send {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    border: 1px solid #FFD700;
    color: white;
    border-radius: 7px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}
.private-chat-send:hover  { background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%); }
.private-chat-send:active { transform: scale(0.94); }

/* ── Minimised ── */
.private-chat-window.minimized .private-chat-messages,
.private-chat-window.minimized .private-chat-input-container {
    display: none;
}

/* ── Message bubbles ── */
.private-message {
    display: flex;
    flex-direction: column;
}
.private-message.own   { align-items: flex-end; }
.private-message.other { align-items: flex-start; }

.private-message-bubble {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    max-width: 100%;
}

.private-msg-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,215,0,0.3);
    flex-shrink: 0;
    object-fit: cover;
}

.private-message-content {
    max-width: 200px;
}

.private-message-sender {
    font-size: 10px;
    color: rgba(255,215,0,0.7);
    margin-bottom: 3px;
    padding-left: 2px;
}

/* Received message bubble (other person) */
.private-message-text {
    background: rgba(30, 60, 100, 0.85);
    color: #fff;
    border-radius: 14px 14px 14px 3px;
    padding: 6px 11px;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Own message bubble */
.private-message.own .private-message-text {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    border-color: rgba(255,215,0,0.25);
    border-radius: 14px 14px 3px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.private-message-time {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    margin-top: 3px;
    padding: 0 3px;
}
.private-message.own  .private-message-time { text-align: right; }
.private-message.other .private-message-time { text-align: left; }

/* Delete button for own private messages */
.pm-delete-btn {
    background: rgba(255, 152, 0, 0.7);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    margin-left: 5px;
    flex-shrink: 0;
    opacity: 0.6;
}

.pm-delete-btn:hover {
    background: rgba(255, 152, 0, 0.9);
    opacity: 1;
    transform: scale(1.1);
}

.pm-delete-btn:active {
    transform: scale(0.95);
}

/* ── Chat username context menu ── */
.chat-user-menu {
    position: fixed;
    background: linear-gradient(180deg, #1b2a3a 0%, #0d1a25 100%);
    border: 2px solid #FFD700;
    border-radius: 10px;
    padding: 6px 0;
    z-index: 9999;
    box-shadow: 0 6px 24px rgba(0,0,0,0.65);
    min-width: 165px;
    animation: pcMenuIn 0.12s ease;
}

@keyframes pcMenuIn {
    from { opacity: 0; transform: scale(0.92) translateY(4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-user-menu-name {
    color: #FFD700;
    font-weight: bold;
    font-size: 13px;
    padding: 5px 14px 8px;
    border-bottom: 1px solid rgba(255,215,0,0.2);
    margin-bottom: 3px;
    letter-spacing: 0.02em;
}

.chat-user-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    color: #e0e0e0;
    padding: 8px 14px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
}
.chat-user-menu button:hover {
    background: rgba(255,215,0,0.12);
    color: #FFD700;
}

/* ── Clickable username in general chat ── */
.chat-username.clickable {
    cursor: pointer;
    color: #FFD700;
    transition: color 0.15s;
}
.chat-username.clickable:hover {
    text-decoration: underline;
    color: #fff;
}

/* ── Profile modal private chat button ── */
.profile-private-chat-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
    border: 2px solid #FFD700;
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    display: block;
    margin: 10px auto 0;
    width: fit-content;
    transition: background 0.2s, transform 0.1s;
}
.profile-private-chat-btn:hover  { background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%); }
.profile-private-chat-btn:active { transform: scale(0.97); }

/* ── Profile modal delete account button ── */
.profile-delete-account-btn {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    border: 2px solid #ff9800;
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    display: block;
    margin: 10px auto 0;
    width: fit-content;
    transition: background 0.2s, transform 0.1s;
}
.profile-delete-account-btn:hover  { background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%); }
.profile-delete-account-btn:active { transform: scale(0.97); }

/* Hide mobile tab system on desktop */
.private-chat-tabs {
    display: none !important;
}

/* ── Mobile: Private Chats als Tabs im Hauptchat ── */
@media (max-width: 768px) {
    /* Hide separate private chat windows on mobile */
    #privateChatContainer {
        display: none !important;
    }
    
    /* Private Chat Tabs Container */
    .private-chat-tabs {
        display: flex !important;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 6px 8px;
        background: rgba(0, 0, 0, 0.15);
        border-bottom: 2px solid rgba(255, 215, 0, 0.3);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        min-height: 52px;
        max-height: 52px;
        height: 52px;
        align-items: center;
        box-sizing: border-box;
    }
    
    .private-chat-tabs::-webkit-scrollbar {
        display: none;
    }
    
    /* Individual Tab - Base Styles (gleiche Größe für alle) */
    .private-chat-tab {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 6px 10px !important;
        border: 2px solid transparent !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        color: white !important;
        white-space: nowrap !important;
        cursor: pointer !important;
        transition: background 0.2s, border-color 0.2s, color 0.2s !important;
        position: relative !important;
        min-height: 36px !important;
        max-height: 36px !important;
        height: 36px !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }
    
    /* Inactive Private Chat Tab */
    .private-chat-tab:not(.main-chat):not(.active) {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Active Private Chat Tab */
    .private-chat-tab:not(.main-chat).active {
        background: linear-gradient(135deg, #2ad14b 0%, #1a9334 100%) !important;
        color: white !important;
        border-color: #2ad14b !important;
    }
    
    /* Inactive Main Chat Tab */
    .private-chat-tab.main-chat:not(.active) {
        background: rgba(42, 209, 75, 0.2) !important;
        border-color: rgba(42, 209, 75, 0.3) !important;
    }
    
    /* Active Main Chat Tab */
    .private-chat-tab.main-chat.active {
        background: linear-gradient(135deg, #2ad14b 0%, #1a9334 100%) !important;
        color: white !important;
        border-color: #2ad14b !important;
    }
    
    .private-chat-tab:not(.active):active {
        background: rgba(255, 255, 255, 0.2);
    }
    
    /* Tab Avatar */
    .private-chat-tab-avatar {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    /* Unread Badge in Tab */
    .private-chat-tab-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        background: #ff3b3b;
        color: white;
        font-size: 10px;
        font-weight: bold;
        padding: 2px 5px;
        border-radius: 10px;
        min-width: 16px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    /* Close button in tab */
    .private-chat-tab-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.2);
        color: white;
        font-size: 11px;
        margin-left: 4px;
        transition: all 0.2s;
    }
    
    .private-chat-tab-close:hover {
        background: rgba(255, 59, 59, 0.8);
        transform: scale(1.1);
    }
    
    /* Hide tab system when chat is minimized */
    #chatWrapper.minimized .private-chat-tabs {
        display: none;
    }

    .private-message-content {
        max-width: calc(100vw - 90px);
    }
}

/* Contact Page Tabs */
.contact-tab-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-tab-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.15) 100%);
    border-color: rgba(42, 209, 75, 0.6);
    transform: translateY(-2px);
}

.contact-tab-btn.active {
    background: linear-gradient(135deg, #2ad14b 0%, #1a9334 100%);
    border-color: #2ad14b;
    box-shadow: 0 5px 15px rgba(42, 209, 75, 0.4);
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text h3 {
    margin: 0 0 10px 0;
    color: #ffff00;
    font-size: 18px;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: #4da6ff;
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #2ad14b 0%, #1a9334 100%);
    color: white;
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 209, 75, 0.4);
}

.cookie-btn-decline {
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
}

.cookie-btn-decline:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-banner-buttons {
        width: 100%;
        justify-content: stretch;
    }
    
    .cookie-btn {
        flex: 1;
    }
}
