/* Modern Dashboard Styles */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes glowPulse {
  0% { opacity: 0.1; }
  50% { opacity: 0.2; }
  100% { opacity: 0.1; }
}

@keyframes barGrow {
  from { width: 0; }
  to { width: var(--bar-width, 100%); }
}

@keyframes pieRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.dashboard-wrapper {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  position: relative;
}

.modern-dashboard {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  color: #fff;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 0.8s ease-out forwards;
}

.dashboard-header {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-title {
  display: flex;
  align-items: center;
}

.dashboard-dots {
  display: flex;
  gap: 6px;
  margin-right: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.title-text {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.dashboard-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dashboard-body {
  padding: 20px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  flex: 1;
  margin: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.5s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 0.1s);
  opacity: 0;
}

.stat-card:first-child {
  margin-left: 0;
}

.stat-card:last-child {
  margin-right: 0;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #4e6ef2;
}

.stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.charts-container {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}

.chart-box {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.8s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.chart-legend {
  display: flex;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-text {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.traffic-chart {
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}

.traffic-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.traffic-label {
  width: 80px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.traffic-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: visible;
  position: relative;
  margin: 0 10px;
}

.traffic-bar {
  height: 100%;
  border-radius: 4px;
  animation: barGrow 1.5s ease-out forwards;
  transform-origin: left;
}

.traffic-value {
  width: 35px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
  white-space: nowrap;
}

.bar-direct {
  background: linear-gradient(90deg, #4e6ef2 0%, #6c8bff 100%);
  width: 0;
  animation: barGrow 1.5s ease-out forwards;
  animation-fill-mode: forwards;
}

.bar-social {
  background: linear-gradient(90deg, #4caf50 0%, #8bc34a 100%);
  width: 0;
  animation: barGrow 1.5s ease-out forwards;
  animation-fill-mode: forwards;
}

.bar-organic {
  background: linear-gradient(90deg, #ff9800 0%, #ffb74d 100%);
  width: 0;
  animation: barGrow 1.5s ease-out forwards;
  animation-fill-mode: forwards;
}

.bar-referral {
  background: linear-gradient(90deg, #f44336 0%, #ff7961 100%);
  width: 0;
  animation: barGrow 1.5s ease-out forwards;
  animation-fill-mode: forwards;
}

.bar-email {
  background: linear-gradient(90deg, #9c27b0 0%, #d05ce3 100%);
  width: 0;
  animation: barGrow 1.5s ease-out forwards;
  animation-fill-mode: forwards;
}

.traffic-sources {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}

.source-info {
  display: flex;
  align-items: center;
  width: 100px;
  flex-shrink: 0;
  overflow: hidden;
}

.source-name {
  font-size: 12px;
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: visible;
}

.source-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(45deg, #4e6ef2, #6c8bff);
  animation: barGrow 1.5s ease-out forwards;
  transform-origin: left;
  width: 0;
}

.source-value {
  width: 35px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
  white-space: nowrap;
}

.device-stats {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 15px 0;
}

.device-row {
  display: flex;
  align-items: center;
  height: 30px;
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

.device-row:nth-child(1) {
  animation-delay: 0.5s;
}

.device-row:nth-child(2) {
  animation-delay: 0.6s;
}

.device-row:nth-child(3) {
  animation-delay: 0.7s;
}

.device-row:nth-child(4) {
  animation-delay: 0.8s;
}

.device-label {
  display: flex;
  align-items: center;
  width: 100px;
  margin-right: 10px;
}

.device-name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.device-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 10px;
}

.device-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 8px;
}

.device-bar {
  height: 100%;
  border-radius: 4px;
  animation: barGrow 1.5s ease-out forwards;
  transform-origin: left;
}

.bar-desktop {
  background: #4e6ef2;
  width: 35%;
}

.bar-mobile {
  background: #4caf50;
  width: 40%;
}

.bar-tablet {
  background: #ff9800;
  width: 15%;
}

.bar-other {
  background: #f44336;
  width: 10%;
}

.device-percent {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  width: 40px;
  text-align: right;
}

.color-desktop {
  background: #4e6ef2;
}

.color-mobile {
  background: #4caf50;
}

.color-tablet {
  background: #ff9800;
}

.color-other {
  background: #f44336;
}

/* Glow effects */
.glow-effect {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  z-index: -1;
  animation: glowPulse 4s ease-in-out infinite;
}

.glow-blue {
  background: #4e6ef2;
  top: 20%;
  left: 20%;
}

.glow-green {
  background: #4caf50;
  bottom: 20%;
  right: 20%;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .dashboard-wrapper {
    width: 100%;
    max-width: 650px;
  }
  
  .stats-row {
    flex-wrap: wrap;
  }
  
  .stat-card {
    flex-basis: calc(50% - 10px);
    margin-bottom: 15px;
  }
}

@media (max-width: 992px) {
  .hero-section .container {
    flex-direction: column;
  }
  
  .hero-content {
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px;
  }
  
  .hero-image {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
  }
  
  .dashboard-wrapper {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .dashboard-wrapper {
    max-width: 550px;
  }
  
  .dashboard-body {
    padding: 15px;
  }
  
  .charts-container {
    flex-direction: column;
  }
  
  .chart-box {
    width: 100%;
    margin-bottom: 15px;
  }
  
  .stat-card {
    padding: 15px;
  }
}

@media (max-width: 576px) {
  .dashboard-wrapper {
    max-width: 100%;
  }
  
  .dashboard-header {
    padding: 10px 15px;
  }
  
  .dashboard-title {
    font-size: 16px;
  }
  
  .stats-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .stat-card {
    width: 100%;
    margin-right: 0;
  }
  
  .traffic-item {
    padding: 8px 0;
  }
  
  .charts-container {
    padding: 10px;
  }
  
  .chart-header {
    padding: 10px 15px;
  }
  
  .chart-title {
    font-size: 14px;
  }
  
  .device-row {
    margin-bottom: 8px;
  }
  
  .device-name, .traffic-label {
    font-size: 12px;
  }
  
  .device-percent, .traffic-value {
    font-size: 11px;
  }
}
