/* Admin Login Button Inline - Axzy Clickable */
.login-btn-inline {
  background: transparent;
  border: none;
  color: var(--text, #000);
  cursor: pointer !important;
  display: inline-block;
  vertical-align: baseline;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
  opacity: 1;
  position: relative;
  border-radius: 4px;
  line-height: inherit;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: auto !important;
  touch-action: manipulation;
  z-index: 10001 !important;
  min-width: auto;
  min-height: auto;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Ensure parent h1 doesn't block clicks */
#hero h1 {
  pointer-events: auto;
  position: relative;
  z-index: 1000;
}

#hero h1 .login-btn-inline {
  position: relative;
  z-index: 10001;
}

.login-btn-inline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.login-btn-inline:hover {
  opacity: 0.85;
  transform: translateY(-2px);
  color: var(--text, #000);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

.login-btn-inline:hover::after {
  width: 100%;
}

.login-btn-inline:active {
  transform: translateY(0);
  opacity: 0.75;
  text-decoration-thickness: 3px;
}

.login-btn-inline:focus {
  outline: 2px solid rgba(0, 0, 0, 0.3);
  outline-offset: 2px;
  border-radius: 2px;
}

.login-btn-inline:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.5);
  outline-offset: 2px;
}

/* Logged in state */
.login-btn-inline.logged-in:hover {
  opacity: 0.9;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* Dark mode support */
.dark-mode .login-btn-inline {
  color: var(--text, #fff);
}

.dark-mode .login-btn-inline:hover {
  color: var(--text, #fff);
  opacity: 0.8;
}

.dark-mode .login-btn-inline:focus {
  outline-color: rgba(255, 255, 255, 0.3);
}

/* Login Modal */
.login-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.login-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-modal-content {
  background: var(--bg, #fff);
  border: 2px solid var(--text, #000);
  padding: 2rem;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: slideIn 0.3s ease;
}

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

.login-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  font-weight: bold;
  color: var(--text, #000);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.login-close:hover {
  color: #ff4444;
}

.login-modal-content h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-family: "Michroma", sans-serif;
  color: var(--text, #000);
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: "Prompt", sans-serif;
  font-weight: 500;
  color: var(--text, #000);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  padding-right: 80px;
  border: 2px solid var(--text, #000);
  background: transparent;
  color: var(--text, #000);
  border-radius: 8px;
  font-family: "Prompt", sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #4a9eff;
}

.toggle-password-btn {
  position: absolute;
  right: 8px;
  top: 38px;
  padding: 0.5rem 1rem;
  background: var(--text, #000);
  color: var(--bg, #fff);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Prompt", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.toggle-password-btn:hover {
  opacity: 0.8;
}

.btn-login {
  width: 100%;
  padding: 0.75rem;
  background: var(--text, #000);
  color: var(--bg, #fff);
  border: 2px solid var(--text, #000);
  border-radius: 8px;
  font-family: "Michroma", sans-serif;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.btn-login:hover {
  background: transparent;
  color: var(--text, #000);
}

.error-message {
  color: #ff4444;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
  font-family: "Prompt", sans-serif;
}

.error-message.show {
  display: block;
}

/* Admin Dashboard Styles */
.admin-container {
  min-height: 100vh;
  padding: 2rem;
  background: var(--bg, #fff);
  color: var(--text, #000);
  font-family: "Prompt", sans-serif;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--text, #000);
}

.admin-header h1 {
  font-family: "Michroma", sans-serif;
  font-size: 2.5rem;
  color: var(--text, #000);
}

.btn-logout {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text, #000);
  border: 2px solid var(--text, #000);
  border-radius: 8px;
  cursor: pointer;
  font-family: "Prompt", sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.btn-logout:hover {
  background: var(--text, #000);
  color: var(--bg, #fff);
}

.upload-section {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.02);
  border: 2px solid var(--text, #000);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  width: 100%;
  box-sizing: border-box;
}

.upload-section h2 {
  font-family: "Michroma", sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text, #000);
}

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

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row label {
  font-family: "Prompt", sans-serif;
  font-weight: 600;
  color: var(--text, #000);
}

.form-row select,
.form-row input[type="text"],
.form-row input[type="url"],
.form-row input[type="file"] {
  padding: 0.75rem;
  border: 2px solid var(--text, #000);
  background: transparent;
  color: var(--text, #000);
  border-radius: 8px;
  font-family: "Prompt", sans-serif;
  font-size: 1rem;
  box-sizing: border-box;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-row select:focus,
.form-row input:focus {
  outline: none;
  border-color: #4a9eff;
}

.form-row input[type="file"] {
  cursor: pointer;
}

.form-row input[type="file"]::file-selector-button {
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  background: var(--text, #000);
  color: var(--bg, #fff);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Prompt", sans-serif;
  font-weight: 600;
}

.btn-upload {
  width: 100%;
  padding: 0.75rem;
  background: var(--text, #000);
  color: var(--bg, #fff);
  border: 2px solid var(--text, #000);
  border-radius: 8px;
  cursor: pointer;
  font-family: "Michroma", sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 1rem;
}

.btn-upload:hover {
  background: transparent;
  color: var(--text, #000);
}

.uploaded-items {
  margin-top: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.uploaded-items h3 {
  font-family: "Michroma", sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text, #000);
  word-wrap: break-word;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.item-card {
  background: rgba(0, 0, 0, 0.05);
  border: 2px solid var(--text, #000);
  border-radius: 8px;
  padding: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  display: block;
  background: rgba(0, 0, 0, 0.05);
}

.item-card h4 {
  font-family: "Prompt", sans-serif;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text, #000);
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-card p {
  font-family: "Prompt", sans-serif;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.btn-delete {
  width: 100%;
  padding: 0.5rem;
  background: #ff4444;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Prompt", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  background: #cc0000;
}

.no-items {
  text-align: center;
  padding: 2rem;
  color: rgba(0, 0, 0, 0.5);
  font-family: "Prompt", sans-serif;
  width: 100%;
  box-sizing: border-box;
}

#items-container {
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-container {
    padding: 1rem;
  }
  
  .admin-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .admin-header h1 {
    font-size: 2rem;
  }
  
  .btn-logout {
    width: 100%;
    text-align: center;
  }
  
  .upload-section {
    padding: 1.5rem;
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
  }
  
  .item-card {
    padding: 0.75rem;
  }
  
  .item-card img {
    height: 120px;
  }
  
  .login-modal-content {
    padding: 1.5rem;
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .admin-container {
    padding: 0.5rem;
  }
  
  .upload-section {
    padding: 1rem;
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
  }
  
  .item-card {
    padding: 0.5rem;
  }
  
  .item-card img {
    height: 100px;
  }
  
  .login-btn-inline {
    margin-left: 0.25rem;
  }
  
  .login-btn-inline svg {
    width: 16px;
    height: 16px;
  }
}

/* Dark mode support */
.dark-mode .login-btn-inline {
  color: var(--text, #fff);
}

.dark-mode .admin-container {
  background: #000;
  color: #fff;
}

.dark-mode .admin-header h1 {
  color: #fff;
}

.dark-mode .admin-header {
  border-bottom-color: #fff;
}

.dark-mode .upload-section {
  background: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

.dark-mode .upload-section h2 {
  color: #fff;
}

.dark-mode .form-row label {
  color: #fff;
}

.dark-mode .form-row select,
.dark-mode .form-row input {
  border-color: #fff;
  color: #fff;
}

.dark-mode .item-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}

.dark-mode .item-card h4 {
  color: #fff;
}

.dark-mode .item-card p {
  color: rgba(255, 255, 255, 0.6);
}

.dark-mode .no-items {
  color: rgba(255, 255, 255, 0.5);
}
