:root {
  /* Light Theme */
  --primary: #2563eb;
  --secondary: #3b82f6;
  --success: #22c55e;
  --danger: #ef4444;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --border: #e2e8f0;
  --modal-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.05);
  --system-message: #f0fdf4;
  --admin-message: #eff6ff;
  --mod-message: #fef2f2;
  --media-message: #ffcc80;
  --own-message: #e0e7ff;
  --rare: #0000ff;
  --epic: #bd1fdd;
  --legendary: #ffa500;
  --godlike: #ffff00;
}

[data-theme="dark"] {
  /* Dark Theme */
  --primary: #3b82f6;
  --secondary: #60a5fa;
  --success: #22c55e;
  --danger: #ef4444;
  --background: #1a1a1a;
  --card-bg: #2d2d2d;
  --text: #ffffff;
  --border: #404040;
  --modal-bg: #2d2d2d;
  --shadow: rgba(0, 0, 0, 0.2);
  --system-message: rgba(240, 253, 244, 0.1);
  --admin-message: rgba(239, 246, 255, 0.1);
  --mod-message: rgba(254, 242, 242, 0.1);
  --media-message: rgba(255, 140, 0, 0.2);
  --own-message: rgba(224, 231, 255, 0.1);
}

[data-theme="sepia"] {
  --primary: #8B4513;
  --secondary: #A0522D;
  --success: #228B22;
  --danger: #B22222;
  --background: #FDF5E6;
  --card-bg: #FFF8DC;
  --text: #5C4033;
  --border: #DEB887;
  --modal-bg: #FFF8DC;
  --shadow: rgba(0, 0, 0, 0.1);
  --system-message: #F5F5DC;
  --admin-message: #FAEBD7;
  --mod-message: #FFE4C4;
  --media-message: #e9967a;
  --own-message: #FFFACD;
}

[data-theme="solarized"] {
  --primary: #268bd2;
  --secondary: #2aa198;
  --success: #859900;
  --danger: #dc322f;
  --background: #fdf6e3;
  --card-bg: #eee8d5;
  --text: #657b83;
  --border: #93a1a1;
  --modal-bg: #eee8d5;
  --shadow: rgba(0, 0, 0, .1);
  --system-message: #b58900;
  --admin-message: #cb4b16;
  --mod-message: #d33682;
  --media-message: #e9967a;
  --own-message: #6c71c4;
}

[data-theme="nord"] {
  --primary: #5e81ac;
  --secondary: #81a1c1;
  --success: #a3be8c;
  --danger: #bf616a;
  --background: #2e3440;
  --card-bg: #3b4252;
  --text: #eceff4;
  --border: #434c5e;
  --modal-bg: #3b4252;
  --shadow: rgba(0, 0, 0, 0.2);
  --system-message: rgba(163, 190, 140, 0.1);
  --admin-message: rgba(129, 161, 193, 0.1);
  --mod-message: rgba(191, 97, 106, 0.1);
  --media-message: rgba(191, 97, 6, 0.2);
  --own-message: rgba(94, 129, 172, 0.1);
}

[data-theme="dracula"] {
  --primary: #bd93f9;
  --secondary: #ff79c6;
  --success: #50fa7b;
  --danger: #ff5555;
  --background: #282a36;
  --card-bg: #44475a;
  --text: #f8f8f2;
  --border: #6272a4;
  --modal-bg: #44475a;
  --shadow: rgba(0, 0, 0, 0.2);
  --system-message: rgba(80, 250, 123, 0.1);
  --admin-message: rgba(189, 147, 249, 0.1);
  --mod-message: rgba(255, 85, 85, 0.1);
  --media-message: rgba(255, 140, 0, 0.3);
  --own-message: rgba(255, 121, 198, 0.1);
}

