.account-page {
  min-height: calc(100vh - 80px);
  padding: 120px 1rem 3rem;
  background: linear-gradient(
    145deg,
    rgba(10, 5, 8, 0.95) 0%,
    rgba(26, 10, 18, 0.95) 100%
  );
}

.account-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .account-layout {
    display: block;
  }

  .account-preview {
    position: relative;
    top: auto;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 6rem auto; /* Even bigger gap */
    z-index: 10;
  }

  .account-preview h2 {
    text-align: center;
    width: 100%;
  }

  .player-card-preview {
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  }

  .btn-logout {
    width: 100%;
    max-width: 320px;
    margin-top: 2rem;
    padding: 1rem; /* Bigger touch target */
    position: relative;
    display: flex;
  }

  .account-form-container {
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
    margin-top: 2rem; /* Additional top margin */
  }
}

@media (max-width: 600px) {
  .account-page {
    padding: 1.5rem 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .photo-upload {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Preview Column */
.account-preview {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.account-preview h2 {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

/* Player Card Preview */
.player-card-preview {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
}

.player-card__image {
  aspect-ratio: 1;
  background: linear-gradient(
    135deg,
    rgba(255, 143, 163, 0.2),
    rgba(139, 47, 61, 0.3)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.player-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-card__placeholder {
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
}

.player-card__info {
  padding: 1.5rem;
  text-align: center;
}

.player-card__info h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

.player-card__bio {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  max-height: 100px;
  overflow: hidden;
}

.player-card__bio em {
  opacity: 0.5;
}

/* Limitar tamaño de imágenes/gifs en la bio preview */
.player-card__bio img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  border-radius: 6px;
  margin: 0.3rem 0;
  display: inline-block;
  object-fit: contain;
}

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.8rem;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: 12px;
  color: #ff6b6b;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 107, 107, 0.2);
}

/* Form Container */
.account-form-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 2rem;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
}

.form-section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--brand-gold);
  margin: 0 0 1.5rem;
  font-weight: 600;
}

.form-section h2 i {
  font-size: 1.2rem;
}

/* Photo Upload */
.photo-upload {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.photo-current {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.photo-current img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-wine));
}

.photo-input {
  flex: 1;
}

.photo-input input[type="file"] {
  display: none;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-upload:hover {
  background: rgba(255, 255, 255, 0.15);
}

.photo-input small {
  display: block;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,239,244,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-group select option {
  background-color: #1a050a;
  color: var(--text-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-pink);
  box-shadow: 0 0 0 3px rgba(255, 143, 163, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Quill Editor Styles */
#descriptionEditor {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  min-height: 150px;
}

#descriptionEditor .ql-editor {
  min-height: 120px;
  color: white;
  font-size: 0.95rem;
}

#descriptionEditor .ql-editor.ql-blank::before {
  color: rgba(255, 255, 255, 0.3);
  font-style: normal;
}

.ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px 12px 0 0;
}

.ql-container.ql-snow {
  border: none;
  border-radius: 0 0 12px 12px;
}

.ql-snow .ql-stroke {
  stroke: rgba(255, 255, 255, 0.6);
}

.ql-snow .ql-fill {
  fill: rgba(255, 255, 255, 0.6);
}

.ql-snow .ql-picker {
  color: rgba(255, 255, 255, 0.6);
}

/* Form Actions */
.form-actions {
  margin-top: 1.5rem;
}

.form-actions .btn-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  background: linear-gradient(
    135deg,
    var(--brand-pink) 0%,
    var(--brand-wine) 100%
  );
  color: white;
  transition: all 0.2s ease;
}

.form-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 143, 163, 0.4);
}

/* Alert */
.alert {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.alert--success {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #81c784;
}

.alert--error {
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff8a8a;
}

/* Badges */
.badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}
.badge--top {
  background: #4a90d9;
  color: white;
}
.badge--jungle {
  background: #4caf50;
  color: white;
}
.badge--mid {
  background: #ff9800;
  color: black;
}
.badge--adc {
  background: #e91e63;
  color: white;
}
.badge--support {
  background: #9c27b0;
  color: white;
}
.badge--coach {
  background: var(--brand-gold);
  color: black;
}
.badge--manager,
.badge--autofill {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Light theme: selects del formulario */
[data-theme="light"] .form-group select {
  background-color: #fff5f8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237d3c58' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  border-color: rgba(125, 60, 88, 0.25);
  color: var(--text-primary);
}

[data-theme="light"] .form-group select option {
  background-color: #fff5f8;
  color: var(--text-primary);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
  background: rgba(255, 230, 240, 0.5);
  border-color: rgba(125, 60, 88, 0.2);
  color: var(--text-primary);
}

[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder {
  color: rgba(74, 26, 46, 0.35);
}
