:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4ecdc4;
  --accent-color: #5e027f;
  --bg-color: rgba(220, 220, 220, 0.85);
  --bg-color: #1a1a2e;
  --panel-color: #16213e;
  --text-color: #f8f9fa;
  --text-muted: #adb5bd;
  --font-main: "Share Tech Mono", monospace;
  --success-color: #00b894;
  --warning-color: #1100ff;
  --danger-color: #ff7675;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.economic {
  background-color: antiquewhite;
}

/* Контейнер для двух колонок */
.news-log-container {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

/* Блок новостей (левая колонка) */
.news-feed,
.event-log {
  height: auto; /* Вместо фиксированной высоты */
  min-height: 300px; /* Минимальная высота */
}

/* Контейнеры контента */
.news-container,
.log-container {
  height: 600px;
  width: 600px;
  overflow-y: auto;
  padding: 10px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  margin-top: 10px;
}

/* Элементы новостей и лога */
.news-entry,
.log-entry {
  padding: 8px 10px;
  margin-bottom: 8px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  border-left: 3px solid var(--secondary-color);
  color: black;
}

.log-entry {
  border-left-color: var(--primary-color);
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  padding: 20px;
  min-height: 100vh;
  background: url("img/maket.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
}

/* Header Styles */
header {
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 3px dashed var(--accent-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  background-color: antiquewhite;
}

.h2 {
  gap: 20px;
  background-color: antiquewhite;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

h1,
h2 {
  color: var(--accent-color);
  font-size: 2.2rem;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  transform: rotate(-1deg);
  margin: 0;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  font-weight: bold;
}

.led {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--primary-color);
  animation: pulse 1s infinite alternate, bounce 2s infinite;
}

.sk-external-btn {
  width: 45px;
  height: auto;
  display: block;
  cursor: pointer;
}

.sk-external-link {
  display: inline-block;
  transition: all 0.2s ease;
  border: 2px solid var(--accent-color);
  border-radius: 4px;
  padding: 5px;
  background: white;
  box-shadow: 2px 2px 0px var(--accent-color);
  text-decoration: none;
}

.sk-external-link:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8);
  background: var(--accent-color);
}

/* Panel Border Styles */
.panel-border {
  border: 2px solid var(--accent-color);
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
  position: relative;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Economic Indicators */
.economic-indicators {
  width: 100%;
}

.indicators-grid {
  display: flex;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  padding: 10px 0;
  flex-direction: row;
  justify-content: space-evenly;
}

.indicator {
  background-color: var(--panel-color);
  padding: 15px;
  border-radius: 10px;
  border: 3px solid var(--accent-color);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.indicator:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
}

.indicator::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(
    45deg,
    transparent 25%,
    rgba(255, 230, 109, 0.1) 25%,
    rgba(255, 230, 109, 0.1) 50%,
    transparent 50%,
    transparent 75%,
    rgba(255, 230, 109, 0.1) 75%
  );
  background-size: 20px 20px;
  opacity: 0.3;
  z-index: -1;
}

.indicator-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: bold;
}

.indicator-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 3px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.indicator-change {
  font-size: 1rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

/* Control Panel */
.control-panel {
  background-color: antiquewhite;
}

.main-panel {
  width: 150%;
}

.control-panel::before {
  content: "✨";
  position: absolute;
  top: -15px;
  right: -15px;
  font-size: 2rem;
  animation: spin 4s linear infinite;
}

.control-categories {
  display: flex;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.category {
  position: relative;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  width: 100%; /* Занимает всю доступную ширину */
  box-sizing: border-box; /* Учитываем padding в ширине */
  margin-bottom: 15px; /* Отступ между категориями */
}

.category:hover {
  transform: scale(1.02);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.category h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  margin: 0;
  color: var(--accent-color);
  font-size: 1.3rem;
}

/* Category header indicator */
.category h3::after {
  content: "+";
  margin-left: auto;
  transition: transform 0.3s ease;
}

.category.active h3::after {
  transform: rotate(45deg);
}

.category-buttons {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  padding: 0 10px;
}

.category.active .category-buttons {
  max-height: 500px; /* Достаточно большое значение, чтобы вместить все кнопки */
  opacity: 1;
  padding: 10px;
  transition: max-height 0.5s ease, opacity 0.3s ease;
}

/* Control Buttons */
.control-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  animation: rainbow 2s infinite linear;
}

.control-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

.control-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
  transition: all 0.3s ease;
}

.control-btn:hover::after {
  left: 100%;
}

/* Event Log */
.event-log {
  margin-right: 20px;
  border: 3px solid var(--accent-color);
}

.log-container {
  overflow-y: auto;
  padding: 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: black;
}

.log-entry {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dotted var(--accent-color);
  color: black;
  position: relative;
  padding-left: 20px;
  transition: all 0.3s ease;
}

.log-entry:hover {
  transform: translateX(5px);
  background-color: rgba(0, 0, 0, 0.1);
}

.log-entry::before {
  content: "➤";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.log-entry:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.policy-control {
  color: var(--accent-color);
}

.log-time {
  color: var(--primary-color);
  font-weight: bold;
}

/* Footer */
footer {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 3px dotted var(--accent-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.disclaimer {
  background-color: rgba(255, 107, 107, 0.2);
  padding: 10px;
  border-radius: 8px;
  display: inline-block;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.2);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes rainbow {
  0% {
    background-color: #ff6b6b;
  }
  16% {
    background-color: #ffb347;
  }
  33% {
    background-color: #ffe66d;
  }
  50% {
    background-color: #4ecdc4;
  }
  66% {
    background-color: #45b7d1;
  }
  83% {
    background-color: #a37cff;
  }
  100% {
    background-color: #ff6b6b;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(10px);
  }
  60% {
    transform: translateX(-10px);
  }
  80% {
    transform: translateX(10px);
  }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(500px) rotate(720deg);
    opacity: 0;
  }
}

/* Confirmation Overlay */
.confirmation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.confirmation-box {
  background: var(--panel-color);
  padding: 25px;
  border-radius: 15px;
  border: 3px solid var(--accent-color);
  max-width: 500px;
  text-align: center;
  transform: scale(0.5);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255, 230, 109, 0.5);
}

.confirmation-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.confirm-btn,
.cancel-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-main);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-btn {
  background-color: var(--success-color);
}

.cancel-btn {
  background-color: var(--danger-color);
}

.confirm-btn:hover {
  background-color: #55efc4;
}

.cancel-btn:hover {
  background-color: #fab1a0;
}

/* Confetti */
.confetti-container {
  position: fixed;
  pointer-events: none;
  z-index: 1001;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0;
  animation: confetti-fall 3s ease-in-out forwards;
}

/* Button Press Effect */
.button-press {
  transform: translateY(4px) scale(0.95) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Shake Effect */
.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
    transform: rotate(0);
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .control-categories {
    display: flex;
    justify-content: space-between;
  }

  .indicators-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .indicator {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .indicators-grid {
    grid-template-columns: 1fr;
  }

  .confirmation-buttons {
    flex-direction: column;
  }
}