[data-theme="monokai"] {
  --primary: #66d9ef;
  --secondary: #fd971f;
  --success: #a6e22e;
  --danger: #f92672;
  --background: #272822;
  --card-bg: #3e3d32;
  --text: #f8f8f2;
  --border: #75715e;
  --modal-bg: #3e3d32;
  --shadow: rgba(0, 0, 0, 0.2);
  --system-message: rgba(166, 226, 46, 0.1);
  --admin-message: rgba(102, 217, 239, 0.1);
  --mod-message: rgba(249, 38, 114, 0.1);
  --media-message: rgba(255, 165, 0, 0.3);
  --own-message: rgba(253, 151, 31, 0.1);
}

[data-theme="gruvbox"] {
  --primary: #458588;
  --secondary: #d79921;
  --success: #98971a;
  --danger: #cc241d;
  --background: #282828;
  --card-bg: #3c3836;
  --text: #ebdbb2;
  --border: #665c54;
  --modal-bg: #3c3836;
  --shadow: rgba(0, 0, 0, 0.2);
  --system-message: rgba(152, 151, 26, 0.1);
  --admin-message: rgba(69, 133, 136, 0.1);
  --mod-message: rgba(204, 36, 29, 0.1);
  --media-message: rgba(255, 165, 0, 0.3);
  --own-message: rgba(215, 153, 33, 0.1);
}

[data-theme="oceanic"] {
  --primary: #4ec9b0;
  --secondary: #c594c5;
  --success: #99c794;
  --danger: #ec5f67;
  --background: #1b2b34;
  --card-bg: #343d46;
  --text: #d8dee9;
  --border: #65737e;
  --modal-bg: #343d46;
  --shadow: rgba(0, 0, 0, 0.2);
  --system-message: rgba(153, 199, 148, 0.1);
  --admin-message: rgba(197, 148, 197, 0.1);
  --mod-message: rgba(236, 95, 103, 0.1);
  --media-message: rgba(255, 165, 0, 0.3);
  --own-message: rgba(78, 201, 176, 0.1);
}

[data-theme="tokyonight"] {
  --primary: #7aa2f7;
  --secondary: #bb9af7;
  --success: #9ece6a;
  --danger: #f7768e;
  --background: #1a1b26;
  --card-bg: #24283b;
  --text: #c0caf5;
  --border: #3b4261;
  --modal-bg: #24283b;
  --shadow: rgba(0, 0, 0, 0.3);
  --system-message: rgba(158, 206, 106, 0.1);
  --admin-message: rgba(122, 162, 247, 0.1);
  --mod-message: rgba(247, 118, 142, 0.1);
  --media-message: rgba(255, 165, 0, 0.3);
  --own-message: rgba(187, 154, 247, 0.1);
}

[data-theme="pastel"] {
  --primary: #a2bffe;
  --secondary: #f4b8e4;
  --success: #b4e4c6;
  --danger: #ff9999;
  --background: #f5f5f5;
  --card-bg: #ffffff;
  --text: #555555;
  --border: #e0e0e0;
  --modal-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.05);
  --system-message: #e6f3e6;
  --admin-message: #e6f0fa;
  --mod-message: #ffe6e6;
  --media-message: rgb(255, 234, 194);
  --own-message: #f0e6fa;
}

[data-theme="cyberpunk"] {
  --primary: #00ff9f;
  --secondary: #ff00ff;
  --success: #00ff00;
  --danger: #ff0033;
  --background: #0d0c1d;
  --card-bg: #1b1931;
  --text: #e0f7fa;
  --border: #4a3b6b;
  --modal-bg: #1b1931;
  --shadow: rgba(0, 255, 255, 0.1);
  --system-message: rgba(0, 255, 0, 0.2);
  --admin-message: rgba(0, 255, 159, 0.2);
  --mod-message: rgba(255, 0, 51, 0.2);
  --media-message: rgba(255, 140, 0, 0.3);
  --own-message: rgba(255, 0, 255, 0.2);
}

