/* EuroElite Agency powered by M-Power - Design System */
/* Based on m-power-page design */

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

body {
    font-family: 'Josefin Sans', Arial, Helvetica, sans-serif;
    min-width: 320px;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Hero Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(0, 82, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(0, 249, 239, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0a 0%, #121212 100%);
    z-index: -1;
    pointer-events: none;
}

/* Header Section */
.head {
    text-align: center;
    padding: 40px 20px 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.euroelite-logo {
    height: 75px;
}

.mpower-logo {
    height: 85px;
}

.x-connector {
    font-size: 36px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 5px;
}

h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #00f9ef 50%, #0052ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h3 {
    color: #ffffff;
    font-weight: 600;
    font-size: 18px;
}

.subTitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
}

a {
    color: #00f9ef;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #ffffff;
}

/* Input Section */
.inputFields {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 20px;
    margin: 0 20px 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.inputFields p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.inputFields b {
    color: #00f9ef;
}

#uniqueIdInput {
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    margin-right: 12px;
    width: 250px;
    font-family: 'Josefin Sans', sans-serif;
    transition: all 0.3s ease;
}

#uniqueIdInput:focus {
    outline: none;
    border-color: #00f9ef;
    box-shadow: 0 0 20px rgba(0, 249, 239, 0.2);
}

#uniqueIdInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#connectButton {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0052ff 0%, #00f9ef 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Josefin Sans', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 82, 255, 0.3);
}

#connectButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 82, 255, 0.4);
}

#connectButton:active {
    transform: translateY(-1px);
}

.overlay-link {
    display: inline-block;
    margin-left: 15px;
    padding: 14px 24px;
    font-size: 14px;
    color: #00f9ef;
    border: 2px solid #00f9ef;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.overlay-link:hover {
    background: rgba(0, 249, 239, 0.1);
    color: #00f9ef;
    box-shadow: 0 10px 30px rgba(0, 249, 239, 0.2);
}

/* Username Link */
.usernamelink {
    color: #00f9ef;
    text-decoration: none;
    font-weight: 500;
}

.usernamelink:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* Follow Badge */
.follow-badge {
    margin-left: 4px;
    font-size: 0.85em;
}

/* Controls Bar */
.controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 20px 15px;
    padding: 15px 25px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    flex-wrap: wrap;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

.controls-left {
    flex-shrink: 0;
}

.controls-center {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.controls-right {
    flex-shrink: 0;
}

/* Room Stats */
#roomStats {
    display: flex;
    align-items: center;
    gap: 30px;
}

#roomStats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

#roomStats .stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#roomStats .stat-value {
    color: #00f9ef;
    font-size: 28px;
    font-weight: 700;
}

/* State Text */
#stateText {
    color: #00f9ef;
    font-family: 'Josefin Sans', monospace;
    margin: 0;
    font-size: 14px;
}

/* Tables */
.splitchattable, .splitstatetable {
    width: calc(100% - 40px);
    margin: 0 20px;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

.splitchattable td {
    vertical-align: top;
}

.splitchattable td:first-child {
    padding-right: 10px;
}

.splitchattable td:last-child {
    padding-left: 10px;
}

.splitstatetable td {
    width: 50%;
    padding: 10px 0;
}

.containerheader {
    text-align: center;
    margin-top: 0;
    padding: 15px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 20px 20px 0 0;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
}

/* Chat & Gift Containers */
.chatcontainer, .giftcontainer, .eventcontainer {
    overflow-y: auto;
    height: calc(100vh - 380px);
    word-wrap: break-word;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
    border-radius: 0 0 20px 20px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
}

.eventcontainer {
    height: calc(100vh - 90px);
}

.chatcontainer {
    min-width: 300px;
    flex: 1;
}

.giftcontainer {
    min-width: 400px;
    flex: 1.2;
}

/* Chat Items */
.chatcontainer > div, .giftcontainer > div {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 12px;
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, #0052ff, #00f9ef) 1;
    transition: all 0.3s ease;
}

.chatcontainer > div:hover, .giftcontainer > div:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    transform: translateX(3px);
}

/* Profile Pictures */
.miniprofilepicture {
    height: 28px;
    width: 28px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 10px;
    border: 2px solid rgba(0, 249, 239, 0.5);
}

.gifticon {
    height: 50px;
    width: 50px;
    margin-right: 10px;
    border-radius: 10px;
}

/* Chat Controls Container */
.chat-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 0 20px 15px;
    flex-wrap: wrap;
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

