/* General Styles */
:root {
  --primary-color: #e6b800;
  --secondary-color: #1a1a1a;
  --accent-color: #d35400;
  --text-color: #333;
  --light-bg: #f0f0f0;
  --dark-bg: #121212;
  --border-radius: 8px;
  --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
  --gradient-primary: linear-gradient(135deg, #e6b800 0%, #ffd700 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: rgba(0, 0, 0, 0.7); /* خلفية شفافة للموقع عند استخدامه في FiveM */
  background-image: url('https://via.placeholder.com/1920x1080/333333/666666?text=FiveM+Background');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  line-height: 1.6;
  direction: rtl;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px; /* إضافة منظور ثلاثي الأبعاد */
}

/* حاوية متجر الرهونات - بشكل تابلت حقيقي */
.pawn-shop-container {
  width: 1100px;
  height: 700px;
  background-color: var(--dark-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7),
             inset 0 0 10px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  border: 12px solid #222;
  position: relative;
  animation: none;
  transform: rotateX(3deg); /* إمالة بسيطة للأمام بدرجة أقل */
}

/* إضافة الإطار الخارجي للتابلت */
.pawn-shop-container::before {
  content: '';
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background-color: #333;
  border-radius: 30px;
  z-index: -1;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}

/* إضافة الكاميرا الأمامية للتابلت */
.pawn-shop-container::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
  z-index: 10;
}

/* إضافة أزرار التحكم للتابلت */
.tablet-button {
  position: absolute;
  z-index: 10;
}

.tablet-power-button {
  top: 100px;
  right: -12px;
  width: 5px;
  height: 40px;
  background-color: #444;
  border-radius: 2px;
  box-shadow: inset -1px 0 2px rgba(0, 0, 0, 0.5);
}

.tablet-volume-up {
  top: 160px;
  right: -12px;
  width: 5px;
  height: 30px;
  background-color: #444;
  border-radius: 2px;
  box-shadow: inset -1px 0 2px rgba(0, 0, 0, 0.5);
}

.tablet-volume-down {
  top: 200px;
  right: -12px;
  width: 5px;
  height: 30px;
  background-color: #444;
  border-radius: 2px;
  box-shadow: inset -1px 0 2px rgba(0, 0, 0, 0.5);
}

/* إضافة شريط الإشعارات */
.tablet-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 35px;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tablet-status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tablet-status-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tablet-time {
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.tablet-battery {
  width: 20px;
  height: 10px;
  border: 1px solid white;
  border-radius: 2px;
  position: relative;
}

.tablet-battery::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: 12px;
  background-color: var(--primary-color);
  border-radius: 1px;
}

.tablet-battery::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 3px;
  width: 3px;
  height: 4px;
  background-color: white;
  border-radius: 0 1px 1px 0;
}

.tablet-wifi {
  color: white;
  font-size: 12px;
}

/* تم إزالة الأنيميشن */

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.btn {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--dark-bg);
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: bold;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--box-shadow);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-color);
  z-index: -1;
  transition: transform 0.3s ease;
  transform: scaleX(0);
  transform-origin: right;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.9rem;
}

.btn:hover {
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn:active {
  transform: translateY(-1px);
}

.btn:disabled {
  background: #555;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn:disabled::before {
  display: none;
}

/* Header Styles */
header {
  background: var(--gradient-dark);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary-color);
  position: relative;
  z-index: 10;
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.3);
  margin-top: 35px; /* إضافة مسافة لشريط الحالة */
}

/* إضافة تفاصيل التابلت للهيدر */
header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0.5;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  font-size: 1.8rem;
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(230, 184, 0, 0.5);
  animation: glow 2s infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 5px rgba(230, 184, 0, 0.5); }
  to { text-shadow: 0 0 15px rgba(230, 184, 0, 0.8); }
}