/* Global Reset and Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Utility Classes */
.container {
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Sidebar now within the parent layout */
.sidebar {
  flex: 0 0 250px;
  background: var(--card-bg);
  padding: 1rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  margin: 0.9rem 0;
}

.sidebar .card-header h2 {
  margin-bottom: 1rem;
}

/* Main content area where sidebar is not taking over the full page */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.chat-area .message-container {
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

/* Cards and Forms */
.card-container {
  display: grid;
  gap: 2rem;
  max-width: 800px;
  margin: 2rem auto;
}

.card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  gap: 1rem;
}

.card-center {
  text-align: center;
  max-width: fit-content;
  margin: 0 auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

h2 {
  margin-bottom: 0.5rem;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Tabs  */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
  white-space: nowrap;
}

.tab {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  color: var(--color);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-bottom: none;
  margin-right: 0.5rem;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.tab.active {
  background: #fff;
  color: #1e293b;
  font-weight: bold;
}

.tab-contents .tab-content {
  display: none;
}

/* Chat Tab Styles */
.tab-content#tab-chat {
  flex-direction: column;
  height: 100%;
}

.tab-contents#tab-chat .tab-content.active {
  display: flex;
}

.tab-contents .tab-content.active {
  display: block;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  margin-right: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn#tab-inventory {
  margin-left: 0.5rem;
}

.btn#tab-market {
  margin-left: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--secondary);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  width: 100%;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Chat Area Specifics */
.message-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 1rem;
  margin-bottom: 1rem;
}

/* Lists */
.item-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
}

.list-item {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--background);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Cooldown indicators */
.cooldown {
  color: #64748b;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: var(--modal-bg);
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 400px;
  border-radius: 10px;
  position: relative;
}

.close {
  color: #aaa;
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-actions {
  text-align: right;
  margin-top: 1rem;
}

.actions>button {
  margin-bottom: 0.5rem;
}

/* Links and Footer */
a {
  text-decoration: underline;
  color: var(--text);
}

.footer {
  text-align: center;
  margin-top: 2rem;
}

/* Message Input Area */
.message-input {
  display: flex;
  gap: 0.5rem;
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-input input[type="text"] {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: border-color 0.2s ease;
}

.message-input input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.message-input input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-right: 0.5rem;
}

.message-input button {
  padding: 0.75rem 1.5rem;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.message-input button:hover {
  background: var(--secondary);
}

/* Highlighted Elements */
.highlight {
  border: 1px solid var(--primary);
  border-radius: 3px;
}

/* Chat Tabs */
.chat-tabs button {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s ease;
  cursor: pointer;
}

.chat-tabs button:not(.active):hover {
  background: var(--secondary);
}

.chat-tabs button.active {
  background: var(--secondary);
}

.chat-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Chat Card */
.chat-card {
  display: flex;
  flex-direction: row;
  height: 600px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

/* Chat Messages */
.message {
  color: var(--text);
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  max-width: 70%;
  word-wrap: break-word;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: var(--card-bg);
  position: relative;
  transition: transform 0.2s;
}

.message.messageplate {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #1e1b4b, #0f172a, #4f46e5);
  overflow: hidden;
  z-index: 0;
}

.message.messageplate::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.8;
  z-index: 1;
  pointer-events: none;
}

.message.messageplate.messageplate-bamboo-forest::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/bamboo-forest/messageplate.png');
}

.message.messageplate.messageplate-tokyo-tower::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/tokyo-tower/messageplate.png');
}

.message.messageplate.messageplate-cherry-blossom::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/cherry-blossom/messageplate.png');
}

.message.messageplate.messageplate-bonzai-bliss::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/bonzai-bliss/messageplate.jpg');
}

.message.messageplate.messageplate-full-moon::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/full-moon/messageplate.jpg');
}

.message.messageplate.messageplate-lantern-festival::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/lantern-festival/messageplate.jpg');
}

.message.messageplate.messageplate-starry-night::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/starry-night/messageplate.jpg');
}

.message.messageplate.messageplate-sun-rays::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/sun-rays/messageplate.jpg');
}

.message.messageplate.messageplate-planets-align::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/planets-align/messageplate.jpg');
}

