/* INTIMITY - CSS STYLES */
/* Design moderno e responsivo para casais */

/* Importar fonte Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Variáveis CSS - Cores do Sistema */
:root {
  /* Cores Principais */
  --primary: #8B1538;           /* Bordô/Vinho Escuro */
  --secondary: #E8A598;         /* Rosa Dourado */
  --accent: #D4B996;            /* Dourado Suave */
  --cream: #F5F1EB;             /* Creme */
  --dark: #2C2C2C;              /* Cinza Carvão */
  
  /* Variações das Cores */
  --primary-light: #A61E47;
  --primary-dark: #6B102B;
  --secondary-light: #F0B5A8;
  --accent-light: #DFC5A6;
  --cream-dark: #EDE7DF;
  
  /* Cores de Estado */
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
  --gradient-romantic: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  
  /* Sombras */
  --shadow-light: 0 2px 10px rgba(139, 21, 56, 0.1);
  --shadow-medium: 0 4px 20px rgba(139, 21, 56, 0.15);
  --shadow-heavy: 0 8px 40px rgba(139, 21, 56, 0.2);
  
  /* Fonte */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Espaçamentos */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--cream);
  color: var(--dark);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--cream-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Layout Principal */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar - Menu Vertical */
.sidebar {
  width: 280px;
  background: var(--gradient-primary);
  color: white;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar-header {
  padding: var(--spacing-lg);
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, white, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-header p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.sidebar-nav {
  padding: var(--spacing-md) 0;
}

.nav-section {
  margin-bottom: var(--spacing-lg);
}

.nav-title {
  padding: 0 var(--spacing-lg);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.7;
  margin-bottom: var(--spacing-sm);
  letter-spacing: 1px;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--accent);
}

.nav-icon {
  width: 20px;
  height: 20px;
  margin-right: var(--spacing-sm);
  font-size: 1.2rem;
}

.nav-text {
  font-weight: 500;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  transition: all 0.3s ease;
}

.sidebar.collapsed + .main-content {
  margin-left: 70px;
}

/* Header */
.header {
  background: white;
  padding: var(--spacing-md) var(--spacing-lg);
  box-shadow: var(--shadow-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
  margin-right: var(--spacing-md);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background: var(--cream-dark);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.user-details h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}

.user-details p {
  font-size: 0.8rem;
  color: var(--primary);
}

/* Page Content */
.page-content {
  padding: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-light);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--cream-dark);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--dark);
  opacity: 0.7;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
}

.btn-accent {
  background: var(--accent);
  color: var(--dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.btn-ghost:hover {
  background: rgba(139, 21, 56, 0.1);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Gamification Elements */
.points-display {
  background: var(--gradient-romantic);
  color: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  text-align: center;
}

.points-number {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.points-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.ranking-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

.player-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.player-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.player-details h4 {
  font-weight: 600;
  color: var(--dark);
}

.player-details p {
  font-size: 0.85rem;
  color: var(--primary);
}

.player-points {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: rgba(139, 21, 56, 0.1);
  color: var(--primary);
}

.badge-secondary {
  background: rgba(232, 165, 152, 0.2);
  color: var(--secondary);
}

.badge-success {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success);
}

/* Game Cards */
.game-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.game-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary);
}

.game-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.game-description {
  font-size: 0.9rem;
  color: var(--dark);
  opacity: 0.8;
  margin-bottom: var(--spacing-md);
}

.game-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.game-stat {
  text-align: center;
}

.game-stat-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.game-stat-label {
  font-size: 0.75rem;
  color: var(--dark);
  opacity: 0.7;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-heavy);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
  opacity: 0.7;
}

.modal-close:hover {
  opacity: 1;
}

/* Alerts */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
  border-left: 4px solid;
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-warning {
  background: rgba(255, 193, 7, 0.1);
  border-color: var(--warning);
  color: #856404;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.alert-info {
  background: rgba(23, 162, 184, 0.1);
  border-color: var(--info);
  color: var(--info);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

.slide-in {
  animation: slideIn 0.3s ease;
}

.pulse {
  animation: pulse 2s infinite;
}

/* Loading States */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(139, 21, 56, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .page-content {
    padding: var(--spacing-md);
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .header {
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .user-details {
    display: none;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.25rem;
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .points-number {
    font-size: 2rem;
  }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
  .theme-auto {
    --cream: #1a1a1a;
    --cream-dark: #2d2d2d;
    --dark: #e0e0e0;
  }
  
  .theme-auto .card {
    background: #2d2d2d;
    border: 1px solid #404040;
  }
  
  .theme-auto .header {
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
  }
  
  .theme-auto .form-input,
  .theme-auto .form-select,
  .theme-auto .form-textarea {
    background: #404040;
    border-color: #555;
    color: #e0e0e0;
  }
}

/* Print Styles */
@media print {
  .sidebar,
  .header,
  .btn,
  .modal-overlay {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}