/* Gaming Feasts Gamepad Tester WordPress Plugin Styles */

/* Plugin Container */
.gfgt-container {
  max-width: 100%;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

/* Header */
.gfgt-header {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.gfgt-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gfgt-subtitle {
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
}

/* Loading State */
.gfgt-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.gfgt-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #FF6B35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Main Gamepad Tester */
.gfgt-gamepad-tester {
  min-height: 600px;
  background: #f8f9fa;
}

/* Connection Status */
.gfgt-connection-status {
  padding: 2rem;
  background: white;
  border-bottom: 1px solid #e0e0e0;
}

.gfgt-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.gfgt-status-header h3 {
  color: #333;
  font-weight: 600;
  margin: 0;
  font-size: 1.5rem;
}

.gfgt-controller-count {
  background: #FF6B35;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
}

.gfgt-no-controllers {
  text-align: center;
  padding: 3rem;
  background: #fff5f0;
  border-radius: 15px;
  border: 2px dashed #FF6B35;
  color: #666;
}

.gfgt-status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

.gfgt-status-indicator.online {
  background: #4CAF50;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.gfgt-status-indicator.offline {
  background: #f44336;
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

.gfgt-connection-tips {
  margin-top: 2rem;
  text-align: left;
}

.gfgt-connection-tips h4 {
  color: #FF6B35;
  margin-bottom: 1rem;
}

.gfgt-connection-tips ul {
  list-style: none;
  padding: 0;
}

.gfgt-connection-tips li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.gfgt-connection-tips li:before {
  content: '🎮';
  position: absolute;
  left: 0;
}

.gfgt-controllers-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.gfgt-controller-item {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.gfgt-controller-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.gfgt-controller-item.active {
  border-color: #FF6B35;
  background: linear-gradient(135deg, #fff5f0 0%, #fff 100%);
}

.gfgt-controller-info h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-weight: 600;
}

.gfgt-controller-info p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

/* Tab Navigation */
.gfgt-tester-content {
  background: white;
}

.gfgt-tab-navigation {
  display: flex;
  background: white;
  border-bottom: 2px solid #f0f0f0;
  overflow-x: auto;
}

.gfgt-tab-button {
  flex: 1;
  padding: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
  min-width: 150px;
}

.gfgt-tab-button:hover {
  background: #f8f9fa;
}

.gfgt-tab-button.active {
  background: #FF6B35;
  color: white;
  border-bottom: 3px solid #e55a2b;
}

.gfgt-tab-icon {
  font-size: 1.2rem;
}

/* Tab Content */
.gfgt-tab-content {
  padding: 2rem;
  min-height: 500px;
}

/* Visual Controller */
.gfgt-controller-visual {
  text-align: center;
}

.gfgt-visual-header h4 {
  color: #333;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.gfgt-visual-header p {
  color: #666;
  margin: 0 0 2rem 0;
}

.gfgt-canvas-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 2rem;
}

.gfgt-controller-canvas {
  border-radius: 10px;
  max-width: 100%;
  height: auto;
  border: 2px solid #e0e0e0;
}

.gfgt-input-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: left;
}

.gfgt-legend-section h5 {
  color: #FF6B35;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.gfgt-legend-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gfgt-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gfgt-color-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ddd;
}

.gfgt-color-indicator.pressed {
  background: #FF6B35;
  border-color: #e55a2b;
}

.gfgt-color-indicator.unpressed {
  background: #f0f0f0;
  border-color: #ddd;
}

.gfgt-color-indicator.analog {
  background: linear-gradient(45deg, #FF6B35, rgba(255, 107, 53, 0.3));
  border-color: #e55a2b;
}

.gfgt-color-indicator.stick-active {
  background: #FF6B35;
  border-color: #e55a2b;
}

.gfgt-color-indicator.dead-zone {
  background: transparent;
  border-color: #ff9999;
  border-style: dashed;
}

/* Input Monitor */
.gfgt-monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.gfgt-monitor-header h4 {
  color: #333;
  font-weight: 600;
  margin: 0;
}

.gfgt-monitor-controls {
  display: flex;
  gap: 0.5rem;
}

.gfgt-record-button {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.gfgt-record-button.recording {
  background: #f44336;
  animation: pulse 1.5s infinite;
}

.gfgt-clear-button {
  background: #666;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.gfgt-clear-button:hover {
  background: #555;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.gfgt-current-state {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.gfgt-state-section h5 {
  color: #FF6B35;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.gfgt-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.gfgt-button-state {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.gfgt-button-state.pressed {
  background: #fff5f0;
  border-color: #FF6B35;
  color: #FF6B35;
  font-weight: 600;
}

.gfgt-button-name {
  font-size: 0.9rem;
}

.gfgt-button-value {
  font-family: monospace;
  font-size: 0.8rem;
  color: #666;
}

.gfgt-axis-grid {
  display: grid;
  gap: 1rem;
}

.gfgt-axis-state {
  display: grid;
  grid-template-columns: 1fr 200px 80px;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.gfgt-axis-name {
  font-size: 0.9rem;
  color: #333;
}

.gfgt-axis-bar {
  position: relative;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
}

.gfgt-axis-indicator {
  position: absolute;
  top: 0;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: all 0.1s ease;
}

.gfgt-axis-value {
  font-family: monospace;
  font-size: 0.9rem;
  color: #666;
  text-align: right;
}

/* Modal Styles */
.gfgt-modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gfgt-modal-content {
  background-color: white;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gfgt-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #FF6B35 0%, #e55a2b 100%);
  color: white;
  border-radius: 15px 15px 0 0;
}

.gfgt-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.gfgt-close {
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: white;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.gfgt-close:hover {
  opacity: 1;
}

.gfgt-modal-body {
  padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gfgt-title {
    font-size: 2rem;
  }
  
  .gfgt-subtitle {
    font-size: 1rem;
  }
  
  .gfgt-tab-navigation {
    flex-direction: column;
  }
  
  .gfgt-tab-button {
    min-width: auto;
  }
  
  .gfgt-controllers-list {
    grid-template-columns: 1fr;
  }
  
  .gfgt-button-grid {
    grid-template-columns: 1fr;
  }
  
  .gfgt-axis-state {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .gfgt-modal-content {
    width: 95%;
    margin: 5% auto;
  }
  
  .gfgt-input-legend {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .gfgt-header {
    padding: 1.5rem 1rem;
  }
  
  .gfgt-tab-content {
    padding: 1rem;
  }
  
  .gfgt-connection-status {
    padding: 1rem;
  }
  
  .gfgt-canvas-container {
    padding: 1rem;
  }
}

/* WordPress Theme Compatibility */
.gfgt-container * {
  box-sizing: border-box;
}

.gfgt-container h1,
.gfgt-container h2,
.gfgt-container h3,
.gfgt-container h4,
.gfgt-container h5,
.gfgt-container h6 {
  font-family: inherit;
  line-height: 1.4;
}

.gfgt-container p {
  margin-bottom: 1rem;
}

.gfgt-container button {
  font-family: inherit;
}

/* Admin Styles */
.gfgt-admin-info {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 2rem;
  margin-top: 2rem;
}

.gfgt-admin-info h2,
.gfgt-admin-info h3 {
  color: #FF6B35;
  margin-top: 0;
}

.gfgt-admin-info code {
  background: #f0f0f0;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  display: inline-block;
  margin: 0.5rem 0;
}

.gfgt-admin-info ul {
  list-style-type: disc;
  padding-left: 2rem;
}

.gfgt-admin-info ul li {
  margin-bottom: 0.5rem;
}