@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

:focus {
  outline: none;
}

:root {
  --header-height: 4rem;
  --footer-height: 4rem;
}

@media (min-width: 640px) {
  :root {
    --header-height: 5rem;
  }
}

body {
  height: 100vh;
  background: linear-gradient(135deg, #0f1019 0%, #171925 50%, #1a1f2e 100%);
  overflow: hidden;
  color: white;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#root {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

h1 {
    color: white;
}

p {
  color: #717171;
  transition: transform 1s ease;
}

::selection {
  background-color: #14AF8A;
}

::-webkit-scrollbar {
  width: 4px !important;
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #999ea7;
  opacity: 0.6;
  border-radius: 50px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 10px;
}

/* Loading Screen */
.Loading {
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #0f1019 0%, #171925 50%, #1a1f2e 100%);
  transition: all 0.8s ease;
  overflow: hidden;
}

.Loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(20, 175, 138, 0.1) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

.Loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(20, 175, 138, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: loadingGlow 3s ease-in-out infinite;
}

.Loading.slideout {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.1);
}

.Loading.slideout img {
  animation: logoShrinkOut 0.8s forwards;
  transform-origin: center;
}

.Loading img {
  width: 300px;
  height: auto;
  animation: logoFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(20, 175, 138, 0.5));
  transition: all 0.5s ease;
}

.Loading img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 50px rgba(20, 175, 138, 0.8));
}



.smallimgbtn {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #0d1120 0%, #191f36 100%);
  transition: background-color 0.3s ease;
}

