/* D_Social - Sleek, Futuristic Black & White Theme */
/* Base colors and variables */
:root {
  --d-text-primary: #ffffff;
  --d-text-secondary: #cccccc;
  --d-bg-primary: #000000;
  --d-bg-secondary: #111111;
  --d-accent: #ffffff;
  --d-highlight: rgba(255, 255, 255, 0.8);
  --d-border: rgba(255, 255, 255, 0.1);
  --d-transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Base Styles */
body {
  background: var(--d-bg-primary);
  color: var(--d-text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(41, 41, 41, 0.3) 0%, transparent 70%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, #000000 100%);
  background-attachment: fixed;
}

/* Galaxy Background Animation */
.futuristic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  overflow: hidden;
  background: radial-gradient(ellipse at center, 
    rgba(15, 10, 38, 1) 0%, 
    rgba(10, 8, 30, 1) 30%, 
    rgba(5, 5, 20, 1) 70%, 
    rgba(0, 0, 10, 1) 100%);
}

/* Cosmic dust and nebula effect */
.cosmic-dust {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%23362F45' stroke-width='1'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%234A3664'%3E%3Ccircle cx='769' cy='229' r='5'/%3E%3Ccircle cx='539' cy='269' r='5'/%3E%3Ccircle cx='603' cy='493' r='5'/%3E%3Ccircle cx='731' cy='737' r='5'/%3E%3Ccircle cx='520' cy='660' r='5'/%3E%3Ccircle cx='309' cy='538' r='5'/%3E%3Ccircle cx='295' cy='764' r='5'/%3E%3Ccircle cx='40' cy='599' r='5'/%3E%3Ccircle cx='102' cy='382' r='5'/%3E%3Ccircle cx='127' cy='80' r='5'/%3E%3Ccircle cx='370' cy='105' r='5'/%3E%3Ccircle cx='578' cy='42' r='5'/%3E%3Ccircle cx='237' cy='261' r='5'/%3E%3Ccircle cx='390' cy='382' r='5'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.2;
  animation: rotateNebula 250s linear infinite;
}

.cosmic-dust::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 30% 60%, rgba(156, 39, 176, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(68, 138, 255, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(120, 70, 180, 0.05) 0%, transparent 60%);
  filter: blur(20px);
}

/* Starfield effect */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  perspective: 500px;
}

/* Milky Way spiral arm effect */
.galaxy-arm {
  position: fixed;
  width: 300%;
  height: 300%;
  top: -100%;
  left: -100%;
  background-image: 
    radial-gradient(ellipse at center, 
      transparent 50%, 
      rgba(62, 84, 172, 0.03) 51%, 
      rgba(83, 107, 194, 0.05) 70%, 
      rgba(41, 50, 106, 0.02) 95%, 
      transparent 100%);
  transform: rotateZ(23deg);
  animation: rotateGalaxy 180s linear infinite;
  z-index: -2;
}

.galaxy-arm:nth-child(2) {
  background-image: 
    radial-gradient(ellipse at center, 
      transparent 50%, 
      rgba(164, 124, 219, 0.03) 51%, 
      rgba(128, 67, 198, 0.05) 70%, 
      rgba(86, 43, 157, 0.02) 95%, 
      transparent 100%);
  transform: rotateZ(157deg);
  animation-duration: 230s;
}

/* Cosmic glow */
.cosmic-glow {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background: radial-gradient(
    circle at 50% 50%, 
    rgba(120, 70, 180, 0.05) 0%, 
    transparent 70%
  );
  filter: blur(40px);
}

@keyframes rotateGalaxy {
  from {
    transform: rotateZ(0deg);
  }
  to {
    transform: rotateZ(360deg);
  }
}

@keyframes rotateNebula {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 100% 100%;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.7;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shooting {
  0% {
    transform: translateX(0) translateY(0);
    opacity: 1;
  }
  80%, 100% {
    transform: translateX(500px) translateY(300px);
    opacity: 0;
  }
}

/* Background SVG filter */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Navbar Styling */
.navbar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.7) !important;
  border-bottom: 1px solid var(--d-border);
  padding: 1rem 0;
}

.navbar-brand {
  color: var(--d-text-primary) !important;
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
}

.navbar-brand::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--d-accent);
  transition: var(--d-transition);
}

