/* BazaarGen Unified Stylesheet with Two-Column Layout */

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}



body {
  font-family: Arial, sans-serif;
  background-color: rgb(139, 122, 101);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: rgb(251, 225, 183);
}

/* ===== NAVIGATION STYLES ===== */
.top-nav {
  background: linear-gradient(135deg, rgb(74, 60, 46) 0%, rgb(37, 26, 12) 100%);
  border-bottom: 3px solid rgb(218, 165, 32);
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.8em;
  font-weight: bold;
  color: rgb(251, 225, 183);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-logo:hover {
  color: rgb(218, 165, 32);
  transform: translateY(-1px);
}

.nav-logo::before {
  content: "⚔️";
  font-size: 1.2em;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 25px 25px;
  color: rgb(201, 175, 133);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  height: 70px;
  border-left: 1px solid rgba(218, 165, 32, 0.2);
}

.nav-link:first-child {
  border-left: none;
}

.nav-link:hover {
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%);
  color: rgb(37, 26, 12);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-link.active {
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(255, 215, 0) 100%);
  color: rgb(37, 26, 12);
  box-shadow: inset 0 -3px 0 rgb(184, 134, 11);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: rgb(255, 215, 0);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* Mobile navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: rgb(251, 225, 183);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Google Sign-In Navigation Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info {
  display: none;
  align-items: center;
  gap: 10px;
}

.user-alias {
  font-weight: 500;
  color: rgb(251, 225, 183);
  cursor: pointer;
}

.sign-out-btn {
  background: none;
  border: 1px solid rgb(251, 225, 183);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  color: rgb(251, 225, 183);
  font-size: 14px;
  transition: all 0.3s ease;
}

.sign-out-btn:hover {
  background: rgba(251, 225, 183, 0.1);
}

/* Alias Modal */
#alias-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

#alias-modal > div {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#alias-modal h2 {
  margin: 0 0 10px 0;
  color: #333;
}

#alias-modal p {
  color: #666;
  margin: 0 0 20px 0;
}

#alias-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

#alias-error {
  color: #d32f2f;
  font-size: 14px;
  margin-bottom: 15px;
  min-height: 20px;
}

#alias-modal .button-group {
  display: flex;
  gap: 10px;
  justify-content: center;
}

#alias-cancel-btn, #alias-save-btn {
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

#alias-cancel-btn {
  border: 1px solid #ddd;
  background: white;
  color: #666;
}

#alias-save-btn {
  border: none;
  background: #007bff;
  color: white;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  padding: 0; /* Remove padding since we handle it in containers now */
}

/* ===== PAGE HEADER ===== */
.page-header {
  text-align: center;
  margin-bottom: 0; /* Remove margin since we handle spacing in main-container */
  padding: 20px 0;
  background: linear-gradient(135deg, rgb(74, 60, 46) 0%, rgb(37, 26, 12) 100%);
  border-bottom: 3px solid rgb(218, 165, 32);
}

.page-title {
  color: rgb(251, 225, 183);
  font-size: 3em;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: 10px;
  background: linear-gradient(45deg, rgb(251, 225, 183), rgb(218, 165, 32));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: rgb(201, 175, 133);
  font-size: 1.2em;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

h1 {
  color: rgb(251, 225, 183);
}

/* ===== TWO-COLUMN LAYOUT ===== */
/* Main two-column layout - WIDER COLUMNS */
.main-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px 30px 0 30px;
  max-width: 1800px; /* Increased from 1400px */
  margin: 0 auto;
  min-height: 60vh;
}

/* Left column - Form */
.form-column {
  background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(89, 72, 51) 100%);
  border: 2px solid rgb(251, 225, 183);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  max-height: calc(100vh - 160px);
}

/* Right column - Preview */
.preview-column {
  background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(89, 72, 51) 100%);
  border: 2px solid rgb(251, 225, 183);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 500px;
  position: sticky;
  top: 30px;
  max-height: calc(100vh - 160px);
}

.preview-header {
  color: rgb(251, 225, 183);
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px solid rgb(218, 165, 32);
  padding-bottom: 10px;
  width: 100%;
}

#previewContainer {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 300px;
  overflow-y: auto;
}