/* Chat Filter Controls */
.chat-filter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.chat-filter-controls span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.chat-filter-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.chat-filter-controls input[type="checkbox"] {
    accent-color: #00f9ef;
    width: 16px;
    height: 16px;
}

.legend-divider {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
}

.legend-item {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.font-size-controls span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

#fontSizeDisplay {
    min-width: 45px;
    text-align: center;
    color: #00f9ef;
    font-weight: 600;
}

.font-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0052ff 0%, #00f9ef 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 82, 255, 0.4);
}

.font-btn:active {
    transform: scale(0.95);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    background: #080808;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer a:hover {
    color: #00f9ef;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0052ff, #00f9ef);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00f9ef;
}

/* Selection */
::selection {
    background: rgba(0, 82, 255, 0.5);
    color: #ffffff;
}

/* Responsive */
@media only screen and (min-width: 576px) {
    .logo-container {
        gap: 30px;
    }

    .logo {
        height: 100px;
    }

    .euroelite-logo {
        height: 95px;
    }

    .mpower-logo {
        height: 105px;
    }

    .x-connector {
        font-size: 44px;
    }

    h1 {
        font-size: 52px;
    }
}

@media only screen and (min-width: 992px) {
    .logo-container {
        gap: 40px;
    }

    .logo {
        height: 100px;
    }

    .euroelite-logo {
        height: 95px;
    }

    .mpower-logo {
        height: 105px;
    }

    .x-connector {
        font-size: 52px;
        margin: 0 10px;
    }

    h1 {
        font-size: 56px;
        letter-spacing: 5px;
    }
}

/* ==================== GIVEAWAY STYLES ==================== */

/* Toggle Button */
.giveaway-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0052ff 0%, #00f9ef 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 82, 255, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.giveaway-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 82, 255, 0.5);
}

/* Panel */
.giveaway-panel {
    position: fixed;
    top: 50%;
    right: -420px;
    transform: translateY(-50%);
    width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(20, 20, 40, 0.98) 0%, rgba(10, 10, 30, 0.98) 100%);
    border: 1px solid rgba(0, 249, 239, 0.2);
    border-radius: 20px 0 0 20px;
    padding: 20px;
    z-index: 999;
    transition: right 0.4s ease;
}

.giveaway-panel.open {
    right: 0;
}

.giveaway-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.giveaway-header h2 {
    margin: 0;
    font-size: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #00f9ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.giveaway-status {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Config */
.giveaway-config {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.config-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.config-row:last-child {
    margin-bottom: 0;
}

.config-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 80px;
}

.config-row label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.config-row input[type="checkbox"],
.config-row input[type="radio"] {
    accent-color: #00f9ef;
}

.config-input {
    width: 70px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 13px;
}

.config-input:focus {
    outline: none;
    border-color: #00f9ef;
}

/* Controls */
.giveaway-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.giveaway-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.giveaway-btn.start {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
}

.giveaway-btn.stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.giveaway-btn.spin {
    background: linear-gradient(135deg, #0052ff 0%, #00f9ef 100%);
    color: #fff;
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    font-size: 16px;
}

.giveaway-btn.ok {
    background: linear-gradient(135deg, #0052ff 0%, #00f9ef 100%);
    color: #fff;
    padding: 15px 50px;
    font-size: 16px;
    margin-top: 20px;
}

.giveaway-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.giveaway-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Entries Textarea */
.giveaway-entries {
    margin-bottom: 15px;
}

.giveaway-entries label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

#giveawayEntries {
    width: 100%;
    height: 120px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 14px;
    resize: vertical;
}

#giveawayEntries:focus {
    outline: none;
    border-color: #00f9ef;
}

#giveawayEntries::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Mode Selection */
.giveaway-mode {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

/* Wheel Container */
.giveaway-wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#wheelCanvas {
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(0, 82, 255, 0.3);
}

/* Fullscreen Wheel Overlay */
.wheel-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.wheel-fullscreen-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

#wheelCanvasFullscreen {
    border-radius: 50%;
    box-shadow: 0 0 80px rgba(0, 82, 255, 0.5), 0 0 150px rgba(0, 249, 239, 0.3);
    max-width: 90vmin;
    max-height: 90vmin;
}

/* Result Overlay */
.giveaway-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.giveaway-result-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.giveaway-result-content {
    text-align: center;
    animation: resultPop 0.5s ease;
}

@keyframes resultPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.result-title {
    font-size: 32px;
    font-weight: 700;
    color: #00f9ef;
    margin-bottom: 10px;
}

.result-name {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #00f9ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

/* ==================== CHAT SECTION ==================== */

.chat-section {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 380px);
}