.message.messageplate.messageplate-cityscape-dreams::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/cityscape-dreams/messageplate.jpg');
}

.message.messageplate.messageplate-lightning-storm::before {
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.8) 100%),
    url('https://economix.lol/cosmetics/lightning-storm/messageplate.jpg');
}

.message.messageplate>* {
  position: relative;
  z-index: 2;
}

.message:hover {
  transform: translateX(5px);
}

.message.system {
  background: var(--system-message);
  border-left: 4px solid #22c55e;
}

.message.admin {
  background: var(--admin-message);
  border-left: 4px solid #3b82f6;
}

.message.mod {
  background: var(--mod-message);
  border-left: 4px solid #ef4444;
}

.message.media {
  background: var(--media-message);
  border-left: 4px solid #f59e0b;
}

.message.msg {
  background: var(--own-message);
  margin-left: auto;
  max-width: 70%;
}

.own-message {
  background: var(--own-message);
  border-left: 4px solid #6366f1;
  margin-left: auto;
  max-width: 70%;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  z-index: 3;
}

.message-footer {
  font-size: 0.75rem;
}

.message-sender {
  font-weight: 600;
}

.message-sender.admin {
  color: var(--primary);
}

.message-sender.mod {
  color: var(--danger);
}

.delete-message {
  position: static;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.message:hover .delete-message {
  opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {

  /* In tablet view, layout remains flexible */
  .chat-card {
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .card-container {
    grid-template-columns: 1fr;
  }

  /* Sidebar becomes full-width on mobile */
  .chat-card {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    flex: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  /* Ensure main content adjusts */
  .chat-area {
    padding: 0.5rem;
  }

  .message-input {
    position: relative;
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card-bg);
  color: var(--text);
}

.filters input:focus,
.filters select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.chat-tab-button {
  position: relative;
}

.chat-tab-button.new-messages::after {
  content: '';
  position: absolute;
  right: 5px;
  top: 5px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
}

.banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  text-align: center;
  font-weight: bold;
  color: var(--text);
  background-color: var(--background);
  text-align: center;
}

.pet-list {
  list-style: none;
  padding: 0;
}

.pet-entry {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.pet-entry-content {
  display: flex;
  flex-direction: column;
}

.pet-info {
  margin-bottom: 10px;
}

.pet-benefits {
  color: var(--success);
  font-weight: bold;
}

.pet-status-dead {
  font-weight: bold;
  color: var(--danger);
}

.pet-status-healthy {
  color: var(--success);
}

.pet-status-hungry {
  color: #ffcc00;
}

.pet-status-starving {
  color: var(--danger);
}

#homepage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
}

.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta .btn-lg {
  padding: 1rem 2rem;
  font-size: 1.25rem;
  border-radius: 1rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 4rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
}

.stat-label {
  color: var(--text);
  opacity: 0.8;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}

.feature-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  text-align: center;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.rules-preview {
  padding: 4rem 0;
  text-align: center;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.rule-card {
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--border);
}

.rule-emoji {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.form-select {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card-bg);
  color: var(--text);
  font-size: 1rem;
}

.radio-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  align-items: center;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.radio-group input[type="radio"]:checked+label {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.radio-group label:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

@media (max-width: 768px) {
  .hero h2 {
    font-size: 2.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 2rem;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }
}

.emoji-picker-container {
  position: relative;
}

.emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  display: none;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.25rem;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.emoji-picker.show {
  display: grid;
}

.emoji-picker span {
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  font-size: 1.2rem;
}

.emoji-picker span:hover {
  background: var(--background);
}

.btn-emoji {
  padding: 0.5rem;
  background: none;
  border: none;
  font-size: 1.2rem;
}

.level-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.exp-progress {
  flex-grow: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.exp-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.5s ease;
  box-shadow: 0 2px 4px var(--shadow);
}

.notifications {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notification {
  background: var(--card-bg);
  border: 2px solid var(--primary);
  padding: 1rem;
  border-radius: 0.75rem;
  animation: slideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

/* Add to pet feed button */
.pet-entry button {
  transition: all 0.2s ease;
}

.pet-entry button:active {
  transform: scale(0.95);
}

@keyframes heartBurst {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  100% {
    transform: scale(3);
    opacity: 0;
  }
}

.heart-emoji {
  position: absolute;
  animation: heartBurst 1s ease-out;
}

/* Pet CSS */
.pet-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.pet-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  transition: transform 0.2s ease;
}

.pet-card:hover {
  transform: translateY(-3px);
}

.pet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.pet-name {
  font-weight: bold;
  font-size: 1.1rem;
}

.status-bar {
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  margin: 0.5rem 0;
  position: relative;
  overflow: hidden;
}

.status-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.5s ease;
}

.status-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pet-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-feed {
  background: var(--success);
}

.btn-play {
  background: var(--secondary);
}

.pet-level {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.8;
}

.pet-benefits {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.8;
}

.pet-animation {
  position: absolute;
  animation: floatUp 1.5s ease-out forwards;
  text-align: center;
}

@keyframes floatUp {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(-100px);
    opacity: 0;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

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

.pet-shop {
  margin-top: 2rem;
  border-top: 2px solid var(--border);
  padding-top: 1rem;
}

.pet-option {
  padding: 1rem;
  margin: 0.5rem 0;
  background: var(--card-bg);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pet-option:hover {
  background: var(--primary);
  color: white;
}

#companyDashboard,
#createCompanyForm {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px var(--shadow);
  margin-bottom: 1rem;
}

#taskList {
  list-style: none;
  padding: 0;
}

#taskList li {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#taskList button {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

#taskList button:hover {
  background: var(--secondary);
}

.animated-btn {
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.animated-btn:hover {
  transform: scale(1.1);
  background-color: var(--secondary);
}

.animated-list li {
  animation: fadeIn 0.5s ease;
}

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

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

.animated-list li:hover {
  background-color: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#companyDashboard {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px var(--shadow);
}

#companyDashboard h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

#taskList {
  list-style: none;
  padding: 0;
}

#taskList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

#taskList button {
  background-color: var(--success);
  color: var(--text);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

#taskList button:hover {
  background-color: var(--secondary);
}

.company-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px var(--shadow);
}

.company-dashboard h2 {
  color: var(--primary);
  text-align: center;
}

.task-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.task-item {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-item .task-name {
  font-weight: bold;
  color: var(--text);
}

.task-item .task-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.task-item .task-actions .btn-complete {
  background: var(--success);
  color: #fff;
}

.task-item .task-actions .btn-complete:hover {
  background: var(--secondary);
}

.task-item .task-actions .btn-sell {
  background: var(--primary);
  color: #fff;
}

.task-item .task-actions .btn-sell:hover {
  background: var(--secondary);
}

/* Minigame Modal */
.minigame-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.minigame-modal.active {
  display: flex;
}

.minigame-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 6px var(--shadow);
}

.minigame-content h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.minigame-content button {
  padding: 0.75rem 1.5rem;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.minigame-content button:hover {
  background: var(--secondary);
}

.game-area {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 1rem auto;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.target {
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  animation: fadeIn 0.3s ease-in-out;
}

#scoreDisplay {
  font-size: 1.2rem;
  margin-top: 1rem;
  text-align: center;
}

#startGameButton,
#finishGameButton {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

#startGameButton:hover,
#finishGameButton:hover {
  background: var(--secondary);
}

.memory-box {
  width: 50px;
  height: 50px;
  margin: 10px;
  display: inline-block;
  background-color: lightgray;
  border: 2px solid gray;
  cursor: pointer;
}

.memory-box.box-0 {
  background-color: red;
}

.memory-box.box-1 {
  background-color: blue;
}

.memory-box.box-2 {
  background-color: green;
}

.memory-box.box-3 {
  background-color: yellow;
}

/* Notifications */
.notifications {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.notification {
  background: var(--card-bg);
  border: 2px solid var(--border);
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: slideIn 0.3s ease-out;
  position: relative;
}

.notification .close-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
}

.notification .progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--primary);
  width: 100%;
  transition: width 0.1s linear;
}

