/* voting.css */

/* Reset and global styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  color: #333;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 400px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.user-info {
  font-size: 0.9rem;
  color: #666;
}

/* Card stack */
.card-stack {
  position: relative;
  width: 100%;
  height: 500px;
  margin-bottom: 20px;
}

.card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  background: #fff;
  cursor: grab;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: 70%;
  object-fit: cover;
}

.card .meta {
  padding: 10px;
}

.card .meta h2 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.card .meta p {
  font-size: 0.9rem;
  color: #666;
}

/* Badges */
.badge {
  position: absolute;
  top: 20px;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 5px 10px;
  border: 2px solid;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
}

.badge.like {
  left: 20px;
  border-color: #28a745;
  color: #28a745;
}

.badge.nope {
  right: 20px;
  border-color: #dc3545;
  color: #dc3545;
}

/* Controls */
.controls {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn {
  flex: 1 1 30%;
  margin: 5px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #007bff;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: #0056b3;
}

/* History */
.history {
  margin-top: 10px;
}

.history h2 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.list {
  margin-bottom: 10px;
}

.list strong {
  display: block;
  margin-bottom: 5px;
}

.person-item {
  display: inline-block;
  text-align: center;
  margin-right: 5px;
  margin-bottom: 5px;
}

.person-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin-bottom: 3px;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  width: 90%;
  max-width: 350px;
  text-align: center;
}

.modal-content input {
  width: 80%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
}

.modal-buttons button {
  flex: 1 1 40%;
  margin: 5px;
  padding: 8px;
  border: none;
  border-radius: 5px;
  background: #007bff;
  color: #fff;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 500px) {
  .card-stack {
    height: 400px;
  }

  .btn {
    font-size: 0.9rem;
  }

  .person-item img {
    width: 50px;
    height: 50px;
  }

  .card .meta h2 {
    font-size: 1rem;
  }

  .card .meta p {
    font-size: 0.8rem;
  }
}
