/** @format */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --bg-dark: #121417;
  --card-bg: #1c1f24;
  --primary-accent: #2ecc71;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --border-color: #2d323a;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  margin: 0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: "Inter", sans-serif;
}

h1 {
  font-weight: 400;
  letter-spacing: 3px;
}

h2,
h3 {
  font-weight: 300;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.app-container {
  width: 100%;
  max-width: 500px;
  padding: 2rem 1rem;
}

.main-header {
  text-align: center;
  margin-bottom: 2rem;
}

.team-tag {
  background: var(--primary-accent);
  color: #000;
  padding: 0.2rem 0.6rem;
  font-weight: 800;
  font-size: 0.7rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.main-stat {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(145deg, #1c1f24, #121417);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.main-stat .label {
  color: var(--text-muted);
  letter-spacing: 2px;
  font-size: 0.8rem;
  margin: 0;
}

.main-stat h2 {
  font-size: 3.5rem;
  margin: 0.5rem 0 0 0;
  color: var(--primary-accent);
}

.card {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

input {
  background: #0f111a;
  border: 1px solid var(--border-color);
  padding: 0.8rem;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
}

input:focus {
  outline: none;
  border-color: var(--primary-accent);
}

.btn-primary {
  width: 100%;
  background-color: var(--primary-accent);
  color: #000;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease;
  font-family: "Inter", sans-serif;
  letter-spacing: 1px;
}

.btn-secondary {
  width: 100%;
  background-color: var(--bg-dark);
  color: var(--primary-accent);
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease;
  font-family: "Inter", sans-serif;
  letter-spacing: 1px;
}

.btn-primary:active {
  transform: scale(0.98);
}

.history-list {
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
  border-bottom: none;
}

.match-info strong {
  display: block;
  font-size: 0.9rem;
}

.match-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.match-stats span {
  background: #0f111a;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-left: 0.5rem;
  font-weight: bold;
}

.match-stats .wickets {
  color: var(--primary-accent);
}

.action-buttons {
  display: flex;
  gap: 4px;
  align-items: center;
}

.edit-btn,
.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.edit-btn {
  color: #0984e3;
  font-size: 1.1rem;
}

.edit-btn:hover {
  color: #74b9ff;
  background-color: rgba(9, 132, 227, 0.1);
}

.delete-btn {
  color: #d63031;
  font-size: 1.3rem;
}

.delete-btn:hover {
  color: #ff7675;
  background-color: rgba(214, 48, 49, 0.1);
}

.edit-btn:active,
.delete-btn:active {
  transform: scale(0.9);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.3s;
}
.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.modal-box {
  background: var(--border-color);
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
}
#modal-cancel {
  background: #dfe6e9;
}

#modal-confirm {
  background: #d63031;
  color: white;
}

@media (max-width: 600px) {
  .row {
    flex-direction: column;
    gap: 1.2rem;
  }

  h1 {
    font-size: 2rem;
  }

  .main-stat h2 {
    font-size: 1.5rem;
  }

  .app-container {
    padding: 1rem;
  }

  .modal-box {
    max-width: 200px;
  }
}

@media (min-width: 900px) {
  .app-container {
    max-width: 1100px;
  }

  .content-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