.notification.normal {
  border-color: var(--primary);
}

.notification.success {
  border-color: var(--success);
}

.notification.error {
  border-color: var(--danger);
}

.notification.warning {
  border-color: #f59e0b;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

/* Daily Free Spin */
.daily-free-spin {
  margin-top: 2rem;
  text-align: center;
}

.daily-free-spin button {
  padding: 0.75rem 1.5rem;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.daily-free-spin button:hover {
  background: var(--secondary);
}

/* Report Styling */
.report {
  max-width: 1200px;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 4px var(--shadow);
}

.nameplate-gold {
  background: linear-gradient(to bottom, #cfc09f 27%, #ffecb3 40%, #8d671b 78%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
}

button>a {
  text-decoration: none;
  color: #fff;
}

input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--background);
  transition: background 0.2s ease, border-color 0.2s ease;
}

input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.cosmetics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px var(--shadow);
}

.cosmetic-item {
  text-align: center;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.cosmetic-preview {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.cosmetic-item {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cosmetic-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.cosmetic-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.cosmetic-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.cosmetic-actions .btn-buy {
  background: var(--success);
  color: #fff;
}

.cosmetic-actions .btn-buy:hover {
  background: var(--secondary);
}

.cosmetic-actions .btn-equip {
  background: var(--primary);
  color: #fff;
}

.cosmetic-actions .btn-equip:hover {
  background: var(--secondary);
}

/* Cosmetics Library */
.cosmetics-library {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px var(--shadow);
}

.cosmetics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.cosmetics-container .cosmetic-item {
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cosmetics-container .cosmetic-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.cosmetics-container .cosmetic-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.cosmetics-container .cosmetic-item .cosmetic-name {
  font-size: 1rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.cosmetics-container .cosmetic-item .cosmetic-type {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.cosmetics-container .cosmetic-item .btn-equip {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cosmetics-container .cosmetic-item .btn-equip:hover {
  background: var(--secondary);
}

/* Equipped Cosmetics */
.cosmetics-equipped {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  text-align: center;
}

.cosmetics-equipped h3 {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 1rem;
}

.cosmetics-equipped p {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

ul {
  list-style: none;
  padding: 0;
}

ul li {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pro-gems-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.pro-gems-item {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pro-gems-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.pro-gems-item h3 {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 1rem;
}

.pro-gems-item button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pro-gems-item button:hover {
  background: var(--secondary);
}

.leaderboard-top {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.leaderboard-top-item {
  flex: 1;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 2px 4px var(--shadow);
}

#leaderboardFirst {
  background: linear-gradient(to top, rgba(255, 204, 0, 0.25), rgba(255, 204, 0, 0) 100%),
    var(--card-bg);
}

#leaderboardSecond {
  background: linear-gradient(to top, rgba(192, 192, 192, 0.25), rgba(192, 192, 192, 0) 100%),
    var(--card-bg);
}

#leaderboardThird {
  background: linear-gradient(to top, rgba(205, 127, 50, 0.25), rgba(205, 127, 50, 0) 100%),
    var(--card-bg);
}

.leaderboard-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.leaderboard-rank {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
}

.leaderboard-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0.5rem 0;
}

.leaderboard-score {
  font-size: 1rem;
  color: var(--text);
}

.leaderboard-list .leaderboard-rank {
  font-weight: bold;
  margin-right: 1rem;
}

.leaderboard-list .leaderboard-name {
  flex: 1;
}

.leaderboard-list .leaderboard-score {
  font-weight: bold;
  color: var(--primary);
}

.leaderboard-list>li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
}

.minigames-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.minigames-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card-bg);
  margin-bottom: 0.5rem;
}

.minigames-list button {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.minigames-list button:hover {
  background: var(--secondary);
}

.badge-icon {
  vertical-align: middle;
  display: inline-block;
}