body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-image: url(background.jpg);
  background-repeat: repeat;
  background-size: 5%;
  color: #fff;
}

.sticky-header-section {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-image: url(background.jpg);
  background-repeat: repeat;
  background-size: 5%;
  padding: 4px 10px;
}

.logo img {
  height: 40px;
}

.search-container {
  display: flex;
  justify-content: center;
  padding: 8px 10px;
  background: rgba(0,0,0,0.3);
}

.search-filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  max-width: 520px;
  width: 100%;
}

.search-filter-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

.filter-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.filter-btn:hover {
  border-color: #888;
  background: #333;
}

.filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1c1c1c;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 10px 12px;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.filter-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e0e0e0;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
}

.user-list-block {
  padding: 10px 12px 4px;
  text-align: center;
}

.user-list-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #fff;
}

.user-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #222;
  border: 1px solid #444;
  border-radius: 20px;
  color: #e0e0e0;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.user-chip:hover, .user-chip.active {
  border-color: #4a9eff;
  color: #fff;
}

.user-chip img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

.user-chip .user-count {
  color: #4a9eff;
  font-weight: bold;
}

.search-container input[type="text"] {
  width: 100%;
  max-width: 500px;
  font-size: 16px;
  padding: 8px 12px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  border-radius: 4px;
}

.search-container input[type="text"]::placeholder {
  color: #999;
}

.om-button-panel {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(0,0,0,0.3);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.om-panel-btn { display: inline-block; vertical-align: middle; margin: 2px 4px; }
.om-panel-img { display: block; border: 0; max-height: 30px; width: auto; }

.om-user-section {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.banner {
  width: 100%;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  background: #111;
}

.banner img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border: 0;
}

.featured {
  padding: 2px 0;
}

.app-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 0 4px;
}

.app {
  float: none;
  width: calc(50% - 10px);
  margin: 0 5px 8px;
  display: flex;
  align-items: center;
  padding: 6px;
  background-image: url(app-background.png);
  background-size: cover;
  color: #e0e0e0;
  cursor: pointer;
  box-sizing: border-box;
  border-radius: 4px;
  min-height: 64px;
}

.app img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
  flex-shrink: 0;
  border-radius: 4px;
}

