/* BarneyD Token Timelocks Dashboard Styles */
/* Erstellt: 2025-09-23 */

:root {
  --bg: #0b3f1a;
  --card: #102b1c;
  --brand: #aaff66;
  --brand-soft: #d7ffad;
  --accent: #8125b2;
  --text: #ffffff;
  --muted: #fff999;
  --shadow: 0 10px 24px rgba(0,0,0,0.25);
  --radius: 14px;
}

/* Base Styling */
* { 
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Prevent zoom on input focus for iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select, textarea, input[type="text"], input[type="password"],
  input[type="datetime"], input[type="datetime-local"],
  input[type="date"], input[type="month"], input[type="time"],
  input[type="week"], input[type="number"], input[type="email"],
  input[type="url"], input[type="search"], input[type="tel"],
  input[type="color"] {
    font-size: 16px;
  }
}

body {
  font-family: system-ui, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 120px 24px 24px 24px; /* Top-Padding für Navigation */
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(170, 255, 102, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(129, 37, 178, 0.03) 0%, transparent 50%);
}

/* Main Card Container */
.card {
  max-width: 1200px;
  margin: auto;
  background: var(--card);
  border: 1px solid rgba(170, 255, 102, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* Typography */
h1 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 2.2rem;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(170, 255, 102, 0.3);
}

.muted {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
  padding: 10px;
  background: rgba(170, 255, 102, 0.05);
  border: 1px solid rgba(170, 255, 102, 0.2);
  border-radius: 8px;
}

/* Meme Subtitle with rotating text */
.meme-subtitle {
  text-align: center;
  margin: 16px 0;
  padding: 12px;
  background: linear-gradient(135deg, rgba(129, 37, 178, 0.1), rgba(170, 255, 102, 0.1));
  border-radius: 12px;
  border: 1px solid rgba(170, 255, 102, 0.3);
}

.rotating-meme {
  font-size: 18px;
  font-weight: bold;
  color: var(--brand-soft);
  text-shadow: 0 0 10px rgba(170, 255, 102, 0.4);
  transition: opacity 0.3s ease;
  display: inline-block;
  animation: memeGlow 3s ease-in-out infinite alternate;
}

@keyframes memeGlow {
  0% { text-shadow: 0 0 10px rgba(170, 255, 102, 0.4); }
  100% { text-shadow: 0 0 20px rgba(170, 255, 102, 0.8), 0 0 30px rgba(129, 37, 178, 0.4); }
}

/* Info Box */
.info-box {
  background: rgba(170, 255, 102, 0.05);
  border: 1px solid rgba(170, 255, 102, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}

.info-box::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--brand), var(--accent), var(--brand));
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0.3;
  animation: borderGlow 4s ease-in-out infinite alternate;
}

@keyframes borderGlow {
  0% { opacity: 0.2; transform: scale(1); }
  100% { opacity: 0.5; transform: scale(1.001); }
}

