/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f7f9;
  padding: 20px;
  min-height: 100vh;
}

h2, h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}

/* Card Component */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Forms and Inputs */
input[type="text"],
input[type="password"],
input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* Buttons */
.btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-right: 10px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}

.btn:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

.btn-success {
  background-color: #2ecc71;
}

.btn-success:hover {
  background-color: #27ae60;
}

.btn-danger {
  background-color: #e74c3c;
}

.btn-danger:hover {
  background-color: #c0392b;
}

/* Action Buttons Container */
.action-buttons {
  display: flex;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto 20px;
}

/* Login Container */
#login-container {
  max-width: 400px;
  margin: 100px auto;
}

/* Video Player */
#video-container {
  background-color: #000;
  overflow: hidden;
}

#video {
  display: block;
  width: 100%;
}

/* Custom Controls */
#custom-controls {
  padding: 15px 0;
}

.slider-container {
  margin: 15px 0;
}

#time-slider {
  width: 100%;
  margin: 10px 0;
}

.time-display {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.time-display p {
  margin-right: 20px;
}

#frame-controls {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

/* File Inputs */
.file-input-group {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.file-input-group:last-child {
  border-bottom: none;
}

/* Mapped Data */
#mapped-data-entries > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #eee;
}

#mapped-data-entries input {
  flex: 1;
  min-width: 150px;
  margin-bottom: 0;
}

/* Server Log */
#server-log-container {
  max-height: 400px;
  overflow-y: auto;
}

#server-log {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
  height: 300px;
  overflow-y: auto;
  background: #f8f8f8;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#server-log div {
  margin-bottom: 5px;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .card {
    padding: 15px;
  }
  
  #mapped-data-entries > div {
    flex-direction: column;
    gap: 5px;
  }
  
  #mapped-data-entries input {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .action-buttons .btn {
    width: 100%;
    margin-right: 0;
  }
  
  .time-display {
    flex-direction: column;
  }
}