.input {
  padding: 10px 18px;
  box-sizing: border-box;
  border-radius: 12px;
  background: linear-gradient(180deg, #0d1120 0%, #191f36 100%);
  border: 1px solid #297bff;
  color: #fff;
  box-shadow: 0px 10px 7.8px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  opacity: 0.9;
  text-align: center;
}

.input::placeholder {
  text-align: center;
  color: #cbd5e1;
}

.input:focus {
  outline: none !important;
}

input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.tooltip {
  background-color: #0f1019;
  color: #fff;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 14px;
}

.tooltip * {
  color: white;
  font-weight: bold;
}

.loadingContainer {
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(6, 5, 10, 0.9);
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s;
}

.loadingContainer .loading {
  width: 50px;
  height: 50px;
  border: 6px solid #131520;
  border-radius: 50%;
  border-top: 6px solid #0056b3;
  animation: spin 0.5s linear infinite;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #0f1019 0%, #171925 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo {
    height: 100%;
    display: flex;
    align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo font {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
    height: 100%;
    gap: 15px;
    display: flex;
    align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

.header-nav-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 40px;
}

.header-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  color: #717171;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-nav-item:hover,
.header-nav-item.active {
  background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(20, 175, 138, 0.3);
  border-color: rgba(20, 175, 138, 0.3);
}

.header-nav-item:active {
  transform: translateY(-1px) scale(1.02);
}

.header-nav-item svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.header-nav-item:hover svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.header-nav-item span {
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  line-height: 1.2;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Game Switcher Styles */
.game-switcher {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #2a2e44;
  color: white;
  font-family: 'Poppins', sans-serif;
}

.game-switcher:hover {
  background: #3a3e54;
  transform: translateY(-1px);
}

.game-switcher.active {
  background: #14AF8A;
  color: white;
  box-shadow: 0 4px 15px rgba(20, 175, 138, 0.3);
}

.game-switcher.active:hover {
  background: #16c095;
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
  color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0px 0px 12.7px 0px rgba(20, 175, 138, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #16c095 0%, #0f9a7a 100%);
  transform: translateY(-2px);
  box-shadow: 0px 4px 20px 0px rgba(20, 175, 138, 0.4);
}

.btn-primary:focus {
  background: linear-gradient(135deg, #16c095 0%, #0f9a7a 100%);
  box-shadow: 0 0 0 2px rgba(20, 175, 138, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
  color: #717171;
    cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
    color: #14AF8A;
  border: 2px solid #14AF8A;
    text-decoration: none;
    cursor: pointer;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
  color: white;
  transform: translateY(-2px);
}

.btn-secondary:focus {
  background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    color: white;
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-secondary:disabled {
  background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
  color: #717171;
  border-color: #2a2e44;
    cursor: not-allowed;
  transform: none;
}

.btn-tertiary {
  background: transparent;
    color: #14AF8A;
    border: none;
  text-decoration: none;
    cursor: pointer;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-tertiary:hover {
  background: rgba(20, 175, 138, 0.1);
  color: #14AF8A;
}

.btn-tertiary:focus {
  background: rgba(20, 175, 138, 0.1);
  color: #14AF8A;
}

.btn-tertiary:active {
  background: rgba(20, 175, 138, 0.2);
  color: #14AF8A;
}

.btn-tertiary:disabled {
  background: transparent;
  color: #717171;
    cursor: not-allowed;
}

.btn-rbxgrow {
  background: linear-gradient(135deg, #14AF8A 0%, #0f8a6f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(20, 175, 138, 0.3);
}

.btn-rbxgrow:hover {
  background: linear-gradient(135deg, #16c095 0%, #14AF8A 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 175, 138, 0.4);
}

.btn-rbxgrow:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 175, 138, 0.3);
}

.btn-rbxgrow:active {
  transform: translateY(0);
}

.online-dot {
  width: 10px;
  height: 10px;
  background: #00ff88;
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

button {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

button.mobile {
  padding: 10px;
}

button svg {
  width: 20px;
  height: 20px;
}

.userthumb {
  width: 40px;
  height: 40px;
    border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.userthumb:hover {
  transform: scale(1.1);
}

/* Sidebars */
.rightsidebar {
  position: fixed;
  right: 0;
  top: var(--header-height);
  bottom: 0;
  width: 300px;
  background: linear-gradient(135deg, #0f1019 0%, #171925 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.3);
}

.leftsidebar {
  position: fixed;
  left: 0;
  top: var(--header-height);
  bottom: 0;
  width: 300px;
  max-width: 300px;
  background: linear-gradient(135deg, #0f1019 0%, #171925 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex !important;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  visibility: visible !important;
  opacity: 1 !important;
  overflow: hidden;
  box-sizing: border-box;
}

/* Old leftsidebar item styles - now used for chat in leftsidebar */
.leftsidebar .item {
  width: 120px;
  height: 50px;
    display: flex;
  flex-direction: row;
    align-items: center;
  justify-content: flex-start;
  margin-bottom: 15px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  color: #717171;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 0 18px;
}

.leftsidebar .item:hover,
.leftsidebar .item.active {
  background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    color: white;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(20, 175, 138, 0.3);
  border-color: rgba(20, 175, 138, 0.3);
}



.leftsidebar .item:active {
  transform: translateY(-1px) scale(1.02);
}

.leftsidebar .item svg {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.leftsidebar .item:hover svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.leftsidebar .item span {
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  line-height: 1.2;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.widthcontainer {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Chat specific containers */
.leftsidebar .widthcontainer:first-child {
  padding: 0;
  border-bottom: none;
  background: transparent;
}

.leftsidebar .widthcontainer:last-child {
  padding: 0;
  border-top: none;
  background: transparent;
}

.rightsidebar .widthcontainer:first-child {
  padding: 0;
  border-bottom: none;
  background: transparent;
}

.rightsidebar .widthcontainer:last-child {
  padding: 0;
  border-top: none;
  background: transparent;
}

.heightcontainer {
    display: flex;
  flex-direction: column;
    gap: 10px;
    height: 100%;
}

.chatbox {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  color: white;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
}

.chatbox:focus {
  outline: none;
  border-color: #14AF8A;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(20, 175, 138, 0.2);
}

.chatbox::placeholder {
  color: #717171;
  font-style: normal;
}

/* Chat form styles */
.chat-form {
  display: flex !important;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  visibility: visible !important;
  opacity: 1 !important;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.chat-btn {
  background: #14AF8A;
  border: none;
  border-radius: 8px;
  padding: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  box-shadow: 0 2px 8px rgba(20, 175, 138, 0.3);
}

.chat-btn:hover {
  background: #16c095;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 175, 138, 0.4);
}

.chat-btn svg {
  width: 18px;
  height: 18px;
}

#chatcontainer {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Welcome message styling */
#chatcontainer .chatline:first-child {
  margin-top: 0;
  padding-top: 0;
}

/* Online indicator styles */
.online-indicator {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  visibility: visible !important;
  opacity: 1 !important;
}

.online-indicator svg {
  width: 8px;
  height: 8px;
}

.online-indicator p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #717171;
}

.chatline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  transition: all 0.2s ease;
  box-shadow: none;
}

.chatline:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.chatline .userthumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  flex-shrink: 0;
}

.chatline .name {
  font-weight: 500;
  color: white;
  font-size: 13px;
  margin-bottom: 1px;
  display: block;
}

.chatline .msg {
  color: white;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  max-width: 220px;
}

.chatline .name.server {
  color: #ff6b6b;
}

.chatline .name.server:after {
  content: " [SERVER]";
  color: #ff6b6b;
  font-size: 12px;
  font-weight: 400;
}

.chatline .name.mod {
  color: #4ecdc4;
}

.chatline .name.mod:after {
  content: " [MOD]";
  color: #4ecdc4;
  font-size: 12px;
  font-weight: 400;
}

.chatline .name.owner {
  color: #ffe66d;
}

.chatline .name.owner:after {
  content: " [OWNER]";
  color: #ffe66d;
  font-size: 12px;
  font-weight: 400;
}

.clickable {
    cursor: pointer;
}

.clickable:hover {
  opacity: 0.8;
}

.clickable:focus {
  outline: none;
}

.clickable:active {
  transform: scale(0.98);
}

.hidden {
    display: none !important;
}

.blur {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}

/* Popup */
.popup {
    position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
}

.popup.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.popup.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.popup * {
  color: white;
}

/* Popup Container */
.popup-container {
  background: linear-gradient(135deg, #1a1f2e 0%, #2a2e44 100%);
  border-radius: 16px;
  padding: 30px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Close Button */
.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  line-height: 1;
}

.popup-close:hover {
  color: #14AF8A;
  transform: scale(1.2);
}

.popup-close:active {
  transform: scale(0.9);
}

/* Popup Header */
.popup-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.popup-subtitle {
  color: #14AF8A;
  font-size: 16px;
  font-weight: 500;
}

/* Items Grid */
.popup-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

/* Item Card */
.item-card {
  background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(20, 175, 138, 0.3);
}

.item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

.item-name {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-value {
  color: #14AF8A;
  font-size: 12px;
  font-weight: 500;
}

/* Popup Footer */
.popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.total-value {
  font-size: 20px;
  font-weight: 600;
  color: #14AF8A;
}

/* Scrollbar for items grid */
.popup-items-grid::-webkit-scrollbar {
  width: 6px;
}

.popup-items-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.popup-items-grid::-webkit-scrollbar-thumb {
  background: #14AF8A;
  border-radius: 3px;
}

.popup-items-grid::-webkit-scrollbar-thumb:hover {
  background: #16c095;
}

/* Main Content */
.main {
  margin-left: 300px;
  margin-right: 20px;
  margin-top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

  .section {
  background: linear-gradient(135deg, #0f1019 0%, #171925 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0px 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  -webkit-overflow-scrolling: touch;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.row:hover {
  transform: translateY(-2px);
  box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.3);
}

/* Desktop Game Players */
.desktop-game-players {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 200px;
}

.desktop-game-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
}

.desktop-game-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
  z-index: 2;
}

.desktop-game-badge.heads {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.desktop-game-badge.tails {
  background: linear-gradient(135deg, #FF4444 0%, #CC0000 100%);
}

.desktop-game-vs {
  font-size: 16px;
  font-weight: bold;
  color: #717171;
  margin: 0 10px;
}

.desktop-game-opponent {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #717171;
}

/* Desktop Game Items */
.desktop-game-items {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-width: 150px;
}

.desktop-item-image {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.desktop-item-overlay {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
}

/* Desktop Game Value */
.desktop-game-value {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.desktop-value-icon {
  color: #14AF8A;
}

.desktop-value-text {
  display: flex;
  flex-direction: column;
}

.desktop-value-main {
  font-size: 18px;
  font-weight: bold;
  color: white;
  line-height: 1;
}

.desktop-value-range {
  font-size: 12px;
  color: #717171;
  line-height: 1;
}

/* Desktop Game Coin */
.desktop-game-coin {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.desktop-coin-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

/* Desktop Game Action */
.desktop-game-action {
  min-width: 80px;
  display: flex;
  justify-content: center;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Game Stats */
.game-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-card {
  background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  min-width: 120px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.stat-card h3 {
  font-size: 14px;
  color: #717171;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  word-wrap: break-word;
}

.stat-card .value {
  font-size: 24px;
  font-weight: 700;
  color: #14AF8A;
}



/* Responsive */
@media only screen and (min-width: 1081px) {
    .mobile-only {
        display: none !important;
    }
}

@media only screen and (max-width: 768px) {
    .rightsidebar {
    display: none;
    }
    
    .leftsidebar {
    display: none;
    }

    .section {
    margin: 10px;
    padding: 15px;
    }

    .desktop-only {
        display: none !important;
    }
    
    .header-nav {
        display: none !important;
    }

    .main {
    margin-left: 0;
    margin-right: 0;
    padding: 10px;
    padding-bottom: 100px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: calc(100vh - 150px);
  }
  
  /* Mobile Game Stats */
  .game-stats {
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .stat-card {
    padding: 15px 10px;
    min-width: 100px;
    flex: 1 1 calc(33.333% - 7px);
  }
  
  .stat-card h3 {
    font-size: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
  }
  
  .stat-card .value {
    font-size: 20px;
  }
  
  /* Extra small screens */
  @media only screen and (max-width: 480px) {
    .game-stats {
      gap: 8px;
    }
    
    .stat-card {
      padding: 12px 8px;
      min-width: 80px;
      flex: 1 1 calc(33.333% - 6px);
    }
    
    .stat-card h3 {
      font-size: 11px;
      margin-bottom: 6px;
      letter-spacing: 0.3px;
    }
    
    .stat-card .value {
      font-size: 18px;
    }
    
    .section {
      margin: 8px;
      padding: 12px;
    }
    
    .main {
      padding: 8px;
      padding-bottom: 90px;
      height: calc(100vh - 130px);
    }
  }
  
  /* Very small screens - main container adjustments */
  @media only screen and (max-width: 360px) {
    .main {
      padding: 6px;
      padding-bottom: 80px;
    }
    
    .section {
      margin: 6px;
      padding: 10px;
    }
  }
  
  .leftsidebar {
    width: 95px;
    padding: 20px 10px;
  }
  
  .leftsidebar .item {
    width: 85px;
    height: 45px;
    margin-bottom: 12px;
    font-size: 9px;
    padding: 0 12px;
  }
  
  .leftsidebar .item svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
  }

  /* Mobile Game Creation Styles */
  .mobile-game-card {
    background: linear-gradient(135deg, #1a1f2e 0%, #2a2e44 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    word-wrap: break-word;
    min-height: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
  }

  .mobile-game-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid #14AF8A;
    position: relative;
  }

  .mobile-game-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
  }

  .mobile-game-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
  }

  .mobile-game-badge.heads {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  }

  .mobile-game-badge.tails {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  }

  .mobile-game-vs {
    font-size: 24px;
    font-weight: bold;
    color: #14AF8A;
    margin: 0 15px;
  }

  .mobile-game-opponent {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
  }

  .mobile-game-item {
    text-align: center;
    margin: 12px 0;
  }

  .mobile-game-item img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 8px;
  }

  .mobile-game-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-game-value-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-game-value-icon svg {
    width: 16px;
    height: 16px;
    color: white;
  }

  .mobile-game-value-text {
    text-align: left;
  }

  .mobile-game-value-main {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 0;
  }

  .mobile-game-value-range {
    font-size: 14px;
    color: #717171;
    margin: 0;
  }

  .mobile-game-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
  }

  .mobile-game-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
  }

  .mobile-game-btn.join {
    background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(20, 175, 138, 0.3);
  }

  .mobile-game-btn.join:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 175, 138, 0.4);
  }

  .mobile-game-btn.view {
    background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
    color: #14AF8A;
    border: 2px solid #14AF8A;
  }

  .mobile-game-btn.view:hover {
    background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    color: white;
    transform: translateY(-2px);
  }

  .mobile-game-btn.completed {
    background: linear-gradient(135deg, #717171 0%, #5a5a5a 100%);
    color: #ffffff;
    cursor: default;
  }

  .mobile-game-btn.completed:hover {
    background: linear-gradient(135deg, #717171 0%, #5a5a5a 100%);
    transform: none;
    box-shadow: none;
  }

  .completed-match {
    opacity: 0.7;
    filter: grayscale(0.3);
  }

  .completed-match .mobile-game-value-range {
    color: #717171;
    font-size: 12px;
  }

  /* Desktop completed matches styles */
  .completed-match.row {
    opacity: 0.7;
    filter: grayscale(0.3);
  }

  .completed-match .desktop-value-range {
    color: #717171;
    font-size: 12px;
  }
  
  /* Compact styles for completed matches */
  .completed-match.mobile-game-card {
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .completed-match .mobile-game-header {
    margin-bottom: 10px;
  }
  
  .completed-match .mobile-game-item {
    margin: 8px 0;
  }
  
  .completed-match .mobile-game-value {
    margin: 8px 0;
    padding: 8px;
  }
  
  .completed-match .mobile-game-actions {
    margin-top: 10px;
  }
  
  /* Extra small screens for mobile game cards */
  @media only screen and (max-width: 480px) {
    .mobile-game-card {
      padding: 12px;
      margin-bottom: 10px;
    }
    
    .mobile-game-header {
      margin-bottom: 12px;
    }
    
    .mobile-game-avatar {
      width: 40px;
      height: 40px;
    }
    
    .mobile-game-opponent {
      width: 40px;
      height: 40px;
    }
    
    .mobile-game-item {
      margin: 10px 0;
    }
    
    .mobile-game-item img {
      width: 50px;
      height: 50px;
    }
    
    .mobile-game-value {
      margin: 10px 0;
      padding: 10px;
    }
    
    .mobile-game-value-main {
      font-size: 16px;
    }
    
    .mobile-game-value-range {
      font-size: 10px;
    }
    
    .mobile-game-actions {
      margin-top: 12px;
    }
    
    .mobile-game-btn {
      padding: 10px 8px;
      font-size: 12px;
    }
    
    /* Completed matches on small screens */
    .completed-match.mobile-game-card {
      padding: 10px;
      margin-bottom: 8px;
    }
    
    .completed-match .mobile-game-header {
      margin-bottom: 10px;
    }
    
    .completed-match .mobile-game-item {
      margin: 8px 0;
    }
    
    .completed-match .mobile-game-value {
      margin: 8px 0;
      padding: 8px;
    }
    
    .completed-match .mobile-game-actions {
      margin-top: 10px;
    }
  }
  
  /* Very small screens */
  @media only screen and (max-width: 360px) {
    .mobile-game-card {
      padding: 10px;
      margin-bottom: 8px;
    }
    
    .mobile-game-header {
      margin-bottom: 10px;
    }
    
    .mobile-game-avatar {
      width: 35px;
      height: 35px;
    }
    
    .mobile-game-opponent {
      width: 35px;
      height: 35px;
    }
    
    .mobile-game-vs {
      font-size: 20px;
      margin: 0 10px;
    }
    
    .mobile-game-item {
      margin: 8px 0;
    }
    
    .mobile-game-item img {
      width: 45px;
      height: 45px;
    }
    
    .mobile-game-value {
      margin: 8px 0;
      padding: 8px;
    }
    
    .mobile-game-value-main {
      font-size: 14px;
    }
    
    .mobile-game-value-range {
      font-size: 9px;
    }
    
    .mobile-game-actions {
      margin-top: 10px;
    }
    
    .mobile-game-btn {
      padding: 8px 6px;
      font-size: 11px;
    }
    
    /* Completed matches on very small screens */
    .completed-match.mobile-game-card {
      padding: 8px;
      margin-bottom: 6px;
    }
    
    .completed-match .mobile-game-header {
      margin-bottom: 8px;
    }
    
    .completed-match .mobile-game-item {
      margin: 6px 0;
    }
    
    .completed-match .mobile-game-value {
      margin: 6px 0;
      padding: 6px;
    }
    
    .completed-match .mobile-game-actions {
      margin-top: 8px;
    }
  }

  /* Mobile Item Selection */
  .mobile-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin: 20px 0;
  }

  .mobile-item-card {
    background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .mobile-item-card.selected {
    border-color: #14AF8A;
    background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
  }

  .mobile-item-card img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .mobile-item-card .item-name {
    font-size: 12px;
    color: #717171;
    margin: 0;
  }

  .mobile-item-card.selected .item-name {
    color: white;
  }

  /* Mobile Side Selection */
  .mobile-side-selection {
    display: flex;
    gap: 15px;
    margin: 20px 0;
  }

  .mobile-side-option {
    flex: 1;
    background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .mobile-side-option:hover {
    border-color: #14AF8A;
    transform: translateY(-2px);
  }

  .mobile-side-option img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
  }

  .mobile-side-option .side-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
  }

  .mobile-side-option .side-desc {
    font-size: 12px;
    color: #717171;
    margin: 5px 0 0 0;
  }

  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(20, 175, 138, 0.3);
  }

  .mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
    color: white;
  }

  /* Mobile Header */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: linear-gradient(135deg, #0f1019 0%, #171925 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  .mobile-header .logo {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-header .logo img {
    height: 35px;
    width: auto;
  }

  .mobile-header .logo font {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Mobile Bottom Navigation */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0f1019 0%, #171925 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    /* Safe area for iPhone */
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    height: 80px;
  }

  .mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #717171;
    position: relative;
    min-width: 60px;
  }

  .mobile-bottom-nav .nav-item.active {
    color: #14AF8A;
  }

  .mobile-bottom-nav .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    border-radius: 2px;
  }

  .mobile-bottom-nav .nav-item svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
  }

  .mobile-bottom-nav .nav-item .nav-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
  }

  .mobile-bottom-nav .nav-item:hover {
    color: #14AF8A;
    transform: translateY(-2px);
  }

  .mobile-bottom-nav .nav-item:active {
    transform: translateY(0);
  }

  /* Mobile Chat Styles */
  .mobile-chat-message {
    animation: slideInMessage 0.3s ease;
  }

  @keyframes slideInMessage {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #mobile-chat-input {
    outline: none;
    transition: all 0.3s ease;
  }

  #mobile-chat-input:focus {
    border-color: #14AF8A;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(20, 175, 138, 0.2);
  }

  #mobile-chat-input::placeholder {
    color: #717171;
  }

  #mobile-chat-messages::-webkit-scrollbar {
    width: 4px;
  }

  #mobile-chat-messages::-webkit-scrollbar-track {
    background: transparent;
  }

  #mobile-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
  }

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

  /* Mobile Tab Content */
  .mobile-tab-content {
    animation: fadeIn 0.3s ease;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Mobile Sidebar Overlay */
  .mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Sidebar */
  .mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: linear-gradient(135deg, #0f1019 0%, #171925 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 80px 20px 20px;
    overflow-y: auto;
  }

  .mobile-sidebar.show {
    left: 0;
  }

  .mobile-sidebar .item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2a2e44 0%, #1a1f2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    color: #717171;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .mobile-sidebar .item:hover,
  .mobile-sidebar .item.active {
    background: linear-gradient(135deg, #14AF8A 0%, #0d8a6f 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 175, 138, 0.3);
  }

  .mobile-sidebar .item svg {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    transition: all 0.3s ease;
  }

  .mobile-sidebar .item span {
    font-size: 14px;
    font-weight: 600;
  }

  /* Adjust main content for mobile */
  .main {
    margin-top: 70px !important;
    margin-bottom: 80px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Hide desktop sidebar on mobile */
  .leftsidebar {
    display: none !important;
  }

  /* Show mobile elements on mobile */
  .mobile-menu-toggle {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  .mobile-sidebar {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
  }
}

/* Animations */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.02);
  }
}

@keyframes loadingGlow {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.6;
  }
}

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

@keyframes shrinkOut {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.main-container {
  height: 100%;
  box-sizing: border-box;
  display: flex;
        flex-direction: column;
  animation: page-slide-in 150ms forwards ease-out;
  opacity: 0;
  transition: opacity 0.5s ease;
  overflow-x: hidden;
  max-width: 100vw;
}

@keyframes page-slide-in {
  from {
    opacity: 0.5;
    transform: translateY(-2.5rem);
  }

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

/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .mobile-bottom-nav {
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    height: 90px;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
  }
  
  #mobile-chat-tab > div {
    height: calc(100vh - 280px) !important;
    -webkit-overflow-scrolling: touch;
  }
  
  #mobile-chat-messages {
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    max-height: calc(100vh - 350px);
  }
  
  .main {
    padding-bottom: 140px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .mobile-tab-content {
    padding-bottom: 50px;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }
  
  /* Additional Safari fixes for chat input */
  #mobile-chat-input {
  border-radius: 8px;
  position: relative;
  z-index: 10;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
}
  
  /* Fix for Safari viewport height issues */
  @supports (-webkit-touch-callout: none) and (not (translate: none)) {
    #mobile-chat-tab > div {
      height: calc(100vh - 300px) !important;
    }
  }
  
  /* Force Safari to respect viewport height */
body {
  height: 100vh;
  height: -webkit-fill-available;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

html {
  overflow-x: hidden;
}

/* Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  body {
    /* Prevent zoom on input focus */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  
  /* Fix for Safari viewport issues */
  .mobile-tab-content {
    min-height: calc(100vh - 280px);
  }
  
  /* Fix for Safari flexbox issues */
  .mobile-bottom-nav {
    background: rgba(15, 16, 25, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }
  
  /* Fix for Safari input issues */
  input, textarea, select {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
  
  /* Fix for Safari button issues */
  button {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
  }
}

/* Принудительное отображение чата на ПК */
@media only screen and (min-width: 769px) {
  .leftsidebar {
    position: fixed !important;
    left: 0 !important;
    top: var(--header-height) !important;
    bottom: 0 !important;
    width: 300px !important;
    background: linear-gradient(135deg, #0f1019 0%, #171925 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 1000 !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3) !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    clip: auto !important;
    overflow: visible !important;
  }
  
  .leftsidebar * {
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  #chatcontainer {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .chat-form {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .online-indicator {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .chatline {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .chatbox {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .chat-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Исправление для Safari на ПК */
  .main {
    margin-left: 300px !important;
    width: calc(100% - 300px) !important;
  }
}

/* Pagination styles */
.pagination-container {
  margin-top: 30px;
  text-align: center;
}

.pagination-info {
  margin-bottom: 15px;
  color: #888;
  font-size: 0.9em;
}

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

a.pagination-btn, a.mobile-pagination-btn {
  background: #2c3e50;
  color: #fff;
  border-radius: 4px;
  border: 1px solid #34495e;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s;
}
a.pagination-btn:hover, a.mobile-pagination-btn:hover {
  background: #34495e;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-color: #4a5f7a;
}
a.pagination-btn.active, a.mobile-pagination-btn.active {
  background: #3498db;
  border-color: #2980b9;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

@media (max-width: 768px) {
  .pagination-controls {
    gap: 4px;
  }
  
  .pagination-btn {
    padding: 6px 10px;
    font-size: 0.8em;
    min-width: 35px;
    min-height: 32px;
  }
}

/* Desktop pagination styles */
@media (min-width: 769px) {
  .pagination-controls {
    gap: 6px;
  }
  
  .pagination-btn {
    padding: 10px 16px;
    font-size: 0.95em;
    min-width: 44px;
    min-height: 40px;
    border-radius: 6px;
  }
  
  .pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
}

/* Mobile Leaderboard Styles */
.mobile-leaderboard-item {
  transition: all 0.3s ease;
}

.mobile-leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-leaderboard-item.top-rank {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%) !important;
  border: 1px solid rgba(255, 215, 0, 0.3) !important;
}

.mobile-leaderboard-item.top-rank:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.08) 100%) !important;
}

/* Mobile Pagination Styles */
.mobile-pagination-btn {
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mobile-pagination-btn:hover {
  background: #34495e !important;
  color: white !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mobile-pagination-btn.active {
  background: #3498db !important;
  border-color: #2980b9 !important;
  font-weight: bold !important;
}

.mobile-pagination-btn:disabled,
.mobile-pagination-btn[disabled] {
  background: #95a5a6 !important;
  border-color: #7f8c8d !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

@media (max-width: 480px) {
  .mobile-pagination-controls {
    gap: 2px !important;
  }
  
  .mobile-pagination-btn {
    padding: 4px 6px !important;
    font-size: 9px !important;
    min-width: 24px !important;
    min-height: 32px !important;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .pagination-btn,
  .mobile-pagination-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  
  .pagination-controls,
  .mobile-pagination-controls {
    -webkit-overflow-scrolling: touch;
  }
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
  .pagination-btn,
  .mobile-pagination-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
  
  .pagination-controls,
  .mobile-pagination-controls {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .pagination-btn,
  .mobile-pagination-btn {
    padding: 3px 4px !important;
    font-size: 8px !important;
    min-width: 20px !important;
    min-height: 28px !important;
  }
  
  .pagination-controls,
  .mobile-pagination-controls {
    gap: 2px !important;
  }
  
  .pagination-info,
  .mobile-pagination-info {
    font-size: 10px !important;
    margin-bottom: 8px !important;
  }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
  .pagination-container,
  .mobile-pagination-container {
    margin-top: 15px !important;
  }
  
  .pagination-btn,
  .mobile-pagination-btn {
    padding: 6px 8px !important;
    min-height: 36px !important;
  }
}

/* Real mobile device fixes */
@media only screen and (max-width: 768px) {
  /* Fix for real mobile devices */
  .mobile-tab-content {
    padding-bottom: 80px !important;
    min-height: calc(100vh - 200px) !important;
  }
  
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: rgba(15, 16, 25, 0.98) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  /* Fix for mobile viewport issues */
  .mobile-game-card {
    margin-bottom: 15px !important;
  }
  
  /* Fix for mobile text rendering */
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Fix for mobile touch targets */
  .mobile-game-btn {
    min-height: 44px !important;
    min-width: 44px !important;
    touch-action: manipulation !important;
  }
  
  /* Fix for mobile scrolling */
  .mobile-tab-content {
    -webkit-overflow-scrolling: touch !important;
    overflow-y: auto !important;
  }
}

/* iPhone specific fixes */
@media only screen and (max-width: 414px) and (-webkit-min-device-pixel-ratio: 2) {
  .mobile-tab-content {
    padding-bottom: 90px !important;
  }
  
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom) !important;
    height: 90px !important;
  }
  
  .mobile-game-card {
    margin-bottom: 12px !important;
  }
  

}

/* iPad specific fixes */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {
  .mobile-tab-content {
    padding-bottom: 70px !important;
  }
  
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom) !important;
    height: 70px !important;
  }
  

}

/* Additional Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  /* Fix for Safari viewport height issues */
  body {
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }
  
  html {
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }
  
  /* Fix for Safari viewport height issues */
  .mobile-game-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  /* Fix for Safari flexbox issues */
  .mobile-bottom-nav {
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-around;
    justify-content: space-around;
  }
  
  /* Fix for Safari scrolling issues */
  .mobile-tab-content,
  #mobile-chat-messages,
  .main {
    -webkit-overflow-scrolling: touch !important;
    overflow-y: auto !important;
  }
  
  /* Fix for Safari input focus issues */
  input:focus,
  textarea:focus,
  select:focus {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Fix for Safari button tap issues */
  button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }
  
  /* Fix for Safari fixed positioning issues */
  .mobile-bottom-nav,
  .mobile-header,
  header {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  /* Fix for Safari backdrop-filter issues */
  .mobile-bottom-nav {
    background: rgba(15, 16, 25, 0.98) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  
  /* Fix for Safari text rendering */
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Fix for Safari touch targets */
  .mobile-game-btn,
  .mobile-bottom-nav .nav-item {
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Fix for Safari viewport height on landscape */
  @media (orientation: landscape) {
    .mobile-tab-content {
      min-height: calc(100vh - 150px);
    }
    
    .mobile-bottom-nav {
      height: 60px;
      padding: 5px 0;
    }
  }
  
  /* Fix for Safari input zoom */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    border-radius: 0 !important;
  }
  
  /* Fix for Safari button appearance */
  button {
    appearance: none !important;
    -webkit-appearance: none !important;
    border-radius: 0 !important;
    -webkit-tap-highlight-color: transparent !important;
  }
}

/* --- Мобильные кнопки пагинации: компактный вид --- */
@media (max-width: 480px) {
  .mobile-pagination-btn {
    padding: 3px 6px !important;
    font-size: 10px !important;
    min-width: 22px !important;
    min-height: 28px !important;
    border-radius: 4px !important;
  }
}

@media (max-width: 360px) {
  .mobile-pagination-btn {
    padding: 2px 4px !important;
    font-size: 9px !important;
    min-width: 18px !important;
    min-height: 22px !important;
  }
}

/* --- ПК стили для .mobile-pagination-btn --- */
@media (min-width: 769px) {
  .mobile-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2c3e50;
    color: #fff;
    border-radius: 6px;
    border: 1px solid #34495e;
    min-width: 36px;
    min-height: 32px;
    padding: 8px 14px;
    font-size: 0.95em;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
  }
  .mobile-pagination-btn:hover {
    background: #34495e;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-color: #4a5f7a;
  }
  .mobile-pagination-btn.active {
    background: #3498db;
    border-color: #2980b9;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
  }
}

}
