/**
 * Sun Team - Page-Specific Style Fixes
 * 各页面样式问题修复
 */

/* ========================================
   About Page Fixes
   ======================================== */

/* Ability table horizontal scroll */
.about-page .ability-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.about-page .ability-table th,
.about-page .ability-table td {
  white-space: nowrap;
  padding: 10px 8px;
}

/* Relationship table mobile */
@media (max-width: 768px) {
  .about-page .relationship-table {
    font-size: 11px;
  }
  
  .about-page .relationship-table th,
  .about-page .relationship-table td {
    padding: 8px 4px;
  }
  
  .about-page .relation-badge {
    font-size: 9px;
    padding: 2px 4px;
  }
  
  .about-page .relation-details {
    font-size: 8px;
  }
}

/* Shift items mobile */
@media (max-width: 768px) {
  .about-page .shift-item {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .about-page .shift-info {
    text-align: center;
  }
  
  .about-page .shift-change {
    align-self: center;
  }
}

/* ========================================
   Pricing Page Fixes
   ======================================== */

/* Pricing grid responsive */
@media (max-width: 900px) {
  .pricing-page .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Pricing card button alignment */
.pricing-page .pricing-card {
  display: flex;
  flex-direction: column;
}

.pricing-page .pricing-features {
  flex-grow: 1;
}

/* FAQ grid mobile */
@media (max-width: 768px) {
  .pricing-page .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .pricing-page .faq-item {
    padding: 16px;
  }
}

/* ========================================
   Skills Page Fixes
   ======================================== */

/* Agents grid responsive */
@media (max-width: 900px) {
  .skills-page .agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .skills-page .agents-grid {
    grid-template-columns: 1fr;
  }
}

/* Agent card hover effect consistency */
.skills-page .agent-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills-page .agent-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Contact Page Fixes
   ======================================== */

/* Contact container mobile */
@media (max-width: 768px) {
  .contact-page .contact-container {
    grid-template-columns: 1fr;
    padding: 32px 16px;
  }
  
  .contact-page .contact-info {
    order: 2;
  }
  
  .contact-page .contact-form-container {
    order: 1;
  }
  
  .contact-page .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .contact-page .contact-icon {
    margin: 0 auto;
  }
}

/* Form input focus states */
.contact-page .form-input:focus,
.contact-page .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

/* ========================================
   Vault Page Fixes
   ======================================== */

/* Pricing grid consistency */
.vault-page .pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .vault-page .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* FAQ tabs mobile */
@media (max-width: 768px) {
  .vault-page .faq-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .vault-page .faq-tab {
    padding: 8px 14px;
    font-size: 12px;
  }
}

/* Comparison table mobile */
@media (max-width: 768px) {
  .vault-page .comparison-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .vault-page .comparison-table th,
  .vault-page .comparison-table td {
    padding: 12px 8px;
    font-size: 12px;
  }
}

/* Modal mobile */
@media (max-width: 768px) {
  .vault-page .modal {
    margin: 16px;
    padding: 24px 16px;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* ========================================
   Office Page Fixes
   ======================================== */

/* Pulse grid mobile */
@media (max-width: 640px) {
  .office-page .pulse-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .office-page .pulse-value {
    font-size: 24px;
  }
}

/* Two column layout mobile */
@media (max-width: 1024px) {
  .office-page .two-col {
    grid-template-columns: 1fr;
  }
}

/* Agent cards grid */
@media (max-width: 640px) {
  .office-page .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   Stage Page Fixes
   ======================================== */

/* Main layout mobile */
@media (max-width: 1024px) {
  .stage-page main {
    grid-template-columns: 1fr;
  }
  
  .stage-page .sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
  }
  
  .stage-page .welcome-card {
    grid-column: 1 / -1;
  }
}

/* Dashboard grid mobile */
@media (max-width: 1024px) {
  .stage-page .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stage-page .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Matrix grid mobile */
@media (max-width: 768px) {
  .stage-page .matrix-container {
    padding: 12px;
  }
  
  .stage-page .matrix-cell {
    font-size: 9px;
  }
}

/* Feed list mobile */
@media (max-width: 768px) {
  .stage-page .feed-item {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .stage-page .feed-content {
    width: 100%;
    margin-top: 6px;
  }
}

/* Task filters mobile */
@media (max-width: 480px) {
  .stage-page .tasks-filters {
    flex-wrap: wrap;
  }
  
  .stage-page .task-filter {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* Stage controls mobile */
@media (max-width: 768px) {
  .stage-page .stage-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stage-page .stage-btn span:last-child {
    display: none;
  }
}

/* ========================================
   Index/Home Page Fixes
   ======================================== */

/* Hero section mobile */
@media (max-width: 768px) {
  .home-page .hero {
    padding: 60px 16px !important;
  }
  
  .home-page .hero h1 {
    font-size: 2rem !important;
  }
  
  /* Live agents grid */
  .home-page #hero-agents-grid {
    gap: 6px !important;
  }
  
  .home-page .agent-chip {
    padding: 8px 10px !important;
    font-size: 11px !important;
  }
  
  .home-page .agent-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
  }
}

/* Features grid mobile */
@media (max-width: 768px) {
  .home-page .features {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-top: 40px !important;
  }
}

/* Stats bar mobile */
@media (max-width: 768px) {
  .home-page .stats-bar {
    flex-direction: column !important;
    gap: 20px !important;
    padding: 24px !important;
  }
}

/* Reviews grid mobile */
@media (max-width: 900px) {
  .home-page .reviews-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  .home-page .reviews-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Services grid mobile */
@media (max-width: 768px) {
  .home-page .services-grid,
  .home-page .products-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Subscribe bar mobile */
@media (max-width: 768px) {
  .home-page .subscribe-bar {
    padding: 12px 16px !important;
  }
  
  .home-page .subscribe-bar-inner {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .home-page .subscribe-form {
    flex-direction: column !important;
    width: 100% !important;
  }
  
  .home-page .subscribe-input,
  .home-page .subscribe-btn {
    width: 100% !important;
  }
}

/* ========================================
   Common Fixes
   ======================================== */

/* Fix for empty content */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Loading state */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-dark-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-color);
}

/* Selection color */
::selection {
  background: rgba(255, 149, 0, 0.3);
  color: var(--text-dark);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

/* Smooth scroll for anchor links */
html {
  scroll-behavior: smooth;
}

/* Prevent text selection on interactive elements */
.btn,
.nav-toggle,
.menu-toggle,
.agent-card,
.pricing-card {
  user-select: none;
}
