* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #3b82f6;
  --primary-purple: #8b5cf6;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --success: #10b981;
  --error: #ef4444;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(30, 41, 59, 0.5);
  --glass-border: rgba(255, 255, 255, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background Effects */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 8s ease-in-out infinite;
}

.bg-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  top: 25%;
  left: 25%;
  animation-delay: 0s;
}

.bg-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
  bottom: 25%;
  right: 25%;
  animation-delay: 4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) scale(1.1);
    opacity: 1;
  }
}

/* Container */
.container {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  animation: slideInDown 0.8s ease-out;
}

.header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
  border-radius: 20px;
  margin-bottom: 1rem;
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.header-icon i {
  font-size: 2rem;
  color: white;
}

.main-title {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #60a5fa);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  animation: gradientShift 3s ease-in-out infinite;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Main Content */
.main-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Info Cards */
.info-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInUp 0.8s ease-out;
  animation-fill-mode: both;
}

.info-card[data-delay="0.1"] {
  animation-delay: 0.1s;
}
.info-card[data-delay="0.2"] {
  animation-delay: 0.2s;
}

.info-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.card-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--glass-bg), rgba(51, 65, 85, 0.3));
  opacity: 0;
  transition: opacity 0.5s ease;
}

.info-card:hover .card-background {
  opacity: 1;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
}

.card-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  background: var(--glass-bg);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.card-icon i {
  font-size: 1.25rem;
  color: white;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.card-badge {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Info Section */
.info-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-item:hover {
  background: rgba(51, 65, 85, 0.7);
  transform: translateX(4px);
}

.info-details {
  flex: 1;
}

.info-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.info-value {
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(10px);
}

.info-item:hover .copy-btn {
  opacity: 1;
  transform: translateX(0);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: scale(1.1);
}

.copy-btn.copied {
  color: var(--success);
}

/* Extra Info */
.extra-info {
  padding: 0.75rem 1rem;
  background: rgba(51, 65, 85, 0.3);
  border-radius: 8px;
  animation: slideInUp 0.3s ease;
}

.extra-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.extra-item i {
  color: var(--text-muted);
  width: 16px;
}

/* Refresh Section */
.refresh-section {
  text-align: center;
  margin-bottom: 2rem;
  animation: slideInUp 0.8s ease-out 0.4s both;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.refresh-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
}

.refresh-btn:active {
  transform: translateY(0) scale(0.98);
}

.refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.refresh-btn i {
  transition: transform 0.3s ease;
}

.refresh-btn.loading i {
  animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
  text-align: center;
  margin-top: auto;
  color: var(--text-muted);
  animation: slideInUp 0.8s ease-out 0.6s both;
}

.heart {
  color: #ef4444;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--success);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  text-align: center;
  color: var(--text-primary);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-top: 3px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

/* Animations */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Sad IPv6 Styles */
.info-card.sad-ipv6 {
  border: 2px dashed rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(168, 85, 247, 0.1));
}

.info-card.sad-ipv6 .card-background {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(168, 85, 247, 0.1));
  opacity: 1;
}

.info-card.sad-ipv6 .card-icon {
  background: linear-gradient(135deg, #ef4444, #f97316);
  animation: sadPulse 2s ease-in-out infinite;
}

.info-card.sad-ipv6 .info-value {
  color: #fbbf24;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  text-align: center;
  padding: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border: 1px dashed rgba(239, 68, 68, 0.3);
}

@keyframes sadPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.5);
  }
}

/* IPv6 Education Styles */
.ipv6-education {
  margin-top: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  animation: slideInUp 0.5s ease;
}

.education-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.education-icon {
  font-size: 2rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.education-text {
  flex: 1;
}

.education-text h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.education-text ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.education-text li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.education-tip {
  background: rgba(59, 130, 246, 0.1);
  padding: 0.75rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary-blue);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.education-tip strong {
  color: var(--primary-blue);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .main-title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .main-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-content {
    padding: 1.5rem;
  }

  .info-value {
    font-size: 0.875rem;
  }

  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .info-card {
    min-width: unset;
  }

  .card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .card-badge {
    order: -1;
    width: fit-content;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
.copy-btn:focus,
.refresh-btn:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Responsive adjustments for education */
@media (max-width: 768px) {
  .education-content {
    flex-direction: column;
    text-align: center;
  }

  .education-icon {
    align-self: center;
  }
}
/* Estilos para loading individual dos cards */
.card-loading {
  position: relative;
  pointer-events: none;
}

.card-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  border-radius: 20px;
  z-index: 10;
}

.card-loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  text-align: center;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.loading-spinner-small {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-top: 2px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.card-loading-indicator span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Estilos para diferentes tipos de toast */
.toast.info {
  background: var(--primary-blue);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.toast.warning {
  background: #f59e0b;
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3);
}

.toast.error {
  background: var(--error);
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

/* Estilo para cards com erro */
.error-card {
  border: 2px solid rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(15, 23, 42, 0.5));
}

.error-card .card-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