.info-box p {
  margin: 8px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.info-box p strong {
  color: var(--brand);
  text-shadow: 0 0 8px rgba(170, 255, 102, 0.3);
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Table Container for horizontal scrolling on mobile */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  margin-top: 20px;
  position: relative;
}

/* Scrollbar Styling */
.table-container::-webkit-scrollbar {
  height: 6px;
}

.table-container::-webkit-scrollbar-track {
  background: rgba(170, 255, 102, 0.1);
  border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(170, 255, 102, 0.4);
  border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(170, 255, 102, 0.6);
}

/* Scroll hint for mobile users */
.scroll-hint {
  display: none;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  opacity: 0.8;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(170, 255, 102, 0.1);
  text-align: center;
  font-size: 14px;
}

th {
  background: rgba(170, 255, 102, 0.1);
  color: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

th:hover {
  background: rgba(170, 255, 102, 0.2);
  color: var(--brand-soft);
  text-shadow: 0 0 10px rgba(170, 255, 102, 0.5);
  transform: translateY(-1px);
  animation: headerBounce 0.6s ease infinite alternate;
}

@keyframes headerBounce {
  0% { transform: translateY(-1px) scale(1); }
  100% { transform: translateY(-2px) scale(1.02); }
}

tr:hover {
  background: rgba(170, 255, 102, 0.05);
}

/* Code Elements */
code {
  background: rgba(170, 255, 102, 0.1);
  border: 1px solid rgba(170, 255, 102, 0.2);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: 'Courier New', monospace;
  color: var(--brand-soft);
  font-size: 12px;
}

/* Copyable Addresses */
.copyable {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.copyable::after {
  content: '📋';
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.copyable:hover::after {
  opacity: 0.7;
}

.copyable:hover {
  background: rgba(170, 255, 102, 0.2);
  border-color: rgba(170, 255, 102, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copyable:active {
  transform: translateY(0);
  background: rgba(170, 255, 102, 0.3);
}

/* Status Colors */
.ok { color: var(--brand); }
.warn { color: #ff9500; }
.error { color: #ff4757; font-weight: 600; }
.small { font-size: 12px; color: var(--muted); }

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(16, 43, 28, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(170,255,102,0.3);
  z-index: 1000;
  padding: 0.75rem 0;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand);
  background: rgba(170,255,102,0.1);
  border-color: rgba(170,255,102,0.3);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  flex-direction: column;
  background: rgba(16, 43, 28, 0.9);
  border: 1px solid rgba(170, 255, 102, 0.3);
  border-radius: 8px;
  cursor: pointer;
  padding: 0.75rem;
  z-index: 1001;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: rgba(16, 43, 28, 1);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--brand);
  margin: 2px 0;
  transition: 0.3s;
  border-radius: 2px;
  box-shadow: 0 0 3px rgba(170, 255, 102, 0.3);
}

/* Animierte Hintergrund-Partikel */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background: 
    radial-gradient(circle at 20% 80%, rgba(170, 255, 102, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(129, 37, 178, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(170, 255, 102, 0.03) 0%, transparent 50%);
  animation: particleFloat 20s ease-in-out infinite;
}

.bg-particles::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(170, 255, 102, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(129, 37, 178, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(170, 255, 102, 0.3), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(181, 253, 91, 0.2), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(170, 255, 102, 0.3), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: particleMove 15s linear infinite;
}

/* Animations */
@keyframes particleFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(2deg); }
  66% { transform: translateY(20px) rotate(-2deg); }
}

@keyframes particleMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-200px, -100px); }
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.loading {
  animation: pulse 2s ease-in-out infinite;
}

/* Enhanced Mobile Navigation */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1002;
  }
  
  .main-nav {
    padding: 0.5rem 0;
  }
  
  .nav-container {
    justify-content: space-between;
    padding: 0 1rem;
  }
  
  .nav-links {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: rgba(16, 43, 28, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2rem;
    gap: 1rem;
    transition: left 0.3s ease;
    border-top: 1px solid rgba(170, 255, 102, 0.3);
    overflow-y: auto;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-link {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    width: 200px;
    text-align: center;
    border-radius: 25px;
    margin: 0.2rem 0;
  }
  
  .nav-link:active {
    transform: scale(0.95);
  }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
  .nav-link:hover {
    transform: none;
  }
  
  .nav-link:active {
    transform: scale(0.95);
    background: rgba(170,255,102,0.15);
  }
  
  tr:hover {
    background: transparent;
  }
  
  tr:active {
    background: rgba(170, 255, 102, 0.08);
  }
  
  .hamburger:hover {
    transform: none;
  }
  
  .hamburger:active {
    transform: scale(0.95);
  }
  
  /* Touch-optimized copyable addresses */
  .copyable:hover {
    background: rgba(170, 255, 102, 0.1);
    transform: none;
  }
  
  .copyable:active {
    background: rgba(170, 255, 102, 0.3);
    transform: scale(0.95);
  }
}

/* Enhanced Mobile Design - Tablets and Large Phones */
@media (max-width: 1024px) {
  .card {
    margin: 0 16px;
  }
  
  table {
    font-size: 13px;
  }
  
  th, td {
    padding: 10px 14px;
  }
}

/* Small Tablets and Large Phones */
@media (max-width: 768px) {
  body {
    padding: 90px 12px 12px 12px;
  }
  
  .card {
    padding: 16px;
    margin: 0 8px;
  }
  
  h1 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 16px;
  }
  
  .info-box {
    padding: 14px;
    margin: 12px 0;
  }
  
  /* Mobile-Optimized Table */
  table {
    font-size: 12px;
  }
  
  .scroll-hint {
    display: block;
  }
  
  th, td {
    padding: 8px 10px;
    min-width: 80px;
  }
  
  /* Specific column widths for mobile */
  th:nth-child(1), td:nth-child(1) { min-width: 120px; } /* Lock */
  th:nth-child(2), td:nth-child(2) { min-width: 100px; } /* Timelock */
  th:nth-child(3), td:nth-child(3) { min-width: 100px; } /* Beneficiary */
  th:nth-child(4), td:nth-child(4) { min-width: 140px; } /* Unlock Date */
  th:nth-child(5), td:nth-child(5) { min-width: 110px; } /* Remaining Time */
  th:nth-child(6), td:nth-child(6) { min-width: 80px; }  /* Token */
  th:nth-child(7), td:nth-child(7) { min-width: 120px; } /* Balance */
}

/* Small Phones */
@media (max-width: 480px) {
  body {
    padding: 80px 8px 8px 8px;
  }
  
  .card {
    padding: 12px;
    margin: 0 4px;
    border-radius: 12px;
  }
  
  h1 {
    font-size: 1.4rem;
    line-height: 1.3;
  }
  
  .info-box {
    padding: 12px;
  }
  
  .info-box p {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .muted {
    font-size: 12px;
    padding: 8px;
  }
  
  /* Ultra-compact table for small phones */
  table {
    font-size: 10px;
  }
  
  th, td {
    padding: 6px 8px;
    font-size: 10px;
  }
  
  /* Adjust column widths for very small screens */
  th:nth-child(1), td:nth-child(1) { min-width: 100px; }
  th:nth-child(2), td:nth-child(2) { min-width: 80px; }
  th:nth-child(3), td:nth-child(3) { min-width: 80px; }
  th:nth-child(4), td:nth-child(4) { min-width: 120px; }
  th:nth-child(5), td:nth-child(5) { min-width: 90px; }
  th:nth-child(6), td:nth-child(6) { min-width: 60px; }
  th:nth-child(7), td:nth-child(7) { min-width: 100px; }
  
  code {
    font-size: 9px;
    padding: 2px 4px;
  }
  
  .nav-link {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    width: 180px;
  }
}

/* Extra Small Phones */
@media (max-width: 360px) {
  h1 {
    font-size: 1.2rem;
  }
  
  .info-box p {
    font-size: 12px;
  }
  
  table {
    font-size: 9px;
  }
  
  th, td {
    padding: 4px 6px;
    font-size: 9px;
  }
  
  /* More compact columns for tiny screens */
  th:nth-child(1), td:nth-child(1) { min-width: 80px; }
  th:nth-child(2), td:nth-child(2) { min-width: 70px; }
  th:nth-child(3), td:nth-child(3) { min-width: 70px; }
  th:nth-child(4), td:nth-child(4) { min-width: 100px; }
  th:nth-child(5), td:nth-child(5) { min-width: 80px; }
  th:nth-child(6), td:nth-child(6) { min-width: 50px; }
  th:nth-child(7), td:nth-child(7) { min-width: 80px; }
  
  .nav-link {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
    width: 160px;
  }
}

/* Landscape Orientation Optimizations */
@media screen and (orientation: landscape) and (max-height: 500px) {
  body {
    padding: 70px 8px 8px 8px;
  }
  
  .main-nav {
    padding: 0.4rem 0;
  }
  
  h1 {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }
  
  .info-box {
    padding: 10px;
    margin: 8px 0;
  }
  
  .info-box p {
    font-size: 12px;
    margin: 4px 0;
  }
  
  .nav-links {
    padding-top: 1rem;
    gap: 0.5rem;
  }
  
  .nav-link {
    padding: 0.6rem 1.5rem;
  }
}

/* High DPI / Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .bg-particles::before {
    background-size: 100px 50px;
  }
  
  code {
    border-width: 0.5px;
  }
}

/* Notification System */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--card);
  border: 1px solid rgba(170, 255, 102, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10000;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 280px;
  word-wrap: break-word;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification.success {
  border-color: var(--brand);
}

.notification.error {
  border-color: #ff4757;
}

.notification-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.notification-text {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

/* Mobile Notification Adjustments */
@media (max-width: 480px) {
  .notification {
    right: 10px;
    left: 10px;
    right: auto;
    max-width: none;
    font-size: 12px;
  }
  
  .notification-text {
    font-size: 12px;
  }
}

/* Manual Copy Modal Styling */
.copy-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
}

.copy-modal-content {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--brand);
  max-width: 90vw;
  max-height: 80vh;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}