/* 
 * Floating Menu
 * Creates a floating action button that opens a menu panel
 */

:root {
  --fm-fab-size: 60px;
  --fm-fab-bg: #2a2a36;
  --fm-fab-color: #fff;
  --fm-fab-hover-bg: #3e93ff;
  --fm-fab-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  --fm-fab-z-index: 9999;
  --fm-menu-transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  --fm-nation-capella-color: #3e93ff;
  --fm-nation-procyon-color: #e64a44;
  --fm-panel-bg: rgba(18, 21, 29, 0.95);
  --fm-panel-border: rgba(255, 255, 255, 0.15);
  --fm-panel-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
  --fm-item-hover-bg: rgba(255, 255, 255, 0.1);
  --fm-primary-color: #4361ee;
  --fm-accent-color: #4895ef;
  --fm-text-color: #222;
  --fm-light-text: #666;
  --fm-background-color: #fff;
  --fm-modal-background: #fafafa;
  --fm-shadow-color: rgba(0, 0, 0, 0.1);
  --fm-menu-item-hover: #f5f5f5;
  --fm-border-color: #eee;
  --fm-icon-vk: linear-gradient(135deg, #4C75A3 0%, #5B88BD 100%);
  --fm-icon-telegram: linear-gradient(135deg, #0088cc 0%, #32afed 100%);
  --fm-icon-discord: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
  --fm-icon-nation: linear-gradient(135deg, #3a86ff 0%, #6f69ac 100%);
  --fm-transition-time: 0.3s;
}

/* Floating Action Button */
.fm-floating-action-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: var(--fm-fab-size);
  height: var(--fm-fab-size);
  border-radius: 50%;
  background-color: var(--fm-fab-bg);
  color: var(--fm-fab-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--fm-fab-shadow);
  cursor: pointer;
  z-index: var(--fm-fab-z-index);
  transition: var(--fm-menu-transition);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.fm-floating-action-button i {
  font-size: 24px;
  transition: transform 0.3s ease;
}

.fm-floating-action-button:hover {
  background-color: var(--fm-fab-hover-bg);
  transform: scale(1.05);
}

.fm-floating-action-button.active {
  transform: rotate(45deg) scale(1.05);
  background-color: var(--fm-fab-hover-bg);
}

.fm-floating-action-button.active i {
  transform: rotate(-45deg);
}

/* Central Modal Window */
.fm-central-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: var(--fm-fab-z-index);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.fm-central-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.fm-float-modal-content {
  background-color: var(--fm-panel-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--fm-panel-shadow), 0 0 20px rgba(62, 147, 255, 0.2);
  position: relative;
  border: 1px solid var(--fm-panel-border);
  animation: fm-modalFadeIn 0.5s ease forwards;
  transform: translateY(20px) scale(0.98);
  overflow: hidden;
}

@keyframes fm-modalFadeIn {
  to {
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.fm-float-modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--fm-panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fm-float-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.fm-float-modal-title i {
  margin-right: 10px;
  color: var(--fm-fab-hover-bg);
}

.fm-float-modal-title-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  background: linear-gradient(135deg, var(--fm-nation-capella-color) 0%, var(--fm-nation-procyon-color) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(62, 147, 255, 0.3);
}

.fm-float-modal-close {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 10;
}

.fm-float-modal-close:hover {
  color: rgba(255, 255, 255, 1);
  transform: rotate(90deg);
  background-color: rgba(255, 255, 255, 0.1);
}

.fm-float-modal-close i {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.fm-float-modal-close:hover i {
  color: rgba(255, 255, 255, 1);
  transform: rotate(90deg);
}

.fm-float-modal-back {
  display: flex;
  align-items: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 20px;
  margin-right: 10px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fm-float-modal-back i {
  margin-right: 8px;
}

.fm-float-modal-back span {
  font-weight: 500;
}

.fm-float-modal-back:hover {
  color: rgba(255, 255, 255, 1);
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateX(-3px);
}

.fm-float-modal-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-top: 5px;
}

/* Modal Body */
.fm-float-modal-body {
  padding: 25px;
  max-height: 70vh;
  overflow-y: auto;
}

.fm-float-modal-body::-webkit-scrollbar {
  width: 8px;
}

.fm-float-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.fm-float-modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.fm-float-modal-body::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Menu Sections */
.fm-menu-section {
  margin-bottom: 20px;
}

.fm-menu-section:last-child {
  margin-bottom: 0;
}

.fm-section-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Menu Items */
.fm-menu-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fm-menu-item:last-child {
  margin-bottom: 0;
}

.fm-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

.fm-menu-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background-color: var(--fm-fab-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 1;
}

.fm-menu-item-icon i {
  font-size: 20px;
  color: #fff;
  position: relative;
  z-index: 2;
}

.fm-social-icon {
  background: var(--fm-icon-vk);
}

.fm-social-icon i, .fm-nation-icon i {
  font-size: 18px;
}

.fm-nation-icon {
  background: var(--fm-icon-nation);
}

.fm-settings-icon {
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
}

.fm-menu-item-content {
  flex: 1;
}

.fm-menu-item-name {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3px;
}

.fm-menu-item-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.fm-menu-item-arrow {
  margin-left: 10px;
  color: rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, color 0.3s ease;
}

.fm-menu-item:hover .fm-menu-item-arrow {
  transform: translateX(3px);
  color: rgba(255, 255, 255, 0.7);
}

/* Social Network Icons */
.fm-icon-vk {
  background: var(--fm-icon-vk);
}

.fm-icon-telegram {
  background: var(--fm-icon-telegram);
}

.fm-icon-discord {
  background: var(--fm-icon-discord);
}

/* Nation Stats */
.fm-icon-nation {
  background: var(--fm-icon-nation);
}

.fm-nation-distribution {
  margin: 15px 0;
  padding: 15px;
  border-radius: 10px;
}

.fm-nation-bar {
  width: 100%;
  height: 24px;
  background-color: #e9e9e9;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fm-nation-bar-capella {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(to right, #0077b6, #00b4d8);
  transition: width 0.3s ease;
  border-radius: 8px 0 0 8px;
}

.fm-nation-bar-procyon {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(to right, #d00000, #e85d04);
  transition: width 0.3s ease;
  border-radius: 0 8px 8px 0;
}

.fm-nation-percentages {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  padding: 0 10px;
  margin-bottom: 15px;
}

/* Стили для информации о нациях */
.fm-nation-info {
  margin-top: 15px;
}

.fm-nation-info-item {
  display: flex;
  background-color: rgba(40, 44, 52, 0.6);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.fm-nation-info-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  background-color: rgba(40, 44, 52, 0.8);
}

.fm-nation-info-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  background-color: transparent;
}

.fm-nation-info-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fm-nation-info-content {
  flex: 1;
}

.fm-nation-info-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 5px 0;
  color: #fff;
}

.fm-nation-info-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.fm-nation-status {
  margin: 10px 0;
  display: flex;
  align-items: center;
  padding: 5px 0;
}

.fm-status-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* Status Value Styles */
.fm-status-value {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  margin-left: 8px;
  text-align: center;
  min-width: 100px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: #555;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.fm-status-value::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  z-index: 1;
}

.fm-status-value::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
}

/* Status Levels */
.fm-status-low {
  background-color: #e74c3c;
  animation: fm-pulse-low 2s infinite;
}

.fm-status-medium {
  background-color: #f39c12;
  animation: fm-pulse-medium 2s infinite;
}

.fm-status-high {
  background-color: #2ecc71;
  animation: fm-pulse-high 2s infinite;
}

.fm-status-very-high {
  background-color: #3498db;
  animation: fm-pulse-very-high 2s infinite;
}

/* Pulse animations for each status level */
@keyframes fm-pulse-low {
  0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
  70% { box-shadow: 0 0 0 5px rgba(231, 76, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

@keyframes fm-pulse-medium {
  0% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4); }
  70% { box-shadow: 0 0 0 5px rgba(243, 156, 18, 0); }
  100% { box-shadow: 0 0 0 0 rgba(243, 156, 18, 0); }
}

@keyframes fm-pulse-high {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
  70% { box-shadow: 0 0 0 5px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

@keyframes fm-pulse-very-high {
  0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
  70% { box-shadow: 0 0 0 5px rgba(52, 152, 219, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

/* Modal Sections */
.fm-modal-section {
  display: none;
  animation: fm-sectionFadeIn 0.5s ease forwards;
  transform: translateY(10px);
  opacity: 0;
}

.fm-modal-section.hidden {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.fm-modal-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

@keyframes fm-sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .fm-float-modal-content {
    width: 95%;
  }
}

@keyframes fm-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(230, 74, 68, 0.7);
  }
  
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(230, 74, 68, 0);
  }
  
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(230, 74, 68, 0);
  }
}

.fm-floating-action-button {
  animation: fm-pulse 2s infinite;
}

.fm-floating-action-button:hover,
.fm-floating-action-button.active {
  animation: none;
}

.fm-floating-menu-container {
  position: relative;
  z-index: var(--fm-fab-z-index);
}

/* Nation Bonuses Section */
.fm-nation-bonuses {
  margin-top: 10px;
  font-size: 13px;
}

.fm-bonuses-label {
  color: rgba(255, 255, 255, 0.6);
  display: block;
  margin-bottom: 5px;
}

.fm-bonuses-list {
  margin: 0;
  padding: 0 0 0 18px;
  list-style-type: disc;
}

.fm-bonuses-list li {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 3px;
  line-height: 1.3;
}

.fm-bonuses-list li:last-child {
  margin-bottom: 0;
} 