/* General Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color: #0a0a0a;
  color: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  min-height: 100vh;
}

.main-header {
  text-align: center;
  margin-bottom: 30px;
}

.main-header h1 {
  font-size: 3.5rem;
  margin-bottom: 8px;
}

.logo-main {
  color: #fff;
  font-weight: bold;
}

.logo-highlight {
  color: #4ee1ff;
  text-shadow: 0px 0px 8px rgba(78,225,255,0.7);
}

.main-header p {
  color: #aaa;
  font-size: 1rem;
}

.main-header {
  position: relative;
}

.account-bubble {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(90deg, #4ee1ff, #3b82f6);
  border: 2px solid rgba(255,255,255,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 100;
}

.account-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(106, 90, 249, 0.3);
}

.account-bubble img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.account-icon {
  font-size: 24px;
  color: white;
}

.account-menu {
  position: absolute;
  top: 80px;
  right: 20px;
  background-color: #111;
  border-radius: 12px;
  padding: 15px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 99;
}

.account-menu button {
  width: 100%;
  margin: 5px 0;
}

.card {
  background-color: #111;
  border-radius: 16px;
  padding: 20px;
  margin: 15px 0;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.2s ease;
}

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

.hidden {
  display: none !important;
}

/* Login + Add Offer forms */
input, select, textarea {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: none;
  border-radius: 8px;
  background-color: #222;
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #4ee1ff;
  box-shadow: 0 0 0 2px rgba(78,225,255,0.2);
}

input::placeholder, textarea::placeholder {
  color: #666;
}

.price-currency-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.price-currency-wrapper input {
  flex: 2;
  margin: 8px 0;
}

.price-currency-wrapper select {
  flex: 1;
  margin: 8px 0;
  min-width: 100px;
}

.google-btn {
  background: linear-gradient(90deg, #6a5af9, #4f46e5);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px;
  transition: all 0.3s ease;
  white-space: nowrap;
  width: 100%;
  max-width: 300px;
  margin: 8px 0;
}

.google-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 90, 249, 0.3);
}

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

.google-icon {
  margin-right: 8px;
}

.google-icon path {
  fill: white;
}
button {
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #6a5af9, #4f46e5);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 90, 249, 0.3);
}

button:active {
  transform: translateY(0);
}

.logout-btn {
  width: 100%;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  margin-bottom: 10px;
}
.logout-btn:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.image-url-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.image-url-wrapper input {
  flex: 1;
  margin: 8px 0;
}

#addImageBtn {
  margin: 8px 0;
  padding: 12px 16px;
  white-space: nowrap;
  background: linear-gradient(90deg, #10b981, #059669);
}

#addImageBtn:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.form-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cancel-btn {
  background: linear-gradient(90deg, #6b7280, #4b5563);
  margin-top: 8px;
}

.cancel-btn:hover {
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.image-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.preview-image {
  position: relative;
  width: 60px;
  height: 60px;
}

.preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}

.remove-image-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.remove-image-btn:hover {
  background: #dc2626;
}

.message {
  margin-top: 10px;
  font-size: 0.9rem;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
}

.message.error {
  color: #f87171;
  background-color: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.message.success {
  color: #34d399;
  background-color: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

/* Search Input */
#searchInput {
  margin-bottom: 20px;
  background-color: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.1);
}

.offer-card {
  background-color: #1a1a1a;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.offer-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.offer-card:hover {
  background-color: #222;
  border-color: rgba(78,225,255,0.2);
  transform: translateX(4px);
}

.offer-image-container {
  position: relative;
  transition: transform 0.2s ease;
}

.offer-image-container:hover {
  transform: scale(1.05);
}

.offer-image-container img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
}

.image-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #4ee1ff;
  color: #000;
  border-radius: 10px;
  width: 20px;
  height: 20px;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.favorite-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  margin: 0;
  transition: transform 0.2s ease;
}

.favorite-btn:hover {
  transform: scale(1.2);
  box-shadow: none;
}

.delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(90deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background: linear-gradient(90deg, #dc2626, #b91c1c);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.edit-btn {
  position: absolute;
  top: 10px;
  right: 45px;
  background: linear-gradient(90deg, #0b69f5, #0b69f5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: all 0.2s ease;
}

.edit-btn:hover {
  background: linear-gradient(90deg, #d97706, #b45309);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #111;
  border-radius: 16px;
  padding: 0;
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #fff;
  flex: 1;
}

.modal-close {
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.image-gallery {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-image-container {
  background-color: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-image-container:hover {
  border-color: rgba(78,225,255,0.3);
  transform: scale(1.02);
}

.modal-image-container img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Offer Details Styles */
.offer-details {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.offer-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
}

.offer-detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-weight: 600;
  color: #aaa;
  font-size: 0.9rem;
}

.detail-value {
  font-weight: bold;
  color: #fff;
  font-size: 1rem;
  text-align: right;
  max-width: 70%;
  word-wrap: break-word;
}

#offerModalPrice {
  color: #4ee1ff;
  font-size: 1.2rem;
}

.modal-section {
  padding: 20px;
}

.modal-section h4 {
  margin: 0 0 15px 0;
  color: #fff;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
}

/* Full Image Modal Styles */
.full-image-modal {
  background-color: rgba(0,0,0,0.95);
}

.full-image-content {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  max-width: 95%;
  max-height: 95%;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.full-image-header {
  padding: 20px;
  background-color: rgba(17,17,17,0.9);
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.full-image-header h3 {
  margin: 0;
  color: #fff;
}

.full-image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(17,17,17,0.9);
  border-radius: 0 0 12px 12px;
  padding: 20px;
}

.full-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.offer-card img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
}

.offer-info {
  color: #ddd;
  flex: 1;
}

.offer-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: #fff;
}

.offer-sub {
  font-size: 0.9rem;
  color: #aaa;
}

.discord-btn {
  width: 100%;
  background: linear-gradient(90deg, #5865f2, #4752c4);
  margin-top: 20px;
  font-size: 1.3rem;
  padding: 20px 15px 20px 60px;
  position: relative;
}

.discord-btn::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: url('Discord-Symbol-White.png') no-repeat center center / contain;
}

.discord-btn:hover {
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

/* Filter Select */
.filter-select {
  padding: 8px 16px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #eee;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

.filter-select:focus {
  outline: none;
  border-color: #4ee1ff;
  box-shadow: 0 0 0 2px rgba(78,225,255,0.2);
}

.filter-select option {
  background-color: #111;
  color: #eee;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 12px;
  min-width: 40px;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.1);
  margin: 0;
}

.pagination button:hover:not(:disabled) {
  background: rgba(255,255,255,0.2);
}

.pagination button.active {
  background: linear-gradient(90deg, #6a5af9, #4f46e5);
  box-shadow: 0 4px 12px rgba(106, 90, 249, 0.3);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .page-info {
  color: #aaa;
  font-size: 0.9rem;
  padding: 0 10px;
}

/* Payment Modal Styles */
.payment-modal-content {
  max-width: 400px;
}

.payment-options {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.payment-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: #1a1a1a;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.payment-btn:hover {
  border-color: #4ee1ff;
  background: #222;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78,225,255,0.2);
}

.payment-icon {
  font-size: 2rem;
  width: 50px;
  text-align: center;
}

.payment-text {
  flex: 1;
}

.payment-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.payment-desc {
  font-size: 0.9rem;
  color: #aaa;
}

.paypal-btn .payment-icon {
  color: #0070ba;
}

.stripe-btn .payment-icon {
  color: #635bff;
}

.payment-note {
  margin-top: 20px;
  font-size: 18px;
  font-weight: bold;
  color: red;
  text-align: center;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }

  .main-header h1 {
    font-size: 2rem;
  }

  .card {
    padding: 15px;
    margin: 10px 0;
  }

  .offer-card {
    padding: 12px;
  }

  .offer-card img {
    width: 40px;
    height: 40px;
  }

  .image-url-wrapper {
    flex-direction: column;
    gap: 0;
  }

  #addImageBtn {
    margin-top: 0;
  }
}

/* Desktop Wider Cards */
@media (min-width: 481px) {
  .card {
    max-width: 800px;
  }
}

/* Loading Animation */
@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}