.logo h1 {
  font-size: 1.3rem;
  margin: 0;
  background: linear-gradient(to right, var(--primary-color), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}

nav ul {
  display: flex;
  gap: 10px;
}

nav a {
  color: white;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

nav a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

nav a:hover {
  color: var(--primary-color);
}

nav a.active {
  background-color: rgba(230, 184, 0, 0.15);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

nav a i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

nav a:hover i {
  transform: translateY(-2px);
}

/* Main Content */
main {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #1e1e1e;
  color: #e0e0e0;
  background-image: url('https://via.placeholder.com/1000x700/222222/333333?text=Tablet+Background');
  background-size: cover;
  background-position: center;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* إضافة تأثير الشاشة */
main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* إضافة تأثير الشاشة المتقطعة */
main::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.05) 2px,
    rgba(0, 0, 0, 0.05) 3px
  );
  opacity: 0.3;
  pointer-events: none;
  z-index: 2;
}

main::-webkit-scrollbar {
  width: 8px;
}

main::-webkit-scrollbar-track {
  background: #1e1e1e;
}

main::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

main::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

section {
  margin-bottom: 20px;
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  text-shadow: 0 0 5px rgba(230, 184, 0, 0.3);
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: white;
  /* تم إيقاف الأنيميشن */
  animation: none;
}

section h2 i {
  color: var(--primary-color);
  font-size: 1.3em;
}

section h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #e0e0e0;
  border-left: 3px solid var(--primary-color);
  padding-left: 10px;
}

/* Items Section */
.items-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: var(--light-bg);
  border: none;
  padding: 8px 15px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--primary-color);
  color: var(--dark-bg);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.item-card {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* backdrop-filter: blur(5px); */
  position: relative;
  min-height: 250px;
  display: block;
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(230, 184, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--primary-color);
}

.item-card:hover::before {
  opacity: 1;
}

.item-image {
  height: 150px;
  overflow: hidden;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.item-name {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 5px;
  color: white;
}

.item-category {
  color: #aaa;
  font-size: 0.8rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.item-category::before {
  content: '•';
  color: var(--primary-color);
  font-size: 1.2em;
}

.item-price {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 0 5px rgba(230, 184, 0, 0.3);
}

/* Sell/Pawn Sections */
.sell-container, .pawn-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.player-inventory {
  flex: 1;
  background-color: rgba(30, 30, 30, 0.7);
  padding: 15px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.inventory-item {
  background-color: rgba(40, 40, 40, 0.8);
  border-radius: var(--border-radius);
  padding: 5px;
  text-align: center;
  box-shadow: var(--box-shadow);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.inventory-item::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.inventory-item:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-color: rgba(230, 184, 0, 0.3);
}

.inventory-item:hover::after {
  opacity: 1;
}

.inventory-item.selected {
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 15px rgba(230, 184, 0, 0.5);
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(230, 184, 0, 0.7); }
  70% { box-shadow: 0 0 0 5px rgba(230, 184, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 184, 0, 0); }
}

.inventory-item img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  margin-bottom: 5px;
}

.inventory-item span {
  display: block;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e0e0e0;
  padding-top: 5px;
  font-weight: 500;
}

.sell-info, .pawn-info {
  flex: 1;
  background-color: rgba(30, 30, 30, 0.7);
  padding: 20px;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.sell-info::before, .pawn-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(230, 184, 0, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.selected-item {
  margin-bottom: 25px;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary-color);
}

.selected-item p {
  margin-bottom: 12px;
  color: #e0e0e0;
}

.selected-item span {
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 0 0 5px rgba(230, 184, 0, 0.3);
}

/* Price Table */
.price-table {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
}

table th, table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table th {
  background: var(--gradient-dark);
  color: var(--primary-color);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

table tr {
  background-color: rgba(30, 30, 30, 0.5);
  transition: all 0.3s ease;
}

table tr:nth-child(even) {
  background-color: rgba(40, 40, 40, 0.5);
}

table tr:hover {
  background-color: rgba(230, 184, 0, 0.1);
}

/* Pawned Items */
.pawned-items {
  margin-top: 20px;
}

/* Footer */
footer {
  background: var(--gradient-dark);
  color: white;
  padding: 15px 20px;
  border-top: 2px solid var(--primary-color);
  position: relative;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.3);
}

footer::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5), transparent);
}

/* إزالة شريط التنقل وإضافة مساحة لزر الصفحة الرئيسية */
footer {
  padding-bottom: 30px; /* إضافة مساحة أسفل الفوتر للزر */
  position: relative;
}

.player-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-money {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 15px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-money i {
  color: var(--primary-color);
  font-size: 1.2rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* حاوية زر الصفحة الرئيسية */
.tablet-home-button-container {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
}

/* زر الصفحة الرئيسية للتابلت */
.tablet-home-button {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.tablet-home-button:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.05);
}

.home-button-circle {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.tablet-home-button:hover .home-button-circle {
  transform: scale(0.9);
}