:root {
    --bg-dark: #0e1621;
    --side-bg: #17212b;
    --accent: #50a2e3;
    --msg-me: #2b5278;
    --msg-other: #182533;
    --text: #ffffff;
    --text-dim: #7f91a4;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background:
        url("telegramSK6.png") repeat 0 0 / 400px auto,
        linear-gradient(45deg, rgba(89, 202, 255, 1) 0%, rgba(168, 110, 255, 1) 100%);
    background-blend-mode: overlay;
    color: var(--text);
    overflow: hidden;
}

#loginScreen {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background:
        url("telegramSK6.png") repeat 0 0 / 400px auto,
        linear-gradient(45deg, rgba(89, 202, 255, 1) 0%, rgba(168, 110, 255, 1) 100%);
    background-blend-mode: overlay;
}

.login-card {
    background: var(--side-bg);
    padding: 40px;
    border-radius: 24px;
    width: 340px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: pop 0.3s ease-out;
}

.logo-area {
    font-size: 60px;
    margin-bottom: 20px;
}

.login-card h1 {
    margin: 0 0 10px;
    font-size: 24px;
}

.login-card p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 30px;
}

.input-wrapper {
    background: #242f3d;
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    transition: 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--accent);
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    flex: 1;
}

.main-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: filter 0.2s;
    text-align: center;
    display: block;
    box-sizing: border-box;
    max-width: 100%;
}

.main-btn:hover {
    filter: brightness(1.1);
}

.link-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    margin-top: 15px;
    cursor: pointer;
    font-size: 14px;
}

#mainApp {
    height: 100vh;
    display: flex;
}

.sidebar {
    width: 320px;
    background: var(--side-bg);
    border-right: 1px solid #080c11;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar-img-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    background: #242f3d;
}

.avatar-container {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--accent);
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #1e2733;
    background-color: #747f8d;
}

.status-dot.online {
    background-color: #3ba55d;
    box-shadow: 0 0 5px rgba(59, 165, 93, 0.5);
}

.friend-item .avatar-container {
    position: relative;
    width: 35px;
    height: 35px;
}

.friend-item .status-dot {
    width: 10px;
    height: 10px;
    bottom: 0;
    right: 0;
    border: 2px solid var(--side-bg);
}

.user-meta {
    flex: 1;
}

.user-meta small {
    color: var(--accent);
    display: block;
}

.nav-menu {
    padding: 10px;
}

.nav-item {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-item i {
    color: var(--text-dim);
    width: 20px;
}

.badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #f53d3d;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
}

.contact-label {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: bold;
    padding: 20px 20px 10px;
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
}

.contact-list {
    flex: none;
    overflow-y: visible;
}

.contact-list .friend-item {
    padding: 12px 20px 12px 24px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid transparent;
    overflow: visible !important;
}

.contact-list .friend-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.contact-list .friend-item.active-chat,
.contact-list .friend-item.active-channel {
    border-left: 4px solid var(--accent);
    background: rgba(0, 136, 204, 0.08) !important;
}

.friend-item div {
    min-width: 0;
    /* Prevents flex items from overflowing their container */
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0e1621;
    position: relative;
}

.chat-top-bar {
    background: rgba(23, 33, 43, 0.75);
    /* Priehľadnejšie pozadie */
    backdrop-filter: blur(15px);
    /* Moderný blur efekt */
    -webkit-backdrop-filter: blur(15px);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fa-arrow-left:hover {
    color: var(--accent) !important;
    transform: scale(1.1);
}

.messages-viewport {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 0;
    background: transparent;
    /* Priehľadné pre viditeľnosť pozadia kontajnera */
}

.messages-viewport::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("telegramSK6.png");
    background-repeat: repeat;
    background-position: center;
    background-size: 400px auto;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --- ZMENA: Všetky správy na ľavej strane --- */
.msg-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
    align-items: flex-start;
}

.bubble {
    max-width: 75%;
    display: table;
    padding: 8px 35px 8px 12px;        
    border-radius: 12px;
    position: relative;
    font-size: 14.5px;
    line-height: 1.45; 
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    color: #f0f0f0;
    word-break: break-word;
    white-space: normal;
    margin-bottom: 8px;       
}
.bubble.me {
    background: var(--msg-me);
    border-bottom-right-radius: 4px;
    margin-left: auto;            /* Automaticky posunie tvoju bublinu úplne doprava */
}

.bubble.other {
    background: var(--msg-other);
    border-bottom-left-radius: 4px;
    margin-right: auto;           /* Automaticky posunie cudziu bublinu úplne doľava */
}

.bubble strong {
    display: block;
    font-size: 12px;
    margin-bottom: 2px;
    color: var(--accent);
}

.msg-info {
    position: absolute;
    bottom: 3px;
    right: 8px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    user-select: none;
}

