/* Public Profile Page Styles */
.public-profile-page {
  min-height: calc(100vh - 64px);
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* Profile Hero Header */
.profile-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 3rem 1rem 2rem;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(247, 147, 26, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.profile-hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

/* Avatar */
.profile-avatar {
  position: relative;
}

.profile-avatar::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, #f7931a 0%, #ffab40 50%, #f7931a 100%);
  border-radius: 50%;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.avatar-image,
.avatar-placeholder {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #1a1a1a;
}

.avatar-image {
  object-fit: cover;
}

.avatar-placeholder {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: #f7931a;
}

/* Profile Info */
.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
}

.profile-member-since {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-member-since::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #f7931a;
  border-radius: 50%;
}

/* Stats */
.profile-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.stat-card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  min-width: 140px;
}

.stat-card:hover {
  border-color: rgba(247, 147, 26, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(247, 147, 26, 0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #f7931a;
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Main Content */
.profile-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Tabs */
.profile-tabs {
  margin-bottom: 3rem;
}

.tab-navigation {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 2rem;
}

.tab-button {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.tab-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
  color: #0f172a;
  background: linear-gradient(135deg, #f7931a 0%, #ffab40 100%);
  box-shadow: 0 4px 15px rgba(247, 147, 26, 0.3);
}

/* Tab Panes */
.tab-content {
  position: relative;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Puzzles Grid */
.puzzles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Puzzle Card */
.profile-puzzle-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.profile-puzzle-card:hover {
  border-color: rgba(247, 147, 26, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.puzzle-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.puzzle-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.profile-puzzle-card:hover .puzzle-card-image img {
  transform: scale(1.05);
}

.puzzle-card-image-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.puzzle-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.puzzle-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.puzzle-card-date {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.puzzle-card-date svg {
  width: 14px;
  height: 14px;
}

.puzzle-card-solver,
.puzzle-card-creator {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.puzzle-card-solver svg,
.puzzle-card-creator svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.puzzle-card-solver a,
.puzzle-card-creator a {
  color: #f7931a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.puzzle-card-solver a:hover,
.puzzle-card-creator a:hover {
  color: #fbbf24;
  text-decoration: underline;
}

.puzzle-card-description {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.puzzle-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.puzzle-card-prize {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prize-icon {
  width: 28px;
  height: 28px;
  background: rgba(247, 147, 26, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.prize-amount {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f7931a;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-view:hover {
  background: linear-gradient(135deg, #f7931a 0%, #ffab40 100%);
  color: #0f172a;
  border-color: transparent;
}

.btn-view svg {
  width: 14px;
  height: 14px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

/* Send Cacatais Button */
.btn-send-cacatais {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #0f172a;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-send-cacatais:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

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

.btn-send-cacatais svg {
  stroke: currentColor;
}

/* Profile Actions */
.profile-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 640px) {
  .profile-actions {
    justify-content: flex-start;
  }
}

.profile-actions .btn-send-cacatais {
  margin-top: 0;
}

/* Send Message Button */
.btn-send-message {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #f7931a 0%, #ff6b00 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(247, 147, 26, 0.3);
  text-decoration: none;
}

.btn-send-message:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 147, 26, 0.4);
}

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

.btn-send-message svg {
  stroke: currentColor;
}

/* Transfer Modal */
.transfer-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.transfer-modal.is-open {
  display: flex;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.modal-open {
  overflow: hidden;
}

.transfer-modal-content {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  animation: modalSlideIn 0.2s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

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

.transfer-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.transfer-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transfer-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.transfer-modal-body {
  padding: 1.5rem;
}

.transfer-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.transfer-recipient {
  margin-bottom: 1.25rem;
}

.transfer-recipient-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.transfer-recipient-avatar,
.transfer-recipient-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.transfer-recipient-avatar {
  object-fit: cover;
}

.transfer-recipient-avatar-placeholder {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: #f7931a;
}

.transfer-recipient-name {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.transfer-balance {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(247, 147, 26, 0.1);
  border: 1px solid rgba(247, 147, 26, 0.2);
  border-radius: 10px;
}

.transfer-balance-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f7931a;
}

.transfer-field {
  margin-bottom: 1.5rem;
}

.transfer-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.transfer-input {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.transfer-input:focus {
  border-color: #f7931a;
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.2);
}

.transfer-input::placeholder {
  color: #475569;
}

.transfer-input-suffix {
  position: absolute;
  right: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
}

.transfer-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.transfer-actions .btn-cancel {
  flex: 1;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.transfer-actions .btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.transfer-actions .btn-confirm {
  flex: 1;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #0f172a;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.transfer-actions .btn-confirm:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.transfer-actions .btn-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive Design */
@media (min-width: 640px) {
  .profile-header {
    flex-direction: row;
    text-align: left;
    gap: 2rem;
  }

  .profile-info {
    align-items: flex-start;
  }

  .profile-name {
    font-size: 2.5rem;
  }

  .avatar-image,
  .avatar-placeholder {
    width: 140px;
    height: 140px;
  }

  .avatar-placeholder {
    font-size: 3.5rem;
  }

  .profile-stats {
    margin-top: 1.5rem;
  }
}

@media (min-width: 768px) {
  .profile-hero {
    padding: 4rem 2rem 3rem;
  }

  .profile-content {
    padding: 2.5rem 2rem;
  }

  .tab-navigation {
    max-width: 400px;
  }

  .tab-button {
    flex: none;
    padding: 0.875rem 2rem;
  }
}

@media (max-width: 639px) {
  .profile-hero {
    padding: 2rem 1rem 1.5rem;
  }

  .avatar-image,
  .avatar-placeholder {
    width: 100px;
    height: 100px;
  }

  .avatar-placeholder {
    font-size: 2.5rem;
  }

  .profile-name {
    font-size: 1.75rem;
  }

  .profile-stats {
    width: 100%;
    justify-content: center;
  }

  .stat-card {
    flex: 1;
    padding: 1rem;
    min-width: 0;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .tab-navigation {
    flex-direction: column;
  }

  .puzzles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
