/**
 * Main stylesheet for HTML Content Generator
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  padding-bottom: 60px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Navigation */
nav {
  background: #2c3e50;
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav .container {
  padding: 0;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

nav li {
  flex: 0 0 auto;
}

nav a {
  display: block;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

nav a:hover {
  background: rgba(255,255,255,0.1);
}

nav a.active {
  background: #3498db;
  font-weight: 600;
  border-bottom: 3px solid #2980b9;
}

/* Headers */
h1 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 2em;
}

h2 {
  color: #34495e;
  margin: 20px 0 15px;
  font-size: 1.5em;
}

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

input[type="text"],
input[type="email"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
button,
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.btn-primary {
  background: #3498db;
  color: white;
}

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

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

.btn-success:hover {
  background: #229954;
}

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

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

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin: 20px 0;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

tr:hover {
  background: #f8f9fa;
}

/* Feedback Panel */
.feedback-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 2px solid #3498db;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 9999;
  max-height: 300px;
  transition: max-height 0.3s;
}

.feedback-panel.collapsed {
  max-height: 50px;
}

.feedback-header {
  padding: 15px 20px;
  background: #ecf0f1;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.feedback-header:hover {
  background: #dce1e3;
}

.feedback-toggle {
  font-size: 12px;
}

.feedback-content {
  max-height: 250px;
  overflow-y: auto;
  padding: 10px 20px;
}

.feedback-message {
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 4px;
  border-left: 4px solid;
  display: flex;
  gap: 10px;
}

.feedback-time {
  font-size: 11px;
  color: #666;
  flex-shrink: 0;
}

.feedback-text {
  flex: 1;
}

.feedback-success {
  background: #d4edda;
  border-left-color: #28a745;
  color: #155724;
}

.feedback-error {
  background: #f8d7da;
  border-left-color: #dc3545;
  color: #721c24;
}

.feedback-info {
  background: #d1ecf1;
  border-left-color: #17a2b8;
  color: #0c5460;
}

.feedback-warning {
  background: #fff3cd;
  border-left-color: #ffc107;
  color: #856404;
}

/* Progress Bar */
.progress-container {
  margin: 20px 0;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: #ecf0f1;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  transition: width 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.progress-text {
  text-align: center;
  color: #555;
  font-size: 14px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* Responsive */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }
  
  nav a {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .container {
    padding: 10px;
  }
  
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 8px;
  }
}