.input-bar {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(23, 33, 43, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative; /* needed for emoji picker absolute positioning */
}

.input-box {
    flex: 1;
    background: #242f3d;
    border-radius: 22px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-box input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    flex: 1;
    font-size: 15px;
}

.input-box i {
    color: var(--text-dim);
    cursor: pointer;
}

.circle-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: transform 0.2s;
}

.circle-send:hover {
    transform: scale(1.08);
}

.jump-button {
    position: absolute;
    bottom: 85px;
    right: 25px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--side-bg);
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: 0.2s;
}

.empty-state {
    margin: auto;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 15px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--side-bg);
    width: 340px;
    max-height: 90vh;
    /* PRIDANÉ: Modal nepresiahne 90% výšky obrazovky notebooku */
    border-radius: 20px;
    overflow: hidden;
    animation: pop 0.25s ease-out;
    display: flex;
    /* PRIDANÉ: Aby fungovalo správne rozloženie pre vnútro */
    flex-direction: column;
    /* PRIDANÉ */
}

.modal-head {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    /* PRIDANÉ: Hlavička sa nikdy nezmenší */
}

.modal-inner {
    padding: 25px;
    overflow-y: auto;
    /* PRIDANÉ: Ak obsah presiahne max-height modalu, bude sa dať scrollovať */
}

.avatar-selector {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.avatar-option {
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
}

.avatar-option:hover {
    transform: scale(1.1);
}

.avatar-option img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid transparent;
}

.avatar-option.selected img {
    border-color: var(--accent);
}











/* --- Master Key Flow & Security Styles --- */

/* Štýl pre zobrazenie Master Key v modale */
#masterKeyFlow div {
    letter-spacing: 2px;
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.1);
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* Inputy v modale, aby ladili s dizajnom */
.modal-inner input[type="text"],
.modal-inner input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #242f3d;
    border: 1px solid #333;
    border-radius: 10px;
    color: white;
    outline: none;
    box-sizing: border-box;
    /* Dôležité, aby neprišlo k pretekaniu */
}

.modal-inner input:focus {
    border-color: var(--accent);
}

/* Tlačidlo na držanie (5s timer) */
#holdBtn {
    background: var(--accent);
    box-shadow: 0 0 20px rgba(80, 162, 227, 0.3);
    transition: transform 0.1s, background 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#holdBtn:active {
    transform: scale(0.92);
    background: #4092d3;
    box-shadow: 0 0 30px rgba(80, 162, 227, 0.6);
}

/* Animácia blikania pre varovný text */
#holdText {
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Reset kľúč v profile - efekt rozmazania */
#masterKeyBlur {
    user-select: none;
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Úprava pre horizontálnu čiaru v modale */
.modal-inner hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 15px 0;
}














/* --- POHĽADY (Search & Profile) --- */
.main-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.view-header {
    padding: 10px 20px;
    background: rgba(23, 33, 43, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.view-header h2 {
    margin: 0 0 20px;
    font-size: 24px;
    color: var(--accent);
}

.search-input-area {
    display: flex;
    gap: 10px;
}

.search-input-area input {
    flex: 1;
    background: #242f3d;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 15px;
    color: white;
    outline: none;
    transition: 0.2s;
}

.search-input-area input:focus {
    border-color: var(--accent);
}

.search-results-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.search-user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 10px;
}

.search-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- PROFILOVÁ KARTA --- */
.profile-card {
    max-width: 500px;
    margin: 40px auto;
    background: var(--side-bg);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

.profile-lg-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    padding: 3px;
    object-fit: cover;
}

.profile-info h2 {
    margin: 0;
    font-size: 28px;
}

.nick-tag {
    color: var(--accent);
    font-weight: bold;
    opacity: 0.8;
}

.highlights-row {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    gap: 10px;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.highlight-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #242f3d;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: var(--text-dim);
    transition: 0.2s;
}

.highlight-item:hover .highlight-circle {
    border-color: var(--accent);
    transform: scale(1.05);
}

.highlight-item span {
    font-size: 11px;
    color: var(--text-dim);
}

.profile-actions {
    margin-top: 20px;
}

#toastContainer {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30000;
}

.toast {
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
}

@keyframes pop {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- KUKY REELS STYLES --- */
#kukyReelsScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: block;
}

.kuky-reels-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE a Edge */
    scrollbar-width: none;
    /* Firefox */
}

.kuky-reels-container::-webkit-scrollbar {
    display: none;
}

.kuky-close-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    transition: 0.2s;
}

.kuky-close-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.kuky-reel-item {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    overflow: hidden;
}

.kuky-reel-bg {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.4);
    z-index: 0;
}

.kuky-reel-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 450px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    background: #000;
}

