/* 
 * enhanced_styles.css
 * Sistema: KokaKoin v3.0
 * Autor: Manus AI (baseado no design original de Lucieliton Mundim)
 * Data: Abril/2025
 *
 * Melhorias visuais para o sistema KokaKoin que respeitam a identidade visual
 * existente e implementam refinamentos de usabilidade e estética.
 */

/*=====================================
  MELHORIAS DE CONSISTÊNCIA VISUAL
=====================================*/

/* Sistema de sombras refinado */
:root {
    /* Sombras refinadas com níveis de elevação */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5), 0 4px 6px rgba(0, 0, 0, 0.6);
    --shadow-focus: 0 0 0 3px rgba(255, 215, 0, 0.4);
    
    /* Sombras com efeito dourado */
    --shadow-gold-sm: 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 3px rgba(255, 215, 0, 0.3);
    --shadow-gold-md: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 5px rgba(255, 215, 0, 0.4);
    --shadow-gold-lg: 0 8px 16px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 215, 0, 0.5);
    
    /* Transições refinadas */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Espaçamento consistente */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
  }
  
  /* Aplicação das sombras refinadas */
  .filter-section, 
  .strategy-section, 
  .results-section, 
  .specific-analysis-section,
  .bot-section,
  .enhanced-analysis-section {
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  }
  
  .filter-section:hover, 
  .strategy-section:hover, 
  .results-section:hover, 
  .specific-analysis-section:hover,
  .bot-section:hover,
  .enhanced-analysis-section:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold-md);
  }
  
  /* Refinamento de tipografia */
  body {
    font-feature-settings: "kern", "liga", "calt";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
  
  h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
  
  .filter-section h2, 
  .strategy-section h2, 
  .results-section h2, 
  .specific-analysis-section h2,
  .bot-section h2,
  .enhanced-analysis-section h2 {
    font-weight: 700;
    margin-bottom: var(--space-lg);
    position: relative;
    /* display: inline-block; */ /* Removido para permitir centralização correta com text-align */
    padding-bottom: var(--space-sm);
  }
  
  /* Adicionar linha decorativa sob os títulos */
  .filter-section h2::after, 
  .strategy-section h2::after, 
  .results-section h2::after, 
  .specific-analysis-section h2::after,
  .bot-section h2::after,
  .enhanced-analysis-section h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,215,0,0.1), rgba(255,215,0,1), rgba(255,215,0,0.1));
    border-radius: 3px;
  }
  
  /*=====================================
    MELHORIAS DE USABILIDADE
  =====================================*/
  
  /* Estados de foco aprimorados */
  button:focus,
  input:focus,
  select:focus,
  a:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
  }
  
  /* Feedback visual para interações */
  .strategy-btn, 
  .action-btn, 
  .feedback-btn, 
  .analyze-btn, 
  .info-btn {
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  }
  
  .strategy-btn:after, 
  .action-btn:after, 
  .feedback-btn:after, 
  .analyze-btn:after, 
  .info-btn:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
  }
  
  .strategy-btn:active:after, 
  .action-btn:active:after, 
  .feedback-btn:active:after, 
  .analyze-btn:active:after, 
  .info-btn:active:after {
    animation: ripple 0.6s ease-out;
  }
  
  @keyframes ripple {
    0% {
      transform: scale(0, 0);
      opacity: 0.5;
    }
    100% {
      transform: scale(20, 20);
      opacity: 0;
    }
  }
  
  /* Melhorias de contraste */
  .user-name {
    color: var(--primary-color) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  }
  
  .logout-btn {
    color: var(--primary-color) !important;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
    transition: all var(--transition-fast);
  }
  
  .logout-btn:hover {
    background-color: rgba(255, 215, 0, 0.2);
    color: white !important;
  }
  
  /*=====================================
    APRIMORAMENTOS ESTÉTICOS
  =====================================*/
  
  /* Efeitos de gradiente refinados */
  .strategy-btn, 
  .action-btn {
    background: linear-gradient(135deg, #ffd700, #e6b800, #ffd700);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
  }
  
  @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  /* Animações sutis */
  .logo {
    animation: float 6s ease-in-out infinite;
  }
  
  @keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
  }
  
  /* Tratamento de bordas */
  .filter-section, 
  .strategy-section, 
  .results-section, 
  .specific-analysis-section,
  .bot-section,
  .enhanced-analysis-section {
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
  }
  
  .filter-section::before, 
  .strategy-section::before, 
  .results-section::before, 
  .specific-analysis-section::before,
  .bot-section::before,
  .enhanced-analysis-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,215,0,0.5), rgba(255,215,0,0.1), rgba(255,215,0,0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
  }
  
  /* Efeito de brilho nos botões */
  .strategy-btn:hover, 
  .action-btn:hover {
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4), 0 0 10px rgba(255, 215, 0, 0.2);
  }
  
  /*=====================================
    MELHORIAS RESPONSIVAS
  =====================================*/
  
  /* Base responsiva aprimorada */
  @media (max-width: 768px) {
    :root {
      --space-lg: 1.25rem;
      --space-xl: 1.75rem;
    }
    
    .filter-section, 
    .strategy-section, 
    .results-section, 
    .specific-analysis-section,
    .bot-section,
    .enhanced-analysis-section {
      padding: var(--space-lg);
    }
    
    .filter-controls, 
    .strategy-controls, 
    .specific-analysis-controls {
      gap: var(--space-sm);
    }
  }
  
  /* Otimização para telas pequenas */
  @media (max-width: 480px) {
    .main-header h1 {
      font-size: 1.8rem;
    }
    
    .filter-section h2, 
    .strategy-section h2, 
    .results-section h2, 
    .specific-analysis-section h2,
    .bot-section h2,
    .enhanced-analysis-section h2 {
      font-size: 1.4rem;
    }
    
    .filter-controls, 
    .strategy-controls, 
    .specific-analysis-controls {
      grid-template-columns: 1fr;
    }
    
    .filter-controls select:nth-of-type(3),
    #intraday-interval-select {
      grid-column: 1;
    }
  }
  
  /* Adaptação para telas grandes */
  @media (min-width: 1200px) {
    .filter-section, 
    .strategy-section, 
    .results-section, 
    .specific-analysis-section,
    .bot-section,
    .enhanced-analysis-section {
      padding: var(--space-xxl);
    }
    
    .results-grid {
      grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
      gap: var(--space-xl);
    }
  }
  
  /*=====================================
    MELHORIAS DE ACESSIBILIDADE
  =====================================*/
  
  /* Melhor visibilidade de foco para acessibilidade */
  a:focus, button:focus, input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.5);
  }
  
  /* Melhorar contraste para texto */
  .log-message {
    color: #FFFFFF;
    background-color: rgba(33, 37, 41, 0.95);
  }
  
  /* Melhorar visibilidade de estados */
  .connection-indicator.connected {
    box-shadow: 0 0 8px #4CAF50;
  }
  
  .connection-indicator.disconnected {
    box-shadow: 0 0 8px #F44336;
  }
  
  /*=====================================
    EFEITOS VISUAIS SUTIS
  =====================================*/
  
  /* Efeito de brilho sutil nos cards */
  .result-card {
    position: relative;
    overflow: hidden;
  }
  
  .result-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
      to bottom right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0) 60%,
      rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: transform 1.5s ease;
    pointer-events: none;
  }
  
  .result-card:hover::after {
    transform: rotate(30deg) translate(0, 50%);
  }
  
  /* Efeito de destaque para campos de entrada */
  .filter-input:focus, 
  input[type="text"]:focus, 
  select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 1px var(--primary-color), 0 0 8px rgba(255, 215, 0, 0.6);
  }
  
  /* Melhorar a aparência dos placeholders */
  ::placeholder {
    color: rgba(255, 215, 0, 0.5);
    opacity: 0.7;
    transition: opacity var(--transition-fast);
  }
  
  input:focus::placeholder {
    opacity: 0.4;
  }
  
  /* Efeito de destaque para o cabeçalho */
  .main-header h1 {
    background: linear-gradient(to right, #f0e68c, #ffd700, #daa520);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s infinite;
    background-size: 200% auto;
  }
  
  @keyframes shimmer {
    0% { background-position: -100% center; }
    100% { background-position: 200% center; }
  }
  
  /* Melhorar a aparência do indicador de versão */
  body::after {
    content: "v3.0";
    position: fixed;
    right: 15px;
    bottom: 15px;
    background-color: rgba(15, 15, 15, 0.8);
    color: var(--primary-color);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 50;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  
  body::after:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--primary-color);
  }
  
  /* Melhorar a aparência do status do WebSocket */
  .websocket-status {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-medium);
  }
  
  .websocket-status:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  }
  
  /* Melhorar a aparência dos botões de exchange */
  .exchange-radios label {
    transition: all var(--transition-medium);
  }
  
  .exchange-radios label:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: var(--shadow-gold-sm);
  }
  
  .exchange-radios input[type="radio"]:checked + label {
    box-shadow: 0 0 10px var(--primary-color), inset 0 0 5px rgba(255, 215, 0, 0.8);
  }
  
  /* Melhorar a aparência do rodapé */
  .footer {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    padding: var(--space-md) 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-xl);
    width: 100%;
  }
  
  .footer p {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 var(--space-md);
  }
  