/* Profilom oldal stílusai */
.profile-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 24px;
  align-items: stretch;
}

@media (max-width: 920px) {
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.form-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.form-section {
  margin-bottom: 24px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section h3 {
  color: var(--text);
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

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

.form-group label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

/* Modern input mezők */
.modern-input,
.modern-select {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  height: 48px;
  box-sizing: border-box;
}

.modern-input:focus,
.modern-select:focus {
  outline: none;
  border-color: var(--brand1);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(124, 199, 255, 0.1);
}

.modern-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Compact select */
.modern-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23a9b8d6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 40px;
}

/* Age selector - kompakt, mint dátumválasztó */
.age-selector {
  display: flex;
  flex-direction: column;
  position: relative;
}

.age-display {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.age-display:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.age-display::after {
  content: "▼";
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.age-selector.open .age-display::after {
  transform: rotate(180deg);
}

.age-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(20, 25, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px;
  z-index: 100;
  backdrop-filter: blur(20px);
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.age-selector.open .age-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.age-option {
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.age-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.age-option.selected {
  background: linear-gradient(135deg, var(--brand2), var(--brand1));
  color: #0a0d1e;
  border-color: transparent;
  font-weight: 600;
}

/* Mood tags - kompakt grid görgetéssel */
.mood-tags-container {
  max-height: 120px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mood-tags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  padding: 12px;
  max-height: 96px;
  overflow-y: auto;
}

.mood-tag {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mood-tag:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.mood-tag.selected {
  background: linear-gradient(135deg, var(--brand2), var(--brand1));
  color: #0a0d1e;
  border-color: transparent;
  font-weight: 600;
}

/* Textarea */
textarea.modern-input {
  height: auto;
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* Character counter */
.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.char-count.warning {
  color: var(--danger);
}

/* Form actions */
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.save-btn {
  min-width: 120px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
}

.form-message {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.form-message.success {
  color: var(--ok);
}

.form-message.error {
  color: var(--danger);
}

/* Preview styles */
.preview-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 4px;
}

.pv-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pv-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.pv-row.full {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.pv-label {
  font-weight: 600;
  color: var(--text);
  min-width: 80px;
  font-size: 14px;
  flex-shrink: 0;
}

.pv-row.full .pv-label {
  min-width: auto;
}

.pv-value {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
  word-break: break-word;
}

.pv-row.full .pv-value {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 44px;
}

.helper {
  display: block;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar styling */
.age-options::-webkit-scrollbar,
.mood-tags::-webkit-scrollbar,
.preview-content::-webkit-scrollbar {
  width: 6px;
}

.age-options::-webkit-scrollbar-track,
.mood-tags::-webkit-scrollbar-track,
.preview-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.age-options::-webkit-scrollbar-thumb,
.mood-tags::-webkit-scrollbar-thumb,
.preview-content::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.age-options::-webkit-scrollbar-thumb:hover,
.mood-tags::-webkit-scrollbar-thumb:hover,
.preview-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

/* Reszponzív design */
@media (max-width: 768px) {
  .card {
    padding: 20px;
    min-height: auto;
  }
  
  .grid2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .save-btn {
    width: 100%;
  }
  
  .pv-row {
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
  }
  
  .pv-label {
    min-width: auto;
  }
  
  .age-selector.open .age-options {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .mood-tags {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 16px;
  }
  
  .age-selector.open .age-options {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mood-tag {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .modern-input,
  .modern-select,
  .age-display {
    padding: 10px 12px;
    height: 44px;
  }
  
  textarea.modern-input {
    min-height: 80px;
  }
}