@tailwind base;
@tailwind components;
@tailwind utilities;

/* Fontes e tipografia */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

@layer base {
  html {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  body {
    @apply bg-white text-gray-800;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
  }
  
  h1, h2, h3, h4, h5, h6 {
    @apply font-semibold tracking-tight;
  }
  
  a {
    @apply text-blue-600 hover:text-blue-800 transition-colors;
    text-decoration: none;
  }
  
  button, input, select, textarea {
    font-family: inherit;
  }
}

/* Utilitários */
@layer utilities {
  .line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .flex-center {
    @apply flex items-center justify-center;
  }
  
  .absolute-center {
    @apply absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2;
  }
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

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

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
  animation: spin 1.5s linear infinite;
}

.animate-slideIn {
  animation: slideIn 0.3s ease-out forwards;
}

.animate-slideUp {
  animation: slideUp 0.4s ease-out forwards;
}

/* Cores e variáveis */
:root {
  --color-primary: 252, 211, 77; /* yellow-400 */
  --color-primary-dark: 245, 158, 11; /* yellow-500 */
  --color-secondary: 59, 130, 246; /* blue-500 */
  --color-text: 31, 41, 55; /* gray-800 */
  --color-text-light: 107, 114, 128; /* gray-500 */
  --color-background: 255, 255, 255;
  --color-background-alt: 249, 250, 251; /* gray-50 */
  --color-border: 229, 231, 235; /* gray-200 */
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --border-radius-sm: 0.125rem;
  --border-radius: 0.25rem;
  --border-radius-md: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-radius-xl: 0.75rem;
  --border-radius-2xl: 1rem;
  --border-radius-full: 9999px;
}

/* Layout principal */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.app-header {
  background-color: white;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgb(var(--color-border));
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.app-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.app-sidebar {
  background-color: white;
  border-right: 1px solid rgb(var(--color-border));
  width: 280px;
  overflow-y: auto;
  transition: all 0.3s ease;
  height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
  z-index: 5;
}

.app-sidebar-collapsed {
  width: 0;
  overflow: hidden;
}

.app-content {
  flex: 1;
  background-color: rgb(var(--color-background-alt));
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: calc(100vh - 64px);
}

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

::-webkit-scrollbar-track {
  background: rgb(var(--color-background-alt));
  border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--color-text-light), 0.3);
  border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--color-text-light), 0.5);
}

/* Estilos para o player de vídeo */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* Proporção 16:9 */
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  background-color: black;
  box-shadow: var(--shadow-md);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-container .relative {
  position: relative;
  width: 100%;
  height: 100%;
  padding-bottom: 0 !important;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  background-color: rgb(var(--color-background-alt));
  border-radius: var(--border-radius-lg);
}

.video-placeholder-icon {
  width: 4rem;
  height: 4rem;
  color: rgb(var(--color-text-light));
  margin-bottom: 1.5rem;
}

.video-placeholder-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: rgb(var(--color-text));
  margin-bottom: 1rem;
}

.video-placeholder-text {
  color: rgb(var(--color-text-light));
  max-width: 24rem;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.5;
}

/* Estilos para o modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.modal-content {
  width: 100%;
  max-width: 64rem;
  max-height: 90vh;
  overflow: hidden;
  background-color: white;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-xl);
  animation: fadeIn 0.3s ease-out forwards;
}

/* Componentes */
.btn {
  @apply inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 transition-all duration-200;
}

.btn-primary {
  @apply bg-yellow-400 text-gray-800 hover:bg-yellow-500 focus:ring-yellow-500;
}

.btn-secondary {
  @apply bg-white text-gray-700 border-gray-300 hover:bg-gray-50 focus:ring-blue-500;
}

.btn-lg {
  @apply px-6 py-3 text-base;
}

.card {
  @apply bg-white rounded-lg shadow-md overflow-hidden;
}

.card-hover {
  @apply transition-shadow duration-200 hover:shadow-lg;
}

/* Responsividade */
@media (max-width: 768px) {
  .app-header {
    padding: 1rem;
  }
  
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    height: calc(100vh - 64px);
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .app-sidebar.open {
    transform: translateX(0);
  }
  
  .video-container {
    padding-bottom: 75%; /* Proporção mais quadrada para mobile */
  }
}

@media (max-width: 640px) {
  .app-header {
    padding: 0.75rem;
  }
  
  .video-placeholder-title {
    font-size: 1.25rem;
  }
  
  .video-placeholder-text {
    font-size: 0.875rem;
  }
}

/* Utilitários adicionais */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient-yellow {
  background: linear-gradient(to right, rgb(var(--color-primary)), rgb(var(--color-primary-dark)));
}

.bg-gradient-blue {
  background: linear-gradient(to right, #60a5fa, #3b82f6);
}

.shadow-inner-lg {
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.backdrop-blur {
  backdrop-filter: blur(8px);
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
} 