@media (min-width: 600px) {
    .kuky-reel-content {
        height: 90vh;
        border-radius: 20px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}

.kuky-reel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.kuky-reel-ui {
    position: absolute;
    right: 15px;
    bottom: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.kuky-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    gap: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.kuky-action:hover {
    transform: scale(1.1);
}

.kuky-action i {
    font-size: 26px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.kuky-action span {
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.kuky-reel-info {
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    padding: 50px 80px 25px 20px;
}

.kuky-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kuky-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.kuky-reel-info h4 {
    margin: 0;
    font-size: 16px;
}

.kuky-reel-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

/* --- INVITE CARD --- */
.invite-card {
    background: var(--side-bg);
    border-radius: 15px;
    padding: 15px;
    margin: 10px 0;
    width: 260px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.invite-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.invite-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--accent);
}

.invite-info {
    flex: 1;
    overflow: hidden;
}

.invite-info strong {
    display: block;
    font-size: 14px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.invite-info span {
    font-size: 11px;
    color: var(--text-dim);
}

.invite-actions {
    display: flex;
    gap: 8px;
}

.invite-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.invite-btn.accept {
    background: var(--accent);
    color: white;
}

.invite-btn.reject {
    background: #333;
    color: #ccc;
}

.invite-btn:hover {
    filter: brightness(1.2);
}

.invite-status {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    padding: 5px;
    font-style: italic;
}

/* --- CROWN ICON --- */
.crown-icon {
    color: #ffd700;
    margin-left: 5px;
    font-size: 12px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.delete-btn {
    background: #f53d3d !important;
    color: white;
}

.delete-btn:hover {
    background: #d32f2f !important;
}

/* --- MINIGAMES & SHOP CSS --- */
.tictactoe-board {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
    gap: 8px;
    background: transparent;
    padding: 10px;
    margin: 20px auto;
}

.tictactoe-cell {
    background: rgba(36, 47, 61, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 44px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.02), 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tictactoe-cell:hover {
    background: rgba(80, 162, 227, 0.15);
    border-color: rgba(80, 162, 227, 0.3);
    transform: translateY(-2px);
}

.tictactoe-cell.x-mark {
    color: #ff4757;
    text-shadow: 0 0 15px rgba(255, 71, 87, 0.4);
}

.tictactoe-cell.o-mark {
    color: #2ed573;
    text-shadow: 0 0 15px rgba(46, 213, 115, 0.4);
}

.pexeso-board {
    display: grid;
    grid-template-columns: repeat(4, 75px);
    gap: 12px;
    margin: 20px auto;
}

.pexeso-card {
    width: 75px;
    height: 75px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    user-select: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.pexeso-card.flipped {
    background: #1e293b;
    border-color: rgba(80, 162, 227, 0.4);
    transform: rotateY(180deg);
    box-shadow: 0 0 15px rgba(80, 162, 227, 0.2);
}

.pexeso-card.matched {
    background: rgba(46, 213, 115, 0.15);
    border-color: rgba(46, 213, 115, 0.4);
    color: #2ed573;
    opacity: 0.8;
    cursor: default;
    transform: rotateY(180deg) scale(0.95);
    box-shadow: none;
}

/* --- FIRE NEON TEXT ANIMATION --- */
@keyframes fireBurn {
    0% {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    }
    50% {
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, 0 -2px 10px currentColor;
    }
    100% {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    }
}

.neon-fire-text {
    font-weight: bold;
    animation: fireBurn 1.5s infinite alternate;
}

/* Color Shop UI */
.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #242f3d;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
}
.shop-item-preview {
    font-size: 18px;
    padding: 5px 10px;
}

/* --- NEON AVATAR BORDER ODOBRANÝ PODĽA POŽIADAVKY --- */

/* --- SIDEBAR USERNAME COLOR --- */
.sidebar-username {
    transition: color 0.4s ease;
}

@keyframes neonHueRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* --- MINIHRY VIEW FIX --- */
/* Odstránené špecifické pozadie, aby bolo rovnaké ako schoolView (transparent a.k.a. body background) */

/* Oprava active game area */
#activeGameArea {
    width: 100%;
    box-sizing: border-box;
}

.minigame-lobby {
    width: 100%;
}

.minigame-leaderboard {
    width: 100%;
}

/* Sleek Game Cards in Minigame Lobby */
.minigame-card {
    flex: 1;
    min-width: 150px;
    padding: 30px 20px;
    font-size: 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.minigame-card.tictactoe {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}
.minigame-card.tictactoe:hover {
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.4);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}
.minigame-card.pexeso {
    background: linear-gradient(135deg, #2c3e50, #3498db);
}
.minigame-card.pexeso:hover {
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}
.minigame-card i {
    font-size: 32px;
    margin-bottom: 12px;
}

/* Matchmaking Status Clean UI */
#matchmakingStatus {
    color: var(--accent);
    background: rgba(23, 33, 43, 0.85);
    border: 1px solid rgba(80, 162, 227, 0.2);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 400px;
    margin: 40px auto;
    width: 100%;
    box-sizing: border-box;
}