/* SevoSports - Glassmorphism Design System (Vanilla CSS) */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-main: #020617;
  --bg-sidebar: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-main: rgba(255, 255, 255, 0.1);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-foreground: #ffffff;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-focus-shadow: rgba(59, 130, 246, 0.2);
  --bg-subtle: rgba(255, 255, 255, 0.05);
}

.light-theme {
  --bg-main: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-main: rgba(0, 0, 0, 0.1);
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-foreground: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.1);
  --input-bg: rgba(0, 0, 0, 0.05);
  --input-focus-shadow: rgba(37, 99, 235, 0.15);
  --bg-subtle: rgba(0, 0, 0, 0.03);
}


.dark-theme {
  --bg-main: #020617;
  --bg-sidebar: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-main: rgba(255, 255, 255, 0.1);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-foreground: #ffffff;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-focus-shadow: rgba(59, 130, 246, 0.2);
  --bg-subtle: rgba(255, 255, 255, 0.05);
}

/* Reset Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.light-theme ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

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

/* Form Elements */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--input-focus-shadow);
  background: var(--bg-card);
}

input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.02);
}

option {
  background-color: var(--bg-card);
  color: var(--text-main);
}


body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.1) 0px, transparent 50%);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
}

.text-muted {
  color: var(--text-muted);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Desktop nav - show by default */
.nav-desktop { display: flex; }
.nav-mobile-header { display: none !important; }
.nav-text { display: inline; }
.logo-text { display: inline; }

@media (max-width: 1024px) {
  .container {
    padding: 0 0.75rem;
  }
  
  /* Desktop nav hidden, mobile nav visible */
  .nav-desktop { display: none !important; }
  .nav-mobile-header { display: flex !important; }
  .nav-text { display: none !important; }
  
  /* Logo text smaller on mobile */
  .logo-text { 
    display: inline !important; 
    font-size: 0.75rem !important;
    max-width: 90px;
    white-space: normal;
    overflow: visible;
  }
}

/* UI Components */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.1);
}

/* Icons Replacement (Simples) */
.icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Utilities */
.grid { display: grid; gap: 1rem; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

.flex { display: flex; align-items: center; gap: 1rem; }
.flex-col { flex-direction: column; align-items: stretch; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* Responsive Utilities */
@media (max-width: 1024px) {
  .container {
    padding: 0 0.5rem !important;
  }
  
  /* Typography scaled for mobile */
  html {
    font-size: 14px;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
  p, span, a { font-size: 0.9rem; }
  
  /* Icon-only buttons on mobile */
  .btn {
    padding: 0.4rem 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
  }
  
  .btn i[data-lucide] {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
  }
  
  .btn .hide-mobile {
    display: none !important;
  }
  
  .btn::after {
    display: none;
  }
  
  /* Text links in mobile */
  a[href*="/forum"] {
    font-size: 0.85rem;
  }
  
  .hide-mobile {
    display: none !important;
  }
  
  /* Input scaling */
  input, select, textarea {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
  
  /* Card padding reduction */
  .card, .glass-panel {
    padding: 0.75rem;
  }
}

/* Custom Tooltip (Floating Word) */
[title] {
  position: relative;
}

@media (min-width: 1024px) {
  [title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
  }
  
  [title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    pointer-events: none;
  }
}

@media (max-width: 1024px) {
  .grid-cols-4, .grid-cols-3, .grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  .flex {
    gap: 0.75rem !important;
  }
  
  .flex-responsive {
    flex-direction: column;
    align-items: stretch;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  aside.sidebar-desktop {
    display: none !important;
  }
  
  .main-content-mobile {
    width: 100% !important;
  }
  
  .header-responsive {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
  }

  /* Modals adapt */
  .glass-panel[style*="width: 900px"],
  .glass-panel[style*="width: 450px"],
  .glass-panel[style*="width: 400px"] {
    width: 95vw !important;
    padding: 1.5rem !important;
  }

  /* Grid span fixes */
  [style*="grid-column: span 2"],
  [style*="grid-column: span 3"],
  [style*="grid-column: span 4"] {
    grid-column: span 1 !important;
  }
}

/* Dashboard Widgets */
.stat-card {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* Navigation */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--border-main);
    color: var(--text-main);
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.nav-item i {
    width: 1.25rem;
    height: 1.25rem;
}

/* Forum Content and Blockquotes */
blockquote {
  margin: 0 0 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 0.5rem;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

/* Identação da resposta após a citação */
blockquote + br + br, 
blockquote + br,
blockquote ~ p,
blockquote ~ div {
  margin-left: 2rem;
  padding-left: 1rem;
  border-left: 1px dashed var(--glass-border);
}

blockquote strong {
  font-style: normal;
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.forum-img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  display: block;
  margin: 1.5rem auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
}

.forum-content img,
.glass-panel img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(20px);
  backdrop-filter: blur(8px);
}

/* Desktop larger size */
@media (min-width: 1024px) {
  .back-to-top {
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
  }
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}