.navbar-brand:hover::after {
  width: 100%;
}

.nav-link {
  color: var(--d-text-secondary) !important;
  margin: 0 0.5rem;
  position: relative;
  transition: var(--d-transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--d-accent);
  transform: translateX(-50%);
  transition: var(--d-transition);
}

.nav-link:hover {
  color: var(--d-text-primary) !important;
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--d-text-primary) !important;
  font-weight: 600;
}

.nav-link.active::after {
  width: 50%;
}

/* Cards and Sections */
.feature-section {
  padding: 2rem;
  background: rgba(10, 10, 10, 0.7);
  border-radius: 12px;
  border: 1px solid var(--d-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: var(--d-transition);
}

.feature-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h1::after, h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--d-accent), transparent);
}

.dashboard-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #ffffff, #cccccc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  position: relative;
}

.dashboard-description {
  color: var(--d-text-secondary) !important;
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

/* Buttons */
.btn {
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--d-transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #333333, #222222);
  border: 1px solid var(--d-border);
  color: var(--d-text-primary);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #444444, #333333);
  transition: var(--d-transition);
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--d-text-primary);
}

.btn-primary:hover::before {
  left: 0;
}

/* Form elements */
.form-control {
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid var(--d-border);
  border-radius: 4px;
  color: var(--d-text-primary);
  padding: 0.75rem 1rem;
  transition: var(--d-transition);
}

.form-control:focus {
  background: rgba(40, 40, 40, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  color: var(--d-text-primary);
}

.form-label {
  color: var(--d-text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Tables */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border: 1px solid var(--d-border);
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background: rgba(20, 20, 20, 0.9);
  color: var(--d-text-primary);
  font-weight: 600;
  padding: 1rem;
  border-bottom: 1px solid var(--d-border);
}

.table tbody tr {
  transition: var(--d-transition);
}

.table tbody tr:hover {
  background: rgba(40, 40, 40, 0.5);
}

.table td {
  padding: 1rem;
  border-top: 1px solid var(--d-border);
  color: var(--d-text-secondary);
}

/* Footer */
.footer {
  margin-top: 5rem;
  padding: 1.5rem 0;
  background: rgba(10, 10, 10, 0.8);
  border-top: 1px solid var(--d-border);
  color: var(--d-text-secondary);
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* For sticky footer layout */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* Add bottom margin to prevent content from being hidden by footer */
  margin-bottom: 7rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

/* Mouse follower */
.mouse-follower {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
  z-index: 9999;
}

/* Alerts and notifications */
.alert {
  border-radius: 8px;
  border: none;
  padding: 1rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.alert-success {
  background: rgba(46, 160, 67, 0.1);
  border-left: 4px solid #2EA043;
  color: #A1E5AE;
}

.alert-danger {
  background: rgba(248, 81, 73, 0.1);
  border-left: 4px solid #F85149;
  color: #F8A5A1;
}

.alert-warning {
  background: rgba(246, 174, 45, 0.1);
  border-left: 4px solid #F6AE2D;
  color: #F6D6A0;
}

.alert-info {
  background: rgba(58, 181, 247, 0.1);
  border-left: 4px solid #3AB5F7;
  color: #A1DBF8;
}

/* Media Queries */
@media (max-width: 1200px) {
  .feature-section {
    width: 90%;
    margin: 0 auto;
  }
}

@media (max-width: 992px) {
  .dashboard-title {
    font-size: 2.2rem;
  }
  
  .feature-card h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 0;
  }
  
  .feature-section {
    padding: 1.5rem;
    width: 95%;
  }
  
  .dashboard-title {
    font-size: 2rem;
  }
  
  .dashboard-description {
    font-size: 1rem;
    max-width: 95%;
  }
  
  .btn {
    padding: 0.6rem 1.2rem;
  }
  
  body {
    margin-bottom: 9rem;
  }
  
  .footer {
    padding: 1rem 0;
  }
}

@media (max-width: 576px) {
  .feature-grid .col-md-4 {
    margin-bottom: 1rem;
  }
  
  .dashboard-title {
    font-size: 1.8rem;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .feature-section {
    padding: 1.25rem;
  }
  
  .feature-description {
    max-width: 100%;
  }
  
  body {
    margin-bottom: 7rem;
  }
  
  main.container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}