/* Global Styles Enhancement */

/* Improved Buttons - Rounded with proper styling */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px !important; /* More rounded */
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-primary {
  background: #0f0f0f;
  color: #fff;
}

.button-primary:hover:not(:disabled) {
  background: #333;
}

.button-secondary {
  border: 1px solid #d3d3d3;
  background: #fff;
  color: #0f0f0f;
}

.button-secondary:hover:not(:disabled) {
  background: #f2f2f2;
  border-color: #c3c3c3;
}

/* Toolbar improvements */
.topbar {
  background: #fff;
}

.create-button {
  background: #f2f2f2 !important;
  border-radius: 20px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 550 !important;
}

.create-button:hover {
  background: #e5e5e5 !important;
}

.profile-button {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #f2f2f2 !important;
}

.profile-button:hover {
  background: #e5e5e5 !important;
}

/* Icon buttons with rounded background */
.icon-button {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f2;
  color: #0f0f0f;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.icon-button:hover {
  background: #e5e5e5;
  color: #333;
}

/* Messages with rounded corners and grey background */
.message,
.toast {
  padding: 12px 18px;
  border-radius: 20px !important; /* More rounded */
  background: #484848;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(20px);
}

.message {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.message-error {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #991b1b !important;
}

.message-success {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
}

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

/* Form inputs with better styling */
.text-field,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  padding: 12px 14px;
  border: 1px solid #d3d3d3;
  border-radius: 8px !important;
  background: #fff;
  color: #0f0f0f;
  font-size: 13px;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 100%;
}

.text-field:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
  outline: none;
}

/* Card improvements */
.video-card,
.creator-card,
.suggestion-card {
  transition: all 0.2s ease;
}

.video-card:hover,
.creator-card:hover,
.suggestion-card:hover {
  transform: translateY(-2px);
}

/* Sidebar improvements */
.sidebar {
  background: #fff;
  border-right: 1px solid #e5e5e5;
}

.nav-link {
  border-radius: 12px !important;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: #f8f8f8 !important;
}

.nav-link.is-active {
  background: #f2f2f2 !important;
}

/* Page backgrounds */
body {
  background: #f8f8f8;
}

.page-content,
.main-layout {
  background: #f8f8f8;
}

/* Section headers with icons */
.feed-heading h1,
.feed-heading h2,
.suggestions-header h3,
.comments-header h3,
.auth-form-header h2 {
  font-weight: 650;
}

/* Category chips with icons and rounded style */
.category-chip {
  border-radius: 20px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.category-chip .icon,
.category-chip i {
  width: 16px !important;
  height: 16px !important;
}

/* Action buttons with icons */
.player-action,
.video-action-button,
.comment-action,
.comment-action-sm {
  border-radius: 16px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  font-weight: 550 !important;
  transition: all 0.2s ease;
}

.player-action:hover,
.video-action-button:hover,
.comment-action:hover,
.comment-action-sm:hover {
  background: #e5e5e5 !important;
}

/* Player styling */
.player-layout {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.player-screen-wrap {
  background: #0f0f0f;
}

.player-info {
  padding: 24px;
}

.player-info h2 {
  font-size: 20px !important;
  font-weight: 650 !important;
}

/* Comment section styling */
.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid #e5e5e5;
}

.comment-item:last-child {
  border-bottom: 0;
}

.comment-avatar {
  border-radius: 50%;
}

.comment-author {
  font-weight: 600;
}

/* Upload dialog styling */
.upload-dialog,
.app-dialog {
  border-radius: 20px !important;
  max-width: 500px !important;
}

.dialog-topline {
  border-bottom: 1px solid #e5e5e5;
}

/* Modal styling */
.modal-content {
  border-radius: 20px !important;
  max-width: 400px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

/* Responsive improvements */
@media (max-width: 760px) {
  .button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }
  
  .category-chip {
    padding: 0 10px !important;
    font-size: 12px !important;
  }
  
  .nav-link {
    padding: 0 8px !important;
  }
}

/* Selection styling */
::selection {
  background: #1a73e8;
  color: white;
}

/* Focus visible for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

/* Loading spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #f2f2f2;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Smooth transitions */
* {
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* Box shadow for cards */
.video-card,
.creator-card,
.suggestion-card,
.player-layout,
.upload-form-container,
.auth-form-container {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Hover shadow effect */
.video-card:hover,
.creator-card:hover,
.suggestion-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