.preview-placeholder {
  color: rgb(201, 175, 133);
  text-align: center;
  font-style: italic;
  margin-top: 50px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Preview Actions */
.preview-actions {
  margin-top: 20px;
  text-align: center;
  border-top: 2px solid rgb(218, 165, 32);
  padding-top: 20px;
}

.save-card-btn {
  font-size: 16px !important;
  padding: 15px 30px !important;
  background: linear-gradient(135deg, rgb(46, 125, 50) 0%, rgb(27, 94, 32) 100%) !important;
  color: white !important;
  border: 3px solid rgb(76, 175, 80) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.save-card-btn:hover {
  background: linear-gradient(135deg, rgb(76, 175, 80) 0%, rgb(46, 125, 50) 100%) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
}

.save-card-btn:focus {
  outline: 3px solid rgba(255, 215, 0, 0.5);
  outline-offset: 2px;
}

/* Bottom Sections - FULL WIDTH */
.bottom-sections {
  width: 100%; /* Full width instead of max-width constraint */
  margin: 0 auto;
  padding: 30px;
}

.management-section, .saved-cards-section {
  background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(89, 72, 51) 100%);
  border: 2px solid rgb(251, 225, 183);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
  max-width: 1800px; /* Match the main container width */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
}

.section-title {
  color: rgb(251, 225, 183);
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px solid rgb(218, 165, 32);
  padding-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.management-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.export-import-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.clear-all-btn {
  font-size: 16px !important;
  padding: 15px 25px !important;
}

.clear-all-btn:focus {
  outline: 3px solid rgba(255, 215, 0, 0.5);
  outline-offset: 2px;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(700px, 1fr));
  gap: 30px;
  justify-content: center;
  align-content: flex-start;
  min-height: 200px;
}

.cards-placeholder {
  color: rgb(201, 175, 133);
  text-align: center;
  font-style: italic;
  margin: 50px auto;
  background: rgba(37, 26, 12, 0.5);
  border: 2px dashed rgb(150, 120, 90);
  border-radius: 15px;
  padding: 40px;
  max-width: 500px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Hide cards placeholder when cards are present */
.cards-grid:has(.card) .cards-placeholder {
  display: none;
}

/* Update existing input container to be hidden since we moved it */
.input-container {
  display: none;
}

/* ===== FORM STYLES ===== */
.controls-panel {
  background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(89, 72, 51) 100%);
  border: 2px solid rgb(251, 225, 183);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.form-grid, .controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.controls-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-group, .control-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

#customHeroGroup {
  animation: slideDown 0.3s ease-out;
}

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

.form-label, .control-label {
  color: rgb(251, 225, 183);
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select, .control-select, .control-input {
  padding: 12px 15px;
  border: 2px solid rgb(74, 60, 46);
  border-radius: 8px;
  background-color: rgb(37, 26, 12);
  color: rgb(251, 225, 183);
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus, .control-select:focus, .control-input:focus {
  outline: none;
  border-color: gold;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.form-input::placeholder {
  color: rgb(150, 120, 90);
}

/* ===== BUTTON STYLES ===== */
.form-button, .btn {
  padding: 12px 25px;
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%);
  border: none;
  border-radius: 8px;
  color: rgb(37, 26, 12);
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-button:hover, .btn:hover {
  background: linear-gradient(135deg, rgb(255, 215, 0) 0%, rgb(218, 165, 32) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
  background: #666;
  cursor: not-allowed;
  transform: none;
}

.form-button.secondary {
  background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(74, 60, 46) 100%);
  color: rgb(251, 225, 183);
  border: 2px solid rgb(251, 225, 183);
}

.form-button.secondary:hover {
  background: linear-gradient(135deg, rgb(74, 60, 46) 0%, rgb(101, 84, 63) 100%);
}

.form-button.remove {
  background: linear-gradient(135deg, rgb(180, 60, 60) 0%, rgb(140, 40, 40) 100%);
  color: white;
  border: 2px solid rgb(200, 80, 80);
  padding: 8px 15px;
  font-size: 12px;
  margin: 0;
}

.form-button.remove:hover {
  background: linear-gradient(135deg, rgb(200, 80, 80) 0%, rgb(180, 60, 60) 100%);
}

.form-button.export {
  background: linear-gradient(135deg, rgb(46, 125, 50) 0%, rgb(27, 94, 32) 100%);
  color: white;
  border: 2px solid rgb(76, 175, 80);
  padding: 8px 15px;
  font-size: 12px;
  margin-left: 5px;
}

.form-button.export:hover {
  background: linear-gradient(135deg, rgb(76, 175, 80) 0%, rgb(46, 125, 50) 100%);
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
  flex-wrap: wrap;
}


/* Profile Page Styles */

.profile-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Profile Header */
.profile-header {
    background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(89, 72, 51) 100%);
    border: 2px solid rgb(218, 165, 32);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.profile-header h1 {
    margin: 0 0 10px 0;
    color: rgb(251, 225, 183);
    font-size: 32px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-header p {
    margin: 0;
    color: rgb(201, 175, 133);
    font-size: 16px;
}

/* Profile Stats */
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: rgb(218, 165, 32);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    color: rgb(201, 175, 133);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content Tabs */
.content-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgb(218, 165, 32);
    padding-bottom: 0;
}

.tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgb(201, 175, 133);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    color: rgb(251, 225, 183);
    background: rgba(218, 165, 32, 0.1);
}

.tab-button.active {
    color: rgb(251, 225, 183);
    border-bottom-color: rgb(218, 165, 32);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: rgb(218, 165, 32);
    animation: slideIn 0.3s ease;
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

.items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: flex-start;
  align-items: flex-start;
  margin-top: 20px;
  width: 100%;
}

/* Card wrappers should fit their content */
.card-wrapper, 
.skill-card-wrapper, 
.profile-card-wrapper {
  flex: 0 0 auto; /* Don't grow or shrink, stay natural size */
  width: 100%; /* Use full available width */
  max-width: 700px; /* Limit maximum width to 700px */
  box-sizing: border-box;
}

/* Browse page specific card width */
.browse-container .card-wrapper {
  width: 700px;
  max-width: 700px;
  flex: 0 0 700px;
}

/* Ensure cards themselves fit content */
.card, 
.skill-card {
  width: 100%; /* Changed from fit-content to 100% */
  max-width: 100%; /* Changed from none to 100% */
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Fix skill card content to fit properly */
.skill-card {
  display: flex;
  align-items: flex-start;
  width: 100%; /* Changed from fit-content to 100% */
  max-width: 100%; /* Changed from 600px to 100% */
  box-sizing: border-box;
}

/* Profile-specific grid layout */
.profile-container .items-grid {
  justify-content: flex-start;
  align-content: flex-start;
}

/* Browse page container - full width */
.browse-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Browse-specific grid layout */
.browse-container .items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(700px, 1fr));
  gap: 30px;
  justify-content: center;
  align-content: flex-start;
}
/* SKILL-SPECIFIC WIDTH FIXES */
.skill-content {
  width: 400px !important;
  min-width: 400px;
  max-width: 400px !important;
  box-sizing: border-box;
}

.skill-card-wrapper {
  width: 100% !important; /* Changed from fit-content to 100% */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Fix skill fallback cards */
.skill-card-fallback {
  width: 100% !important; /* Changed from fit-content to 100% */
  max-width: 100% !important; /* Changed from 600px to 100% */
  box-sizing: border-box;
}

/* Ensure skill headers and sections fit content */
.skill-header,
.skill-effect {
  width: 100%;
  box-sizing: border-box;
}


/* RESPONSIVE GRID BEHAVIOR */
@media (max-width: 1400px) {
  .items-grid {
    justify-content: center; /* Center when less space */
  }
  
  /* Ensure browse page cards maintain 700px width */
  .browse-container .card-wrapper {
    width: 700px !important;
    max-width: 700px !important;
    flex: 0 0 700px !important;
  }
}

@media (max-width: 768px) {
  .items-grid {
    flex-direction: column;
    align-items: center;
  }
  
  .card-wrapper, 
  .skill-card-wrapper, 
  .profile-card-wrapper {
    width: fit-content; /* Keep natural sizing on mobile */
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .skill-card,
  .card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .card-visual-content {
    width: 100%;
    min-width: auto; /* Remove minimum width on mobile */
    box-sizing: border-box;
  }
  
  .card-content {
    width: 100%;
    min-width: auto; /* Remove minimum width on mobile */
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .skill-content {
    width: 400px !important;
    min-width: 400px;
    max-width: 400px !important;
    box-sizing: border-box;
  }
}

/* COMMENTS WIDTH MATCHING */
.creator-info,
.comments-section {
  width: 100%;
  box-sizing: border-box;
}

/* Profile page specific adjustments */
.profile-card-wrapper .creator-info,
.profile-card-wrapper .comments-section {
  width: 100%;
  box-sizing: border-box;
}

/* Profile page comments section styling */
.profile-card-wrapper .comments-section {
  background: linear-gradient(135deg, rgba(101, 84, 63, 0.95) 0%, rgba(89, 72, 51, 0.9) 100%);
  border: 2px solid rgb(218, 165, 32);
  border-radius: 0 0 12px 12px;
  padding: 20px;
  margin-top: -2px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
  transition: width 0.3s ease;
}

.profile-card-wrapper .comments-section h4 {
  margin: 0;
  color: rgb(251, 225, 183);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.profile-card-wrapper .toggle-comments-btn {
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%) !important;
  border: 2px solid rgb(37, 26, 12) !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  cursor: pointer;
  font-size: 12px !important;
  color: rgb(37, 26, 12) !important;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.profile-card-wrapper .toggle-comments-btn:hover {
  background: linear-gradient(135deg, rgb(255, 215, 0) 0%, rgb(218, 165, 32) 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.profile-card-wrapper .comments-list {
  max-height: 300px;
  overflow-y: auto;
  margin: 15px 0;
  background: rgba(37, 26, 12, 0.7) !important;
  border: 2px solid rgba(218, 165, 32, 0.3);
  border-radius: 8px;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgb(218, 165, 32) rgba(37, 26, 12, 0.5);
}

.profile-card-wrapper .comments-list::-webkit-scrollbar {
  width: 8px;
}

.profile-card-wrapper .comments-list::-webkit-scrollbar-track {
  background: rgba(37, 26, 12, 0.5);
  border-radius: 4px;
}

.profile-card-wrapper .comments-list::-webkit-scrollbar-thumb {
  background: rgb(218, 165, 32);
  border-radius: 4px;
}

.profile-card-wrapper .comments-list > div:not([style*="text-align: center"]) {
  padding: 12px !important;
  border-bottom: 1px solid rgba(218, 165, 32, 0.3) !important;
  background: linear-gradient(135deg, rgba(74, 60, 46, 0.7) 0%, rgba(89, 72, 51, 0.6) 100%) !important;
  margin-bottom: 8px !important;
  border-radius: 6px !important;
  transition: background 0.3s ease !important;
  border: 1px solid rgba(218, 165, 32, 0.2) !important;
}

.profile-card-wrapper .comments-list > div:not([style*="text-align: center"]):hover {
  background: linear-gradient(135deg, rgba(74, 60, 46, 0.9) 0%, rgba(89, 72, 51, 0.8) 100%) !important;
  border-color: rgba(218, 165, 32, 0.4) !important;
}

.profile-card-wrapper .comments-list > div:last-child {
  border-bottom: none !important;
  margin-bottom: 0 !important;
}

.profile-card-wrapper .comments-list strong {
  color: rgb(251, 225, 183) !important;
  font-weight: bold;
}

.profile-card-wrapper .comments-list span {
  color: rgb(201, 175, 133) !important;
}

.profile-card-wrapper .comment-form {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.profile-card-wrapper .comment-form input {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid rgba(218, 165, 32, 0.3);
  border-radius: 6px;
  background: rgba(37, 26, 12, 0.8);
  color: rgb(251, 225, 183);
  font-size: 14px;
  transition: all 0.3s ease;
}

.profile-card-wrapper .comment-form input:focus {
  outline: none;
  border-color: rgb(218, 165, 32);
  background: rgba(37, 26, 12, 0.9);
  box-shadow: 0 0 0 2px rgba(218, 165, 32, 0.2);
}

.profile-card-wrapper .comment-form input::placeholder {
  color: rgb(150, 120, 90);
}

.profile-card-wrapper .comment-form button {
  padding: 10px 16px;
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%);
  border: 2px solid rgb(37, 26, 12);
  border-radius: 6px;
  color: rgb(37, 26, 12);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.profile-card-wrapper .comment-form button:hover {
  background: linear-gradient(135deg, rgb(255, 215, 0) 0%, rgb(218, 165, 32) 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}



/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgb(201, 175, 133);
    background: linear-gradient(135deg, rgba(74, 60, 46, 0.2) 0%, rgba(89, 72, 51, 0.1) 100%);
    border: 2px dashed rgba(218, 165, 32, 0.3);
    border-radius: 12px;
    animation: fadeIn 0.5s ease;
}

.empty-state h3 {
    color: rgb(251, 225, 183);
    margin-bottom: 15px;
    font-size: 24px;
}

.empty-state a {
    color: rgb(218, 165, 32);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.empty-state a:hover {
    color: rgb(251, 225, 183);
    text-decoration: underline;
}

/* Profile Card Wrapper */
.profile-card-wrapper {
    position: relative;
    transition: transform 0.3s ease;
}

.profile-card-wrapper:hover {
    transform: translateY(-5px);
}

/* Delete Button */
.profile-delete-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, rgb(244, 67, 54) 0%, rgb(211, 47, 47) 100%);
    border: 2px solid rgb(183, 28, 28);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    z-index: 100;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.profile-card-wrapper:hover .profile-delete-btn {
    opacity: 1;
}

.profile-delete-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: rgb(218, 165, 32);
    font-size: 24px;
}

.loading-spinner::after {
    content: '⚔️';
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Gallery Card Special Styling */
.profile-card-wrapper.gallery-item {
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.1) 0%, rgba(48, 63, 159, 0.05) 100%);
    border: 2px solid rgba(63, 81, 181, 0.3);
    border-radius: 12px;
    padding: 10px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Username Link Styling */
#user-alias a {
    color: rgb(251, 225, 183);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#user-alias a:hover {
    color: rgb(218, 165, 32);
    background: rgba(218, 165, 32, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header h1 {
        font-size: 24px;
    }
    
    .profile-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .content-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 10px;
    }
    
    .profile-header {
        padding: 20px;
    }
    
    .profile-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
}

/* ===== CARD STYLES ===== */
.card, .skill-card {
  display: flex;
  align-items: flex-start;
  background-color: rgb(101, 84, 63);
  padding: 1em;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin: 0; /* Remove margin for grid layout */
  position: relative;
  flex: 0 0 auto; /* Don't grow/shrink, stay auto size */
}

.card-visual-content {
  display: flex;
  align-items: flex-start;
  width: fit-content;
  position: relative;
  padding: 20px;
  border-radius: 10px;
}

.card-controls, .skill-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  gap: 5px;
}

.card-delete-btn, .card-export-btn, .card-save-btn, 
.card-view-btn, .card-upvote-btn, .card-edit-btn,
.skill-delete-btn, .skill-export-btn, .skill-edit-btn {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border: 2px solid;
}

.card-delete-btn, .skill-delete-btn {
  background: linear-gradient(135deg, rgb(180, 60, 60) 0%, rgb(140, 40, 40) 100%);
  color: white;
  border-color: rgb(200, 80, 80);
}

.card-delete-btn:hover, .skill-delete-btn:hover {
  background: linear-gradient(135deg, rgb(200, 80, 80) 0%, rgb(180, 60, 60) 100%);
  transform: scale(1.1);
}

.card-export-btn, .skill-export-btn {
  background: linear-gradient(135deg, rgb(46, 125, 50) 0%, rgb(27, 94, 32) 100%);
  color: white;
  border-color: rgb(76, 175, 80);
  position: relative;
}

.card-export-btn:hover, .skill-export-btn:hover {
  background: linear-gradient(135deg, rgb(76, 175, 80) 0%, rgb(46, 125, 50) 100%);
  transform: scale(1.1);
}

.card-save-btn {
  background: linear-gradient(135deg, rgb(76, 175, 80) 0%, rgb(46, 125, 50) 100%);
  color: white;
  border-color: rgb(76, 175, 80);
}

.card-save-btn:hover {
  background: linear-gradient(135deg, rgb(129, 199, 132) 0%, rgb(76, 175, 80) 100%);
  transform: scale(1.1);
}

.card-save-btn:disabled {
  background: linear-gradient(135deg, rgb(150, 150, 150) 0%, rgb(120, 120, 120) 100%);
  cursor: not-allowed;
  transform: none;
}

.card-view-btn {
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%);
  color: rgb(37, 26, 12);
  border-color: rgb(218, 165, 32);
}

.card-view-btn:hover {
  background: linear-gradient(135deg, rgb(255, 215, 0) 0%, rgb(218, 165, 32) 100%);
  transform: scale(1.1);
}

.card-upvote-btn {
  background: linear-gradient(135deg, rgb(46, 125, 50) 0%, rgb(27, 94, 32) 100%);
  color: white;
  border-color: rgb(76, 175, 80);
}

.card-upvote-btn:hover {
  background: linear-gradient(135deg, rgb(76, 175, 80) 0%, rgb(46, 125, 50) 100%);
  transform: scale(1.1);
}

.card-edit-btn, .skill-edit-btn {
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%);
  color: rgb(37, 26, 12);
  border-color: rgb(218, 165, 32);
}

.card-edit-btn:hover, .skill-edit-btn:hover {
  background: linear-gradient(135deg, rgb(255, 215, 0) 0%, rgb(218, 165, 32) 100%);
  transform: scale(1.1);
}

.export-menu {
  position: absolute;
  top: 35px;
  right: 0;
  background: linear-gradient(135deg, rgb(74, 60, 46) 0%, rgb(37, 26, 12) 100%);
  border: 2px solid rgb(218, 165, 32);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  min-width: 140px;
  z-index: 20;
  display: none;
}

.export-menu.show {
  display: block;
}

.export-option {
  padding: 10px 15px;
  color: rgb(251, 225, 183);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.export-option:hover {
  background: rgba(218, 165, 32, 0.2);
  color: rgb(218, 165, 32);
}

.export-option:first-child {
  border-radius: 6px 6px 0 0;
}

.export-option:last-child {
  border-radius: 0 0 6px 6px;
}

/* ===== IMAGE CONTAINER STYLES ===== */
.image-container {
  border: 3px solid gold;
  padding: 5px;
  margin-right: 50px;
  margin-top: 35px;
  border-radius: 10px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  width: auto;
  flex-shrink: 0;
  background: rgb(74, 60, 46);
  position: relative;
}

.image-container img:not(.card-frame img) {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  clip-path: inset(0);
}

.uploaded-image {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
}

.image-clip-wrapper {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  overflow: hidden;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}

.card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ===== SKILL-SPECIFIC IMAGE STYLES ===== */
.skill-image-container {
  border: 3px solid gold;
  padding: 5px;
  margin-right: 20px;
  border-radius: 50%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 75px;
  width: 75px;
  flex-shrink: 0;
  background: rgb(74, 60, 46);
  position: relative;
}

.skill-image-container img {
  height: 100%;
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.skill-image-container .skill-border-overlay {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 113px !important;
  height: 113px !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 999 !important;
  overflow: visible !important;
}

/* BULLETPROOF: Additional rules to force centering during exports */
.skill-card .skill-image-container .skill-border-overlay,
.skill-card-wrapper .skill-image-container .skill-border-overlay,
.profile-card-wrapper .skill-image-container .skill-border-overlay {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 113px !important;
  height: 113px !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 999 !important;
  overflow: visible !important;
}

/* Force positioning context on all skill image containers */
.skill-image-container,
.skill-card .skill-image-container,
.skill-card-wrapper .skill-image-container,
.profile-card-wrapper .skill-image-container {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 75px !important;
  height: 75px !important;
}

/* ===== CARD CONTENT STYLES ===== */
.card-content, .skill-content {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 3px solid gold;
  border-radius: 10px;
  max-width: 400px;
  min-width: 300px;
  width: fit-content;
  background: radial-gradient(ellipse at center, rgb(60, 45, 30) 0%, rgb(45, 35, 22) 40%, rgb(25, 18, 10) 100%);
}

.skill-content {
  width: 100%;
  min-width: 300px;
  max-width: none;
  box-sizing: border-box;
}

.card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
  padding: 0;
  background: transparent;
  width: 300px;
}

.item-tag {
  background-color: rgba(0, 0, 139, 0.5);
  color: rgb(152, 168, 254);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
  font-family: Arial, sans-serif;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(152, 168, 254, 0.3);
}

.text-section, .skill-header, .skill-effect {
  border-top: 2px solid gold;
  border-bottom: 2px solid gold;
  padding: 10px;
  color: rgb(251, 225, 183);
  font-family: 'Roboto', Arial, sans-serif; 
  
 
  text-shadow: 
    1px 1px 0 black,               /* Main shadow */
    -1px -1px 0 black,             /* Top-left outline */
    1px -1px 0 black,              /* Top-right outline */
    -1px 1px 0 black,              /* Bottom-left outline */
    2 2 4px rgba(0, 0, 0, 0.8);    /* Subtle glow */
  
  font-weight: 900;                /* Make it extra bold */
  letter-spacing: 0.5px;           /* Slight letter spacing */
}

.skill-header, .skill-effect {
  padding: 15px;
  text-shadow: 1px 1px 2px black;
  text-align: left;
}

.skill-effect {
  line-height: 1.4;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.item-title, .skill-title {
  font-size: 2em;
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif; 
  
  text-shadow: 
    2px 2px 0 black,
    -2px -2px 0 black,
    2px -2px 0 black,
    -2px 2px 0 black,
    0 0 8px rgba(0, 0, 0, 0.8);
  font-weight: 900;
  letter-spacing: 0.5px;
}

.hero-header img {
  max-width: 40px;
  height: auto;
  border-radius: 5px;
  margin-left: 10px;
}

.on-use-line {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  margin-left: 40px;
}

.crit-line {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  margin-left: 40px;
}

.crit-line-hr {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  margin-left: 40px;
  border: none;
  height: 2px;
  width: 80%;
  background: linear-gradient(to right, transparent, #8B5C2A, transparent);
}

.on-use-section {
  padding-left: 20px;
}

.on-use-line img {
  width: 16px;
  height: 18px;
  margin-right: 8px;
}

.cooldown-section {
  left: -30px;
  border-radius: 50%;
  border: 3px solid rgb(52, 45, 68);
  width: 50px;
  height: 50px;
  padding: 0;
  font-size: 1.2em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  background-color: #222;
  position: absolute;
  z-index: 1;
  overflow: visible;
  top: 50%; /* Default center position */
  transform: translateY(-50%); /* Center vertically */
}

.cooldown-section span {
  display: block;
  position: relative;
  z-index: 1;
}

.cooldown-border {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  height: 130%;
  transform: translate(calc(-50% + 2px), -50%);
  pointer-events: none;
  z-index: 0;
}

.cooldown-section .sec-text {
  font-size: 0.6em;
  color: rgb(217, 149, 81);
}

.ammo-section {
  right: -30px;
  border-radius: 10px;
  border: 3px solid silver;
  padding: 5px 10px;
  font-size: 0.9em;
  height: auto;
  width: auto;
  position: absolute;
  z-index: 1;
  background-color: rgb(37, 26, 12);
  color: rgb(254, 142, 0);
  font-weight: bold;
  font-family: Impact, 'Arial Black', 'Franklin Gothic Bold', Arial, sans-serif;
  text-shadow: 1px 1px 2px black;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.ammo-section img {
  width: 20px;
  height: 20px;
}

.scaling-values-container {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  display: flex;
  gap: 2px;
  z-index: 10;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 5px;
}

.scaling-value {
  background-color: #333;
  color: white;
  padding: 6px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  min-width: 28px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  flex: 1;
  max-width: 45px;
}

.scaling-value.heal { background-color: rgb(143, 234, 49); }
.scaling-value.regen { background-color: rgb(100, 255, 60); }
.scaling-value.shield { background-color: rgb(245, 208, 33); }
.scaling-value.damage { background-color: rgb(244, 82, 60); }
.scaling-value.poison { background-color: rgb(13, 190, 79); }
.scaling-value.burn { background-color: rgb(253, 146, 63); }

/* ===== EFFECTS AND INPUTS ===== */
.on-use-effects, .tag-effects {
  background: rgba(37, 26, 12, 0.5);
  border: 1px solid rgb(74, 60, 46);
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
}

.tag-input-group, .on-use-input-group, .passive-input-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.tag-input-group input, .on-use-input-group input, .passive-input-group input {
  flex: 1;
}

.export-import-section {
  background: rgba(37, 26, 12, 0.5);
  border: 1px solid rgb(74, 60, 46);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.export-import-section h4 {
  color: rgb(251, 225, 183);
  margin: 0 0 15px 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.export-import-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.hidden-input {
  display: none;
}
/* ===== COMMENTS SECTION STYLES - COMPLETE FIX ===== */
.card-wrapper {
  margin-bottom: 30px;
  width: 100%; /* Changed from fit-content to 100% for consistency */
  max-width: 100%;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* Reset positioning for browse page cards to match index.html */
.card-wrapper .card {
  position: relative;
}

.card-wrapper .card-visual-content {
  position: relative;
  width: 100%;
  min-width: 600px;
  box-sizing: border-box;
}

.card-wrapper .card-content {
  position: relative;
  overflow: visible; /* Important: allow cooldown/ammo to extend outside */
}

.card-wrapper .text-section {
  position: relative; /* This is the positioning context */
  overflow: visible; /* Allow elements to extend outside */
}

/* Reset cooldown and ammo to their original positioning */
.card-wrapper .cooldown-section {
  left: -30px;
  top: 50%; /* Center vertically by default */
  transform: translateY(-50%); /* Center vertically */
  bottom: auto;
}

.card-wrapper .ammo-section {

  right: -30px;
 
  bottom: auto ;
  transform: none; /* Remove any transforms */
 
}

.creator-info {
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(74, 60, 46, 0.9) 0%, rgba(37, 26, 12, 0.8) 100%);
  border: 2px solid rgb(218, 165, 32);
  border-radius: 12px 12px 0 0;
  font-size: 14px;
  color: rgb(251, 225, 183);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  width: 100%; /* Changed from min-width to width */
  box-sizing: border-box;
}

.creator-info span:first-child {
  font-weight: 600;
  color: rgb(251, 225, 183);
}

.creator-info span:first-child span {
  color: rgb(218, 165, 32);
  font-weight: normal;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.comments-section {
  background: linear-gradient(135deg, rgba(101, 84, 63, 0.95) 0%, rgba(89, 72, 51, 0.9) 100%);
  border: 2px solid rgb(218, 165, 32);
  border-radius: 0 0 12px 12px;
  padding: 20px;
  margin-top: -2px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
  transition: width 0.3s ease;
}

/* Removed width change to prevent layout shifts */

/* Override any inline white backgrounds */
.comments-section div[style*="background: white"] {
  background: linear-gradient(135deg, rgba(101, 84, 63, 0.95) 0%, rgba(89, 72, 51, 0.9) 100%) !important;
}

.comments-section h4 {
  margin: 0;
  color: rgb(251, 225, 183);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.toggle-comments-btn {
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%) !important;
  border: 2px solid rgb(37, 26, 12) !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  cursor: pointer;
  font-size: 12px !important;
  color: rgb(37, 26, 12) !important;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.toggle-comments-btn:hover {
  background: linear-gradient(135deg, rgb(255, 215, 0) 0%, rgb(218, 165, 32) 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.comments-list {
  max-height: 300px;
  overflow-y: auto;
  margin: 15px 0;
  background: rgba(37, 26, 12, 0.7) !important;
  border: 2px solid rgba(218, 165, 32, 0.3);
  border-radius: 8px;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgb(218, 165, 32) rgba(37, 26, 12, 0.5);
}

.comments-list::-webkit-scrollbar {
  width: 8px;
}

.comments-list::-webkit-scrollbar-track {
  background: rgba(37, 26, 12, 0.5);
  border-radius: 4px;
}

.comments-list::-webkit-scrollbar-thumb {
  background: rgb(218, 165, 32);
  border-radius: 4px;
}

/* Individual comment divs - force brown background */
.comments-list > div:not([style*="text-align: center"]) {
  padding: 12px !important;
  border-bottom: 1px solid rgba(218, 165, 32, 0.3) !important;
  background: linear-gradient(135deg, rgba(74, 60, 46, 0.7) 0%, rgba(89, 72, 51, 0.6) 100%) !important;
  margin-bottom: 8px !important;
  border-radius: 6px !important;
  transition: background 0.3s ease !important;
  border: 1px solid rgba(218, 165, 32, 0.2) !important;
}

.comments-list > div:not([style*="text-align: center"]):hover {
  background: linear-gradient(135deg, rgba(74, 60, 46, 0.9) 0%, rgba(89, 72, 51, 0.8) 100%) !important;
  border-color: rgba(218, 165, 32, 0.4) !important;
}

.comments-list > div:last-child {
  border-bottom: none !important;
  margin-bottom: 0 !important;
}

/* Force text colors */
.comments-list strong {
  color: rgb(251, 225, 183) !important;
  font-size: 14px !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.comments-list span {
  color: rgb(218, 165, 32) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.comments-list > div > div:last-child {
  color: rgb(251, 225, 183) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin-top: 5px !important;
}

.comment-form {
  border-top: 2px solid rgb(218, 165, 32);
  padding-top: 15px;
  margin-top: 15px;
}

.comment-form > div {
  background: transparent !important; /* Remove any white background */
}

.comment-form input {
  flex: 1;
  padding: 10px 15px !important;
  border: 2px solid rgb(218, 165, 32) !important;
  border-radius: 6px !important;
  background-color: rgba(37, 26, 12, 0.8) !important;
  color: rgb(251, 225, 183) !important;
  font-size: 14px !important;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.comment-form input:focus {
  outline: none !important;
  border-color: rgb(255, 215, 0) !important;
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  background-color: rgba(37, 26, 12, 0.9) !important;
}

.comment-form input::placeholder {
  color: rgb(150, 120, 90) !important;
}

.comment-form button {
  padding: 10px 20px !important;
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%) !important;
  color: rgb(37, 26, 12) !important;
  border: 2px solid rgb(37, 26, 12) !important;
  border-radius: 6px !important;
  cursor: pointer;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  font-size: 14px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.comment-form button:hover {
  background: linear-gradient(135deg, rgb(255, 215, 0) 0%, rgb(218, 165, 32) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Sign in to comment message */
.comment-form > div[style*="text-align: center"] {
  text-align: center !important;
  padding: 20px !important;
  color: rgb(251, 225, 183) !important;
  font-style: italic !important;
  background: linear-gradient(135deg, rgba(74, 60, 46, 0.5) 0%, rgba(89, 72, 51, 0.4) 100%) !important;
  border-radius: 8px !important;
  border: 2px dashed rgba(218, 165, 32, 0.5) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* No comments placeholder */
.comments-list > div[style*="text-align: center"] {
  padding: 30px !important;
  text-align: center !important;
  color: rgb(201, 175, 133) !important;
  font-style: italic !important;
  background: rgba(37, 26, 12, 0.3) !important;
  border: 2px dashed rgba(218, 165, 32, 0.3) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.comments-list > div[style*="text-align: center"]:hover {
  background: rgba(37, 26, 12, 0.4) !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .creator-info,
  .comments-section {
    min-width: 100%;
    width: 100%;
  }
  
  .comments-section:has(.comments-list:not([style*="display: none"])) {
    width: 100%;
  }
}


/* ===== KEYWORD AND SHORTCUTS ===== */
.shortcuts-help {
  background: rgba(37, 26, 12, 0.7);
  border: 1px solid rgb(74, 60, 46);
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
  color: rgb(201, 175, 133);
  font-size: 12px;
}

.shortcuts-help h4 {
  color: rgb(251, 225, 183);
  margin: 0 0 10px 0;
  font-size: 14px;
}

.shortcuts-help .shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.shortcuts-help .shortcut-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.shortcuts-help .shortcut-key {
  color: rgb(218, 165, 32);
  font-weight: bold;
}

.keyword-icon {
  width: 16px;
  height: 18px;
  display: inline;
  vertical-align: middle;
  margin: 0 2px;
}

.keyword-preview {
  width: 16px;
  height: 18px;
  display: inline;
  vertical-align: middle;
}

.key-text {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: bold;
}

/* ===== BROWSER-SPECIFIC STYLES ===== */
.items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;
}

.stats-bar {
  background: rgba(37, 26, 12, 0.7);
  border: 1px solid rgb(74, 60, 46);
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.stat-item {
  font-weight: bold;
}

.stat-value {
  color: rgb(218, 165, 32);
}

.load-more-container {
  text-align: center;
  margin: 30px 0;
}

/* ===== MESSAGE STYLES ===== */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 1.2em;
  color: rgb(218, 165, 32);
}

.error {
  color: red;
  font-weight: bold;
  margin-top: 10px;
}

.error {
  background: rgba(180, 60, 60, 0.9);
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

.success {
  color: rgb(143, 234, 49);
  font-weight: bold;
  margin-top: 10px;
}

.no-results {
  text-align: center;
  padding: 40px;
  background: rgba(37, 26, 12, 0.5);
  border-radius: 8px;
  margin: 20px 0;
}

/* ===== DEBUG STYLES ===== */
.debug-toggle {
  background: linear-gradient(135deg, rgb(180, 60, 60) 0%, rgb(140, 40, 40) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  margin-top: 20px;
}

.debug-toggle:hover {
  background: linear-gradient(135deg, rgb(200, 80, 80) 0%, rgb(180, 60, 60) 100%);
  transform: translateY(-2px);
}

.debug-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(180, 60, 60, 0.95);
  color: white;
  padding: 20px;
  border-top: 3px solid #fff;
  max-height: 40vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 999;
}

.debug-panel.show {
  transform: translateY(0);
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 10px;
}

.debug-close {
  background: none;
  border: 1px solid white;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.debug-close:hover {
  background: white;
  color: rgb(180, 60, 60);
}

.debug-content {
  font-size: 12px;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 5px;
  max-height: 250px;
  overflow-y: auto;
}

.debug-content div {
  margin-bottom: 5px;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== LOADING STATES ===== */
.preview-column.loading #previewContainer {
  opacity: 0.6;
  pointer-events: none;
}

.preview-column.loading::after {
  content: "Generating preview...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(37, 26, 12, 0.9);
  color: rgb(251, 225, 183);
  padding: 15px 25px;
  border-radius: 8px;
  border: 2px solid rgb(218, 165, 32);
  z-index: 10;
}

/* ===== FOOTER STYLES ===== */
.footer {
  background: linear-gradient(135deg, rgb(74, 60, 46) 0%, rgb(89, 72, 51) 100%);
  border-top: 3px solid rgb(251, 225, 183);
  margin-top: 40px;
  padding: 30px 0;
  text-align: center;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
  width: 100%; /* Ensure full width */
}

.footer-content {
  max-width: 1800px; /* Match other content widths */
  margin: 0 auto;
  padding: 0 20px;
}

.footer-title {
  color: rgb(251, 225, 183);
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.footer-description {
  color: rgb(201, 175, 133);
  font-size: 1em;
  margin-bottom: 20px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-link {
  color: rgb(218, 165, 32);
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  padding: 8px 15px;
  border: 2px solid transparent;
  border-radius: 5px;
}

.footer-link:hover {
  color: rgb(255, 215, 0);
  border-color: rgb(255, 215, 0);
  background: rgba(255, 215, 0, 0.1);
  transform: translateY(-2px);
}

.footer-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgb(218, 165, 32) 50%, transparent 100%);
  margin: 20px 0;
}

.footer-copyright {
  color: rgb(150, 120, 90);
  font-size: 0.9em;
  font-style: italic;
}

.footer-contact {
  color: rgb(150, 120, 90);
  font-size: 0.9em;
  margin-top: 8px;
}

.footer-version {
  color: rgb(101, 84, 63);
  font-size: 0.8em;
  margin-top: 10px;
}
/* ===== GALLERY MODAL STYLES ===== */
#gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  color: rgb(251, 225, 183);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10001;
}

.gallery-counter {
  font-size: 18px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.collection-name {
  font-size: 14px;
  color: rgb(218, 165, 32);
  margin-top: 4px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.gallery-close {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.gallery-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.gallery-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

.gallery-content {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.gallery-thumbnails {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-instructions {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* ===== COLLECTION HEADER STYLES ===== */
.collection-header {
  background: linear-gradient(135deg, rgb(63, 81, 181) 0%, rgb(48, 63, 159) 100%);
  color: white;
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;
  margin-bottom: -2px;
  border: 2px solid rgb(63, 81, 181);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  min-width: 450px;
}

.collection-header button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.collection-header button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* ===== GALLERY BUTTON STYLES ===== */
.card-gallery-btn {
  background: linear-gradient(135deg, rgb(63, 81, 181) 0%, rgb(48, 63, 159) 100%) !important;
  color: white !important;
  border-color: rgb(63, 81, 181) !important;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border: 2px solid;
}

.card-gallery-btn:hover {
  background: linear-gradient(135deg, rgb(92, 107, 192) 0%, rgb(63, 81, 181) 100%) !important;
  transform: scale(1.1);
}


/* Hide comments by default on profile and browse pages */
.comments-list,
.comment-form {
  display: none;
}

/* Comments are visible when they have the show class OR inline display style */
.comments-list.show,
.comment-form.show {
  display: block;
}

/* Allow JavaScript inline styles to override when needed */
.comments-list[style*="display: block"],
.comment-form[style*="display: block"] {
  display: block;
}


/* Skills Gallery Styles */

/* Gallery Controls */
.gallery-controls {
  background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(89, 72, 51) 100%);
  border: 2px solid rgb(251, 225, 183);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  color: rgb(251, 225, 183);
}

/* Sticky Gallery Controls - stays visible when scrolling */
.sticky-gallery-controls {
  position: sticky;
  top: 20px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(101, 84, 63, 0.95) 0%, rgba(89, 72, 51, 0.95) 100%);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-header h3 {
  margin: 0;
  color: rgb(251, 225, 183);
}

.gallery-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-actions-group {
  display: flex;
  gap: 10px;
  margin-left: 10px;
}

.gallery-toggle-btn.active {
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%) !important;
  color: rgb(37, 26, 12) !important;
  font-weight: bold;
}

/* Collection Creator */
.collection-creator {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.collection-creator input,
.collection-creator textarea {
  flex: 1;
  min-width: 200px;
  padding: 8px;
  border: 1px solid rgb(251, 225, 183);
  border-radius: 4px;
  background: rgba(251, 225, 183, 0.1);
  color: rgb(251, 225, 183);
  font-family: inherit;
}

.collection-creator input::placeholder,
.collection-creator textarea::placeholder {
  color: rgba(251, 225, 183, 0.6);
}

/* Gallery Stats */
.gallery-stats {
  font-size: 14px;
  color: rgba(251, 225, 183, 0.8);
}

.selected-count {
  font-weight: bold;
  color: rgb(218, 165, 32);
}

/* Gallery Item Styles */
.skill-card.gallery-item {
  position: relative;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.skill-card.gallery-item:hover {
  border-color: rgb(218, 165, 32);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(218, 165, 32, 0.3);
}

/* Gallery Selector */
.gallery-selector {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 6px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 10;
}

.gallery-selector input[type="checkbox"] {
  margin: 0;
  transform: scale(1.2);
}

.gallery-selector .checkbox-label {
  color: white;
  font-size: 12px;
  font-weight: bold;
  margin: 0;
  white-space: nowrap;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collections-list {
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: 20px;
}

.collection-item {
  border: 2px solid rgb(251, 225, 183);
  border-radius: 10px;
  padding: 15px;
  margin: 10px 0;
  background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(89, 72, 51) 100%);
  color: rgb(251, 225, 183);
  transition: transform 0.2s ease;
}

.collection-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(251, 225, 183, 0.2);
}

.collection-item h4 {
  margin: 0 0 5px 0;
  color: rgb(218, 165, 32);
}

.collection-item p {
  margin: 0 0 10px 0;
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.4;
}

.collection-item .collection-meta {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 10px;
}

.collection-item .collection-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.collection-item button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.collection-item button:hover {
  transform: translateY(-1px);
}

.load-collection-btn {
  background: rgb(218, 165, 32);
  color: rgb(37, 26, 12);
}

.load-collection-btn:hover {
  background: rgb(255, 193, 7);
}

.delete-collection-btn {
  background: rgb(198, 44, 66);
  color: white;
}

.delete-collection-btn:hover {
  background: rgb(220, 53, 69);
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .gallery-actions {
    justify-content: center;
  }
  
  .collection-creator {
    flex-direction: column;
  }
  
  .gallery-actions-group {
    margin-left: 0;
    justify-content: center;
  }
  
  .collection-item .collection-actions {
    justify-content: center;
  }
}

/* Loading States */
.gallery-loading {
  text-align: center;
  padding: 40px;
  color: rgb(251, 225, 183);
  background: rgba(101, 84, 63, 0.1);
  border-radius: 10px;
  margin: 20px 0;
}

.gallery-loading::before {
  content: "⚡";
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Empty State */
.gallery-empty {
  text-align: center;
  padding: 40px;
  color: rgba(251, 225, 183, 0.7);
  background: rgba(101, 84, 63, 0.1);
  border-radius: 10px;
  margin: 20px 0;
}

.gallery-empty::before {
  content: "📦";
  font-size: 48px;
  display: block;
  margin-bottom: 15px;
  opacity: 0.5;
}

/* Character Counter Enhancement for Gallery Mode */
.character-counter.gallery-mode {
  background: rgba(251, 225, 183, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(251, 225, 183, 0.3);
}
/* ===== PROGRESS MODAL STYLES ===== */
.progress-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-modal .progress-bar-container {
  width: 100%;
  background: rgba(37, 26, 12, 0.5);
  border-radius: 10px;
  overflow: hidden;
  height: 20px;
  border: 1px solid rgba(218, 165, 32, 0.3);
}

.progress-modal .progress-bar {
  height: 100%;
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
}

/* ===== BULK IMPORT CONFIRMATION STYLES ===== */
.bulk-import-modal {
  background: linear-gradient(135deg, rgb(101, 84, 63) 0%, rgb(89, 72, 51) 100%);
  border: 2px solid rgb(251, 225, 183);
  border-radius: 15px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  color: rgb(251, 225, 183);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.bulk-import-modal h3 {
  margin: 0 0 15px 0;
  color: rgb(251, 225, 183);
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.bulk-import-modal .collection-info {
  background: rgba(37, 26, 12, 0.5);
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid rgba(218, 165, 32, 0.3);
}

.bulk-import-modal .item-preview {
  background: rgba(37, 26, 12, 0.3);
  padding: 10px;
  border-radius: 4px;
  margin: 15px 0;
  font-size: 14px;
  border: 1px solid rgba(218, 165, 32, 0.2);
}

.bulk-import-modal .button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.bulk-import-modal button {
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.bulk-import-modal .cancel-btn {
  border: 2px solid rgb(251, 225, 183);
  background: transparent;
  color: rgb(251, 225, 183);
}

.bulk-import-modal .cancel-btn:hover {
  background: rgba(251, 225, 183, 0.1);
}

.bulk-import-modal .import-btn {
  border: none;
  background: linear-gradient(135deg, rgb(218, 165, 32) 0%, rgb(184, 134, 11) 100%);
  color: rgb(37, 26, 12);
}

.bulk-import-modal .import-btn:hover {
  background: linear-gradient(135deg, rgb(255, 215, 0) 0%, rgb(218, 165, 32) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
  .gallery-nav {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .gallery-prev {
    left: 10px;
  }
  
  .gallery-next {
    right: 10px;
  }
  
  .gallery-header {
    padding: 15px;
  }
  
  .gallery-counter {
    font-size: 16px;
  }
  
  .collection-name {
    font-size: 12px;
  }
  
  .gallery-thumbnails {
    bottom: 15px;
    padding: 8px;
    gap: 8px;
  }
  
  .gallery-thumbnails button {
    width: 35px;
    height: 35px;
    font-size: 11px;
  }
  
  .gallery-instructions {
    bottom: 15px;
    font-size: 12px;
    padding: 0 20px;
  }
  
  .collection-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    min-width: 100%;
  }
  
  .collection-header button {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .gallery-content {
    max-width: 95vw;
    max-height: 75vh;
  }
  
  .gallery-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .bulk-import-modal {
    padding: 20px;
  }
  
  .bulk-import-modal .button-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .bulk-import-modal button {
    width: 100%;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInGallery {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.gallery-content > * {
  animation: fadeInGallery 0.3s ease;
}

.gallery-nav.gallery-prev {
  animation: slideInFromLeft 0.3s ease;
}

.gallery-nav.gallery-next {
  animation: slideInFromRight 0.3s ease;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.gallery-nav:focus,
.gallery-close:focus,
.gallery-thumbnails button:focus {
  outline: 3px solid rgba(218, 165, 32, 0.7);
  outline-offset: 2px;
}

.gallery-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gallery-nav:disabled:hover {
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
}

/* ===== HIGH DPI SUPPORT ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .gallery-nav,
  .gallery-close,
  .card-gallery-btn {
    border-width: 1px;
  }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
  #gallery-modal,
  .gallery-nav,
  .gallery-close,
  .card-gallery-btn,
  .progress-bar {
    transition: none;
  }
  
  .gallery-content > *,
  .gallery-nav.gallery-prev,
  .gallery-nav.gallery-next {
    animation: none;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
  }
}

@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 20px 0 20px;
  }

  .preview-column {
    position: static;
    max-height: none;
    order: -1; /* Show preview first on mobile */
    min-height: 400px;
  }

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

  .page-title {
    font-size: 2em;
  }

  .management-actions {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .export-import-group {
    justify-content: center;
  }

  .bottom-sections {
    padding: 20px;
  }
}


@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: linear-gradient(135deg, rgb(74, 60, 46) 0%, rgb(37, 26, 12) 100%);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: left 0.3s ease;
    padding-top: 50px;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-link {
    width: 90%;
    text-align: center;
    padding: 20px;
    margin: 10px 0;
    border: 2px solid rgb(218, 165, 32);
    border-radius: 10px;
    background: rgba(37, 26, 12, 0.5);
    height: auto;
    border-left: 2px solid rgb(218, 165, 32);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-container {
    padding: 0 15px;
  }

  .nav-logo {
    font-size: 1.5em;
  }

  .main-container {
    padding: 15px 15px 0 15px;
  }
  
  .bottom-sections {
    padding: 15px;
  }
  
  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .export-import-group {
    flex-direction: column;
    width: 100%;
  }

  .export-import-group button {
    width: 100%;
  }

  .section-title {
    font-size: 1.5em;
  }

  .save-card-btn {
    font-size: 14px !important;
    padding: 12px 25px !important;
  }

  .clear-all-btn {
    font-size: 14px !important;
    padding: 12px 20px !important;
  }

  .main-content {
    padding: 1em;
  }

  .page-title {
    font-size: 2em;
  }

  .form-grid, .controls-grid {
    grid-template-columns: 1fr;
  }

  .export-import-buttons {
    flex-direction: column;
  }

  .card-controls, .skill-controls {
    flex-direction: column;
    gap: 3px;
  }

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

  .skill-image-container {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .skill-border-overlay {
    width: 182px;
    height: 182px;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }
  
  .browse-container .items-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .browse-container {
    padding: 15px;
  }
  
  /* Ensure browse page cards maintain 700px width on mobile */
  .browse-container .card-wrapper {
    width: 700px !important;
    max-width: 700px !important;
    flex: 0 0 700px !important;
  }
}

@media (max-width: 600px) {
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
}

.card-wrapper .card-visual-content {
  position: relative;
}

/* Items page specific: limit card width to 700px */
.main-container .card {
  width: 700px !important;
  max-width: 700px !important;
  flex: 0 0 700px !important;
}