.app-info {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.app-title {
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

.app-info span {
  font-size: 12px;
  color: #bbb;
}

.add {
  float: none;
  width: calc(50% - 10px);
  margin: 0 5px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  box-sizing: border-box;
}

.add img {
  max-width: 100%;
  height: auto;
}

.footer {
  color: #aaa;
  text-align: center;
  padding: 15px 0;
  font-size: 13px;
}

h2 {
  color: #fff;
  text-align: center;
  font-size: 18px;
  margin: 16px 0 10px;
}

.premium-user {
  color: #ffd700;
}

/* Pagination */
.pagination {
  text-align: center;
  margin: 20px 0;
}

.pagination a {
  display: inline-block;
  padding: 6px 12px;
  margin: 2px;
  background: #2c2c2c;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-size: 14px;
}

.pagination a.active {
  background: #4a4a4a;
  font-weight: bold;
}

.pagination .page-info {
  color: #aaa;
  font-size: 12px;
  margin-top: 6px;
}

/* Loading */
.loading {
  text-align: center;
  color: #aaa;
  padding: 40px;
  font-size: 16px;
}

.error-message {
  text-align: center;
  color: #ff6b6b;
  padding: 20px;
}

/* Screenshots */
.screenshots {
  overflow-x: auto;
  white-space: nowrap;
  padding: 16px 0;
  background: rgba(0,0,0,0.3);
}

.screenshots img {
  width: 160px;
  height: 285px;
  object-fit: cover;
  border: 6px solid #ccc;
  margin: 0 6px;
  cursor: pointer;
}

/* App page */
.main-info {
  display: flex;
  align-items: center;
  padding: 14px 10px;
  background: #333;
}

.app-logo { width: 56px; height: 56px; margin-right: 14px; border-radius: 6px; }

.app-text { flex: 1; min-width: 0; }
.main-title { font-size: 18px; font-weight: bold; color: #fff; }
.app-author { color: #aaa; font-size: 12px; margin-top: 2px; }

.install-btn {
  background: #54c8d5;
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 8px 18px;
  text-decoration: none;
  display: inline-block;
  border-radius: 4px;
  white-space: nowrap;
}

.fav-flag {
  width: 32px;
  height: 48px;
  margin-left: 10px;
  padding: 0;
  vertical-align: middle;
  background: transparent no-repeat center / contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 48'><path d='M2.5 4h21v38l-10.5 -10-10.5 10V4z' fill='rgba(255,255,255,0)' stroke='%23e6c300' stroke-width='3'/></svg>");
  border: none;
  cursor: pointer;
}

.fav-flag:hover {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 48'><path d='M2.5 4h21v38l-10.5 -10-10.5 10V4z' fill='rgba(230,195,0,0.3)' stroke='%23e6c300' stroke-width='3'/></svg>");
}

.fav-flag.active {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 48'><path d='M2.5 4h21v38l-10.5 -10-10.5 10V4z' fill='%23e6c300' stroke='%23e6c300' stroke-width='3'/></svg>");
}

.description {
  color: #ddd;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  font-size: 14px;
  line-height: 1.5;
}

.description strong { color: #fff; }

.version-selector {
  padding: 12px;
}

.version-selector select {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  width: 100%;
  max-width: 400px;
  border-radius: 4px;
}

/* Reviews */
.reviews-section {
  padding: 16px;
}

.review {
  background: rgba(255,255,255,0.08);
  padding: 12px;
  margin: 10px 0;
  border-radius: 4px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.review-header a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ddd;
  font-size: 14px;
}

.review-header img {
  border-radius: 50%;
  object-fit: cover;
  width: 36px;
  height: 36px;
}

.review-rating { color: #ffd700; font-size: 16px; }

.review-text { font-size: 14px; color: #ddd; margin: 6px 0; }
.review-date { font-size: 11px; color: #888; }

.add-review {
  background: rgba(255,255,255,0.08);
  padding: 16px;
  margin: 16px;
  border-radius: 4px;
}

.add-review h3 { margin: 0 0 10px; font-size: 16px; }

.star-rating { direction: rtl; unicode-bidi: bidi-override; text-align: left; }
.star-rating input { display: none; }
.star-rating label { font-size: 26px; color: #555; cursor: pointer; display: inline-block; }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: #ffd700; }

.add-review textarea {
  width: 100%;
  height: 80px;
  margin: 10px 0;
  padding: 8px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  box-sizing: border-box;
  border-radius: 4px;
}

.add-review button {
  padding: 8px 20px;
  background: #a0b532;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.review-edit-box {
  background: rgba(0,0,0,0.25);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 12px;
  margin: 8px 0;
  color: #fff;
}

.review-edit-box textarea {
  width: 100%;
  height: 80px;
  margin: 10px 0;
  padding: 8px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  box-sizing: border-box;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.reactions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.react-btn {
  border: 1px solid #555;
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ccc;
  border-radius: 3px;
}

.react-btn.active {
  border-color: #54c8d5;
  background: rgba(84,200,213,0.2);
  color: #fff;
}

.comments-toggle {
  cursor: pointer;
  color: #5b9bd5;
  font-size: 13px;
}

.comments-box {
  margin-top: 10px;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid #444;
  display: none;
  border-radius: 4px;
}

.comment-item {
  padding: 8px 0;
  border-bottom: 1px solid #333;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.comment-item:last-child { border-bottom: none; }

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-meta { font-size: 12px; color: #888; }
.comment-text { margin: 4px 0 0; font-size: 13px; color: #ccc; word-wrap: break-word; }

.comment-form {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.comment-form input {
  flex: 1;
  padding: 8px;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  border-radius: 4px;
}

.comment-form button {
  padding: 8px 14px;
  border: none;
  background: #a0b532;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
}

/* Categories */
.category-list {
  padding: 0 10px;
}

.category-item {
  background: rgba(255,255,255,0.08);
  padding: 12px 16px;
  margin: 6px 0;
  cursor: pointer;
  border-radius: 4px;
  color: #ddd;
}

.category-item:hover {
  background: rgba(255,255,255,0.15);
}

.category-item .cat-title { color: #fff; font-weight: bold; font-size: 15px; }
.category-item .cat-desc { font-size: 12px; color: #888; margin-top: 2px; }

/* Auth forms */
.auth-form {
  max-width: 340px;
  margin: 60px auto;
  padding: 24px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
}

.auth-form h2 { text-align: center; margin-top: 0; }

.auth-form input {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border: 1px solid #555;
  background: #222;
  color: #fff;
  box-sizing: border-box;
  border-radius: 4px;
}

.auth-form button {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  background: #a0b532;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
}

.auth-form .auth-link {
  text-align: center;
  font-size: 13px;
  color: #aaa;
}

.auth-form .auth-link a { color: #a0b532; text-decoration: none; }

.auth-error {
  color: #ff6b6b;
  text-align: center;
  margin: 6px 0;
  font-size: 13px;
}

/* Profile */
.profile-container {
  max-width: 500px;
  margin: 20px auto;
  padding: 20px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  text-align: center;
}

.profile-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0;
  display: block;
  object-fit: cover;
}

.secret-timer {
  display: block;
  padding: 10px 16px;
  background: rgba(160,181,50,0.12);
  border: 1px solid #a0b532;
  border-radius: 8px;
  color: #a0b532;
  max-width: 320px;
  text-align: center;
}

.secret-timer-title {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 4px;
}

.secret-timer-digits {
  font-size: 20px;
  font-weight: bold;
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
}

.profile-name { font-size: 22px; margin: 10px 0; color: #fff; }
.profile-desc { color: #aaa; font-size: 14px; margin: 8px 0; }
.profile-date { color: #888; font-size: 12px; }

.profile-back {
  display: inline-block;
  color: #a0b532;
  text-decoration: none;
  margin-bottom: 16px;
  font-size: 14px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.avatar-option {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  object-fit: cover;
  border: 3px solid transparent;
}

.avatar-option.selected { border-color: #a0b532; }

.profile-save-btn {
  padding: 10px 24px;
  background: #a0b532;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 15px;
  margin-top: 8px;
}

.profile-tab {
  flex: 1;
  padding: 10px 16px;
  background: rgba(255,255,255,0.05);
  color: #ccc;
  border: 1px solid #444;
  cursor: pointer;
  border-radius: 4px;
  font-size: 15px;
}

.profile-tab:hover { background: rgba(255,255,255,0.1); }

.profile-tab.active {
  background: #a0b532;
  color: #fff;
  border-color: #a0b532;
}

.telegram-box {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid #444;
  border-radius: 4px;
  text-align: left;
}

.telegram-title { font-size: 16px; margin: 0 0 10px; color: #fff; }

.telegram-btn {
  padding: 8px 18px;
  background: #54c8d5;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.telegram-code {
  display: inline-block;
  padding: 6px 12px;
  background: #111;
  color: #fff;
  font-family: monospace;
  font-size: 16px;
  border-radius: 3px;
  margin: 6px 0;
}

.telegram-note { color: #aaa; font-size: 13px; margin-top: 6px; }
.telegram-username {
  display: inline-block;
  padding: 6px 12px;
  background: #111;
  color: #fff;
  border-radius: 3px;
  font-size: 14px;
}

/* Modal for screenshots */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal img {
  max-width: 90%;
  max-height: 90%;
  border: 6px solid #fff;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 480px) {
  .app { width: calc(50% - 8px); margin: 0 4px 8px; }
  .add { width: calc(50% - 8px); margin: 0 4px 8px; }
  .app img { width: 44px; height: 44px; }
  .app-title { font-size: 13px; }
  .main-title { font-size: 16px; }
  .install-btn { font-size: 15px; padding: 6px 14px; }
  .screenshots img { width: 120px; height: 213px; }
}

@media (min-width: 768px) {
  .app { width: calc(33.33% - 10px); }
  .add { width: calc(33.33% - 10px); }
}

@media (min-width: 1024px) {
  .app { width: calc(25% - 10px); }
  .add { width: calc(25% - 10px); }
}

/* Language switcher */
.om-lang-switch{padding:14px 10px;text-align:center;color:#ddd;font-family:Arial,sans-serif;border-top:1px solid rgba(255,255,255,.12);}
.om-lang-switch .lang-group{display:inline-block;overflow:hidden;border:1px solid #555;border-radius:6px;background:#333;}
.om-lang-switch a{display:inline-block;min-width:46px;padding:6px 14px;color:#fff;text-decoration:none;background:#333;}
.om-lang-switch a+a{border-left:1px solid #555;}
.om-lang-switch a.active{background:#a0b532;color:#fff;}
