/* Main Styles for Stickers Trade Application */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --body-bg: #f8f9fa;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--body-bg);
  color: var(--dark-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Navigation */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

/* Avatar */
.avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-md {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: var(--card-shadow);
}

/* Cards */
.card {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Sticker Cards */
.sticker-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background-color: white;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
}

.sticker-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.sticker-card .sticker-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.sticker-card:hover .sticker-image {
  transform: scale(1.05);
}

.sticker-card .sticker-number {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 2;
}

.sticker-card:hover .sticker-number {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.sticker-card .sticker-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 2;
}

.sticker-card:hover .sticker-status {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.sticker-card .sticker-status.have {
  background-color: var(--success-color);
  color: white;
}

.sticker-card .sticker-status.need {
  background-color: var(--danger-color);
  color: white;
}

.sticker-card .sticker-status.have::before {
  content: '✓ ';
}

.sticker-card .sticker-status.need::before {
  content: '! ';
}

.sticker-card .sticker-info {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease;
}

.sticker-card:hover .sticker-info {
  background-color: rgba(13, 110, 253, 0.05);
}

.sticker-card .sticker-name {
  font-size: 1.1rem;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--dark-color);
  transition: color 0.3s ease;
}

.sticker-card:hover .sticker-name {
  color: var(--primary-color);
}

.sticker-card .sticker-category {
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-top: -3px;
  margin-bottom: 10px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.sticker-card .sticker-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease;
}

[data-theme="dark"] .sticker-card .sticker-actions {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.sticker-card:hover .sticker-actions {
  border-top-color: rgba(13, 110, 253, 0.2);
}

.sticker-card .sticker-actions .btn {
  transition: all 0.3s ease;
  border-radius: 6px;
  font-weight: 500;
}

.sticker-card .sticker-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Collection Stats */
.collection-stats {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 30px;
}

.stat-item {
  text-align: center;
  padding: 15px;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stat-label {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

/* Trade Cards */
.trade-card {
  background-color: white;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.trade-card .trade-header {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.trade-card .trade-user-info {
  margin-left: 15px;
}

.trade-card .trade-username {
  font-weight: bold;
  margin-bottom: 0;
}

.trade-card .trade-location {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.trade-card .trade-body {
  padding: 15px;
}

.trade-card .trade-section {
  margin-bottom: 15px;
}

.trade-card .trade-section-title {
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.trade-card .trade-section-title i {
  margin-right: 10px;
  color: var(--primary-color);
}

.trade-card .trade-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trade-card .trade-sticker {
  position: relative;
  width: 80px;
  height: 120px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trade-card .trade-sticker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trade-card .trade-sticker .sticker-number {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  text-align: center;
  padding: 3px;
  font-size: 0.8rem;
}

.trade-card .trade-actions {
  display: flex;
  justify-content: flex-end;
  padding: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Messages */
.message-list {
  max-height: 500px;
  overflow-y: auto;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 20px;
}

.message {
  margin-bottom: 15px;
  display: flex;
}

.message.outgoing {
  justify-content: flex-end;
}

.message .message-content {
  max-width: 70%;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
}

.message.incoming .message-content {
  background-color: white;
  border: 1px solid #e9ecef;
  border-top-left-radius: 0;
}

.message.outgoing .message-content {
  background-color: var(--primary-color);
  color: white;
  border-top-right-radius: 0;
}

.message .message-time {
  font-size: 0.75rem;
  margin-top: 5px;
  text-align: right;
  opacity: 0.7;
}

.message-form {
  display: flex;
  margin-top: 15px;
}

.message-form textarea {
  flex: 1;
  border-radius: 20px;
  padding: 10px 15px;
  resize: none;
}

.message-form button {
  margin-left: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Admin Styles */
.navbar-dark.bg-secondary {
  background-color: #343a40 !important;
}

.nav-tabs {
  border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
  color: #fff;
  margin-bottom: -1px;
  background-color: #495057;
  border: 1px solid #495057;
  border-bottom-color: transparent;
}

.nav-tabs .nav-link:hover {
  border-color: #495057 #495057 #495057;
}

.nav-tabs .nav-link.active {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd #0d6efd #dee2e6;
}

#admin-content {
  margin-top: 2rem;
}

#admin-content h2 {
  color: var(--dark-color);
  margin-bottom: 1.5rem;
}

#admin-users-table {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

#admin-users-table th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

#admin-users-table td {
  vertical-align: middle;
}

#admin-users-table .btn-group {
  display: flex;
  gap: 0.25rem;
}

#admin-users-table .btn-sm {
  padding: 0.25rem 0.5rem;
}

.pagination {
  margin-top: 1rem;
}

.pagination .page-link {
  color: var(--dark-color);
}

.pagination .page-link:hover {
  color: var(--primary-color);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

#search-input {
  max-width: 300px;
  margin-right: 1rem;
}

#bulk-delete {
  margin-right: 0.5rem;
}

#new-user {
  margin-right: 0.5rem;
}

/* Admin Theme Customization */
.admin-theme-editor {
  background-color: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.admin-theme-editor h3 {
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.admin-theme-color-picker {
  width: 100%;
  max-width: 200px;
  margin-bottom: 1rem;
}

.admin-theme-preview {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background-color: #f8f9fa;
}

.admin-theme-preview .navbar {
  margin-bottom: 1rem;
}

.admin-theme-preview .card {
  margin-bottom: 1rem;
}

.admin-theme-preview .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Forms */
.auth-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 35px;
  background-color: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid transparent;
}

.auth-form:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.auth-form .form-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 2rem;
}

.auth-form .form-control {
  padding: 12px 15px;
  border-radius: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.auth-form .btn-primary {
  padding: 12px 15px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.auth-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.auth-form .form-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.auth-form .form-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-form .form-footer a:hover {
  color: #0a58ca;
  text-decoration: underline;
}

/* Steps */
.step-card {
  background-color: white;
  border-radius: 10px;
  padding: 25px 20px;
  box-shadow: var(--card-shadow);
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.step-card h4 {
  margin-top: 15px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--primary-color);
}

.step-card p {
  line-height: 1.5;
  margin-bottom: 0;
}

.step-number {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.3rem;
  margin: 0 auto 15px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.step-card:hover .step-number {
  transform: scale(1.1);
}

/* Filters */
.filters {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

/* Loading Spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
  .sticker-card .sticker-image {
    height: 150px;
  }
  
  .trade-card .trade-sticker {
    width: 60px;
    height: 90px;
  }
  
  .message .message-content {
    max-width: 85%;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}