.chat-section .containerheader {
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.chat-section .chatcontainer {
    flex: 1;
    height: auto;
    border-radius: 0 0 20px 20px;
}

/* ==================== GIFTS SPLIT & TOP GIFTERS ==================== */

.gifts-split {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 380px);
}

.gifts-section {
    height: 50%;
    display: flex;
    flex-direction: column;
}

.gifts-section .containerheader {
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.gifts-section .giftcontainer {
    flex: 1;
    height: auto;
    border-radius: 0;
    border-bottom: none;
}

/* Top Gifters Section */
.topgifters-section {
    height: 50%;
    display: flex;
    flex-direction: column;
}

.topgifters-section .containerheader {
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

#topGiftersList {
    flex: 1;
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    border-radius: 0 0 20px 20px;
    padding: 10px;
}

/* Top Gifter Item */
.top-gifter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 10px;
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, #0052ff, #00f9ef) 1;
    transition: all 0.3s ease;
}

.top-gifter-item:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    transform: translateX(3px);
}

.top-gifter-rank {
    font-size: 18px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.top-gifter-rank.gold {
    color: #fbbf24;
}

.top-gifter-rank.silver {
    color: #cbd5e1;
}

.top-gifter-rank.bronze {
    color: #d97706;
}

.top-gifter-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(0, 249, 239, 0.5);
}

.top-gifter-info {
    flex: 1;
    min-width: 0;
}

.top-gifter-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-gifter-name a {
    color: #00f9ef;
}

.top-gifter-diamonds {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #00f9ef;
}

.top-gifter-diamonds::before {
    content: '💎';
    font-size: 14px;
}

/* Empty State */
#topGiftersList:empty::after {
    content: 'Noch keine Gifts';
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 20px;
    font-size: 14px;
}

/* ==================== CHAT COUNTER ==================== */

.chatcounter-toggle {
    position: fixed;
    bottom: 20px;
    right: 180px;
    background: linear-gradient(135deg, #0052ff 0%, #00f9ef 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 82, 255, 0.4);
    transition: all 0.3s ease;
}

.chatcounter-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0, 82, 255, 0.5);
}

.chatcounter-panel {
    position: fixed;
    top: 50%;
    right: -420px;
    transform: translateY(-50%);
    width: 400px;
    max-height: 80vh;
    background: linear-gradient(145deg, rgba(10, 10, 10, 0.98) 0%, rgba(20, 20, 40, 0.98) 100%);
    border: 1px solid rgba(0, 249, 239, 0.3);
    border-radius: 20px;
    padding: 20px;
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.chatcounter-panel.open {
    right: 20px;
}

.chatcounter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatcounter-header h2 {
    margin: 0;
    font-size: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #00f9ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chatcounter-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: #888;
}

.chatcounter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.chatcounter-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatcounter-btn.start {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.chatcounter-btn.stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.chatcounter-btn.copy {
    background: linear-gradient(135deg, #0052ff 0%, #00f9ef 100%);
    color: white;
    flex: 0.5;
}

.chatcounter-btn.reset {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    flex: 0.5;
}

.chatcounter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chatcounter-list {
    margin-top: 15px;
}

.chatcounter-list label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

#chatCounterEntries {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px;
}

#chatCounterEntries:empty::after {
    content: 'Noch keine Nachrichten';
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    padding: 20px;
    font-size: 14px;
}

.chatcounter-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 8px;
    border-left: 3px solid #00f9ef;
    transition: all 0.2s ease;
}

.chatcounter-entry:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.chatcounter-entry-text {
    flex: 1;
    font-size: 14px;
    color: #ffffff;
    word-break: break-all;
    margin-right: 10px;
}

.chatcounter-entry-count {
    font-size: 16px;
    font-weight: 700;
    color: #00f9ef;
    min-width: 50px;
    text-align: right;
    margin-right: 10px;
}

.chatcounter-entry-remove {
    background: rgba(239, 68, 68, 0.2);
    border: none;
    color: #ef4444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatcounter-entry-remove:hover {
    background: rgba(239, 68, 68, 0.4);
}

/* ==================== MOBILE OPTIMIZATION ==================== */

