/* Регистрация и вход */
.registration-container, .login-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 20px;
}

.registration-card, .login-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #667eea;
  outline: none;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .half {
  flex: 1;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  background: #000;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-btn:hover {
  background: #333;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

/* Личный кабинет */
.cabinet-layout {
  display: flex;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.cabinet-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.cabinet-content {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 30px;
}

.profile-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.profile-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 24px;
  color: #333;
}

.stat-item span {
  font-size: 14px;
  color: #666;
}

.cabinet-menu {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.menu-item {
  display: block;
  padding: 14px;
  margin-bottom: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  transition: background 0.3s;
}

.menu-item:hover,
.menu-item.active {
  background: #f5f5f5;
}

.logout-btn {
  width: 100%;
  padding: 14px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 20px;
}

/* Посты */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.post-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.post-content {
  padding: 20px;
}

.post-actions {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .cabinet-layout {
    flex-direction: column;
  }
  
  .cabinet-sidebar {
    width: 100%;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* Уведомления */
.success-message {
  text-align: center;
  padding: 40px;
}

.success-icon {
  font-size: 60px;
  color: #28a745;
  margin-bottom: 20px;
}

.loader {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}