:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --accent-color: #e74c3c;
  --background-color: #f9f9f9;
  --text-color: #333;
  --border-color: #ddd;
  --card-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --header-bg: #2c3e50;
  --header-text: white;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

header {
  background-color: var(--header-bg);
  color: var(--header-text);
  padding: 1rem;
  text-align: center;
}

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

.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

h1, h2, h3 {
  margin-bottom: 1rem;
  color: var(--header-bg);
}

input, select, button {
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 100%;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  width: auto;
  min-width: 120px;
  padding: 0.8rem 1.2rem;
}

button:hover {
  background-color: #2980b9;
}

.result {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f1f1f1;
  border-radius: 4px;
}

.result h3 {
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.gauge-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.gauge {
  text-align: center;
  width: 23%;
  min-width: 150px;
  margin-bottom: 1rem;
}

.gauge canvas {
  max-width: 100%;
}

.gauge-label {
  margin-top: 0.5rem;
  font-weight: bold;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
}

.close {
  float: right;
  cursor: pointer;
  font-size: 1.5rem;
}

.food-list {
  max-height: 300px;
  overflow-y: auto;
  margin: 1rem 0;
}

.food-item {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.food-item:hover {
  background-color: #f5f5f5;
}

.progress-container {
  margin: 2rem 0;
}

.progress-bar {
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: var(--secondary-color);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.summary-box {
  background-color: #f8f9fa;
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  margin: 2rem 0;
}

.meal-section {
  margin-bottom: 2rem;
}

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

.meal-list {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  min-height: 50px;
}

.meal-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.meal-item:last-child {
  border-bottom: none;
}

.tab-container {
  margin: 2rem 0;
}

.tab-buttons {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab-button {
  padding: 0.8rem 1.5rem;
  background-color: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-color);
  cursor: pointer;
}

.tab-button.active {
  border-bottom: 3px solid var(--primary-color);
  font-weight: bold;
}

.tab-content {
  padding: 1.5rem 0;
}

.hidden {
  display: none;
}

.error {
  color: var(--accent-color);
  margin-top: 0.5rem;
}

.table-container {
  overflow-x: auto;
  margin: 1rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.data-table th,
.data-table td {
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  text-align: center;
}

.data-table th {
  background-color: var(--header-bg);
  color: var(--header-text);
}

.data-table tr:nth-child(even) {
  background-color: #f5f5f5;
}

.data-table tr:hover {
  background-color: #e9e9e9;
}

.bmi-scale, .vo2max-scale, .ffmi-scale, .bodyfat-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
}

.description {
  margin-top: 1rem;
  padding: 0.8rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid var(--primary-color);
}

.chart-container {
  margin: 1.5rem 0;
  height: 300px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.info-box {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 1rem;
  border-left: 4px solid var(--primary-color);
}

footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--header-bg);
  color: var(--header-text);
  margin-top: 2rem;
}

/* Image styles */
.info-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem auto;
  display: block;
}

.image-caption {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .gauge {
    width: 48%;
  }
  
  .data-table {
    font-size: 0.9rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }
  
  .grid-container {
    grid-template-columns: 1fr;
  }
}

.add-food {
  width: auto;
  min-width: 150px;
}

input, select {
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: 100%;
}

/* Custom AI Assistant styles */
.calculator-form .btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
  }

.usage-box {
    font-size: 1.2em;
    background: #f0f0f0;
    padding: 10px;
    border: 1px solid #ccc;
    margin: 10px 0;
    border-radius: 5px;
    text-align: center;
}

/* Hlasové diktování */
.voice-btn.listening {
    background-color: #dc2626 !important;
    animation: pulse 1.5s infinite;
}

.voice-btn.listening:hover {
    background-color: #b91c1c !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.voice-status {
    transition: opacity 0.3s ease;
}

/* Denní poznámky */
.journal-note {
    line-height: 1.5;
    word-wrap: break-word;
}

.edit-journal, .delete-journal {
    transition: transform 0.2s ease;
}

.edit-journal:hover, .delete-journal:hover {
    transform: scale(1.1);
}