@media only screen and (max-width: 768px) {
    /* Header */
    .head {
        padding: 20px 15px;
    }

    .logo-container {
        gap: 10px;
        margin-bottom: 15px;
    }

    .logo {
        height: 50px;
    }

    .euroelite-logo {
        height: 45px;
    }

    .mpower-logo {
        height: 55px;
    }

    .x-connector {
        font-size: 24px;
    }

    h1 {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .subTitle {
        font-size: 13px;
    }

    /* Input Section */
    .inputFields {
        padding: 20px 15px;
        margin: 0 10px 15px;
    }

    .inputFields p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    #uniqueIdInput {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    #connectButton {
        width: 100%;
        justify-content: center;
    }

    .overlay-link {
        display: block;
        margin-left: 0;
        margin-top: 10px;
        text-align: center;
    }

    /* Controls Bar */
    .controls-bar {
        margin: 0 10px 10px;
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
    }

    .controls-left,
    .controls-center,
    .controls-right {
        width: 100%;
    }

    .controls-center {
        flex-direction: column;
        gap: 10px;
    }

    .font-size-controls,
    .chat-filter-controls {
        width: 100%;
        justify-content: center;
        padding: 10px 15px;
    }

    .chat-filter-controls {
        flex-wrap: wrap;
        gap: 10px;
    }

    .legend-divider {
        display: none;
    }

    /* Room Stats */
    #roomStats {
        width: 100%;
        justify-content: space-around;
        gap: 15px;
    }

    #roomStats .stat-value {
        font-size: 20px;
    }

    #roomStats .stat-label {
        font-size: 10px;
    }

    /* Split Table -> Stack */
    .splitchattable {
        width: calc(100% - 20px);
        margin: 0 10px;
    }

    .splitchattable,
    .splitchattable tbody,
    .splitchattable tr,
    .splitchattable td {
        display: block;
        width: 100%;
    }

    .splitchattable td {
        margin-bottom: 15px;
        padding-left: 0;
        padding-right: 0;
    }

    /* Chat/Gift Containers */
    .chatcontainer,
    .giftcontainer {
        min-width: unset;
        width: 100%;
        max-width: 100%;
        height: 300px;
        overflow-x: hidden;
    }

    .chat-section,
    .gifts-split {
        height: auto;
    }

    .chat-section .chatcontainer {
        height: 300px;
        max-height: 300px;
        flex: none;
    }

    .gifts-section,
    .topgifters-section {
        height: auto;
    }

    .gifts-section .giftcontainer {
        height: 250px;
        max-height: 250px;
        overflow-y: auto;
        flex: none;
    }

    #topGiftersList {
        height: 200px;
        max-height: 200px;
        overflow-y: auto;
    }

    /* Profile Pictures */
    .miniprofilepicture {
        height: 24px;
        width: 24px;
    }

    .gifticon {
        height: 40px;
        width: 40px;
    }

    /* Giveaway Panel */
    .giveaway-toggle {
        bottom: 15px;
        right: 15px;
        padding: 10px 18px;
        font-size: 14px;
    }

    .giveaway-panel {
        width: calc(100% - 20px);
        right: -100%;
        max-height: 85vh;
        border-radius: 20px;
    }

    .giveaway-panel.open {
        right: 10px;
    }

    #wheelCanvas {
        width: 250px;
        height: 250px;
    }

    /* Chat Counter */
    .chatcounter-toggle {
        bottom: 15px;
        right: 140px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .chatcounter-panel {
        width: calc(100% - 20px);
        right: -100%;
        max-height: 85vh;
        border-radius: 20px;
    }

    .chatcounter-panel.open {
        right: 10px;
    }

    .chatcounter-controls {
        flex-wrap: wrap;
    }

    .chatcounter-btn.start,
    .chatcounter-btn.stop {
        flex: 1 1 100%;
    }

    .chatcounter-btn.copy,
    .chatcounter-btn.reset {
        flex: 1 1 45%;
    }

    /* Result Overlay */
    .result-icon {
        font-size: 60px;
    }

    .result-title {
        font-size: 24px;
    }

    .result-name {
        font-size: 32px;
        padding: 0 20px;
        word-break: break-word;
    }

    /* Footer */
    .footer {
        padding: 20px 15px;
        margin-top: 20px;
    }
}

/* Extra small screens */
@media only screen and (max-width: 400px) {
    h1 {
        font-size: 20px;
    }

    .logo {
        height: 40px;
    }

    .euroelite-logo {
        height: 38px;
    }

    .mpower-logo {
        height: 45px;
    }

    .x-connector {
        font-size: 20px;
    }

    .giveaway-toggle,
    .chatcounter-toggle {
        padding: 8px 14px;
        font-size: 13px;
    }

    .chatcounter-toggle {
        right: 120px;
    }

    #roomStats {
        gap: 10px;
    }

    #roomStats .stat-value {
        font-size: 18px;
    }
}