/* Modern Components - Additional Styling for Poetry App */

/* Page containers */
.page-container {
  min-height: 100vh;
  padding: 2rem 0;
}

/* Poem grid layout */
.poems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .poems-grid {
    grid-template-columns: 1fr;
  }
}

/* Individual poem card */
.poem-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 251, 0.9));
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 4px 16px rgba(45, 55, 72, 0.12);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.poem-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.poem-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(45, 55, 72, 0.15);
  border-color: rgba(102, 126, 234, 0.2);
}

.poem-item:hover::before {
  transform: translateX(0);
}

/* Poem header */
.poem-header {
  margin-bottom: 1rem;
}

.poem-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #2D3748;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.poem-title a {
  color: #2D3748;
  text-decoration: none;
  transition: color 0.3s ease;
}

.poem-title a:hover {
  color: #667EEA;
}

.poem-author {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 0.5rem;
}

.poem-author a {
  color: #667EEA;
  text-decoration: none;
  font-weight: 600;
}

.poem-author a:hover {
  color: #5568D3;
}

/* Poem content preview */
.poem-preview {
  color: #4A5568;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 1rem 0;
  flex-grow: 1;
  position: relative;
  max-height: 120px;
  overflow: hidden;
  font-style: italic;
}

.poem-preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(transparent, rgba(248, 250, 251, 0.9));
}

/* Poem meta information */
.poem-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(102, 126, 234, 0.1);
  font-size: 0.85rem;
  color: #718096;
}

.poem-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.poem-date i {
  color: #667EEA;
}

.poem-stats {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.poem-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.3s ease;
  cursor: default;
}

.poem-stat i {
  color: #667EEA;
}

.poem-stat:hover {
  color: #667EEA;
}

/* Tags */
.poem-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-modern {
  display: inline-block;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(246, 135, 179, 0.1));
  color: #667EEA;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: all 0.2s ease;
  text-decoration: none;
}

.tag-modern:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(246, 135, 179, 0.2));
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

/* Category card */
.category-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 251, 0.9));
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(45, 55, 72, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(45, 55, 72, 0.15);
  border-color: rgba(102, 126, 234, 0.2);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.category-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2D3748;
  margin-bottom: 0.5rem;
}

.category-count {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.category-card:hover .category-name {
  color: #667EEA;
}

/* Form elements */
.form-group-modern {
  margin-bottom: 1.5rem;
}

.form-group-modern label {
  font-weight: 600;
  color: #2D3748;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control-modern,
.form-select-modern {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: #2D3748;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(45, 55, 72, 0.08);
}

.form-control-modern:focus,
.form-select-modern:focus {
  background: rgba(255, 255, 255, 0.98);
  border-color: #667EEA;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
  outline: none;
}

.form-control-modern::placeholder {
  color: #A0AEC0;
}

.form-text {
  color: #718096;
  font-size: 0.85rem;
}

/* Textarea */
textarea.form-control-modern {
  resize: vertical;
  min-height: 120px;
}

/* Alerts */
.alert-modern {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(248, 250, 251, 0.8));
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: #2D3748;
  box-shadow: 0 2px 8px rgba(45, 55, 72, 0.08);
}

.alert-modern.alert-success {
  background: linear-gradient(135deg, rgba(72, 182, 196, 0.08), rgba(248, 250, 251, 0.8));
  border-color: rgba(72, 182, 196, 0.2);
  color: #27726B;
}

.alert-modern.alert-danger {
  background: linear-gradient(135deg, rgba(247, 142, 138, 0.08), rgba(248, 250, 251, 0.8));
  border-color: rgba(247, 142, 138, 0.2);
  color: #742A2A;
}

.alert-modern.alert-warning {
  background: linear-gradient(135deg, rgba(237, 137, 54, 0.08), rgba(248, 250, 251, 0.8));
  border-color: rgba(237, 137, 54, 0.2);
  color: #744210;
}

/* User profile card */
.profile-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 251, 0.9));
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(45, 55, 72, 0.12);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2D3748;
  margin-bottom: 0.5rem;
}

.profile-bio {
  color: #718096;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Action buttons */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-action:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-action-primary {
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-action-primary:hover {
  background: linear-gradient(135deg, #5568D3 0%, #6D3A94 100%);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  color: white;
}

.btn-action-secondary {
  background: linear-gradient(135deg, #E8EEF7 0%, #DDE5F0 100%);
  color: #667EEA;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.btn-action-secondary:hover {
  background: linear-gradient(135deg, #DDE5F0 0%, #D0D8EC 100%);
  color: #667EEA;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  font-size: 3rem;
  color: rgba(102, 126, 234, 0.3);
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2D3748;
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: #718096;
  margin-bottom: 2rem;
}

/* Loading state */
.skeleton {
  background: linear-gradient(90deg, #E8EEF7 0%, #F0F4F9 50%, #E8EEF7 100%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 10px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Responsive typography */
@media (max-width: 768px) {
  .poem-title {
    font-size: 1.1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .profile-card {
    padding: 1.5rem;
  }
}

/* Print styles */
@media print {
  .navbar-modern,
  .footer-modern,
  .btn-action {
    display: none;
  }
}
