/* ========== Global ========== */
body {
    margin: 0;
    font-family: 'Inknut Antiqua', serif;
    background-color: #1f2b50;
    color: white;
}

/* ========== Header/Nav ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2473ff;
    padding: 20px;
}
.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}
.logo span {
    color: lightblue;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin-left: auto;
}
nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}
nav ul li a.logout {
    color: white;
    background-color: #ff5b5b;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
}

/* ========== Sidebar ========== */
.sidebar {
    background-color: #2e5fff;
    width: 180px;
    font-weight: bold;
    position: absolute;
    top: 150px; 
    left: 0;
    height: calc(100vh - 150px); 
    padding: 20px;
    border-radius: 0 10px 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}
#liftList {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
.lift-item {
    margin-bottom: 12px;
}
.lift-box {
    background-color: #2e5fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.lift-box:hover {
    background-color: #1f2b50;
}
.lift-name {
    font-size: 0.95rem;
    font-weight: bold;
    color: white;
}
.lift-arrow {
    font-size: 0.85rem;
    color: white;
}

/* ========== Main Content ========== */
.content {
    margin-left: 210px;
    padding: 30px;
    padding-top: 40px;
}
.content-section {
    background-color: #2a447d;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Section titles */
.content-section h2 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: lightblue;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

/* ========== Lift Details Grid ========== */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.details-grid div {
    background-color: #3c4e8b;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* ========== Performance Metrics Grid ========== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px; /* slightly more breathing room between cards */
  margin-top: 10px;
}

/* Individual metric cards */
.metric-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #3c4e8b;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Icon styling */
.metric-card .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  opacity: 0.95;
}

/* Metric text container */
.metric-content {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.metric-content .label {
  font-weight: 500;
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 2px;
}

.metric-content .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.metric-content .unit {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-left: 2px;
}

/* Thematic icon colors */
.metric-card.speed .icon { color: #1abc9c; }
.metric-card.maxspeed .icon { color: #e67e22; }
.metric-card.consistency .icon { color: #3498db; }
.metric-card.fatigue .icon { color: #e74c3c; }
.metric-card.tension .icon { color: #f1c40f; }
.metric-card.power .icon { color: #9b59b6; }


/* ========== Velocity Profile Section ========== */
#velocityGraph {
    background-color: #3c4e8b;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 200px;
}

/* ========== Gemini Feedback Section ========== */
#geminiText {
    background-color: #3c4e8b;
    border-radius: 8px;
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ========== Upload Button ========== */
#upload-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    font-family: 'Inknut Antiqua', serif;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-weight: bold;
    z-index: 1000;
}

/* ========== Modals ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}
.modal-content {
  background-color: #6c6c6c; /* back to gray */
  margin: 5% auto;
  padding: 30px;
  border-radius: 15px;
  width: 60%;
  max-width: 700px;
  position: relative;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  text-align: left;
  color: white;
}
.modal-content h2 {
  text-align: center;
  margin-bottom: 20px;
  color: lightblue;
}
.close-btn {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* ========== Modal Form Layout ========== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-weight: bold;
  margin-bottom: 5px;
}
.form-group input,
.form-group select {
  padding: 10px;
  border-radius: 6px;
  border: none;
  background-color: #fff;  /* white input background */
  color: #000;             /* black text */
}
.form-group input::placeholder {
  color: #666;
}
.submit-btn {
  grid-column: 1 / -1;
  padding: 12px;
  background-color: #28a745;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.submit-btn:hover {
  background-color: #218838;
}
.note {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #ddd;
}

/* ========== Loading Modal ========== */
#loadingModal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    text-align: center;
}
.loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #28a745;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: auto;
}
#loadingModal p {
    color: white;
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== Velocity Graph ========== */
#velocityProfile {
  text-align: center;
}

#velocityGraph {
  width: 100%;
  max-width: 800px;
  height: 300px;
  margin: 20px auto;
  display: block;
  background-color: #3c4e8b;
  border-radius: 8px;
  padding: 10px;
}