/*Murad Muradov & Shreeya Prasanna*/
/*13.02.2026*/
/* Styles for the UI */

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

body {
  background-image: url("../images/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  height: 100vh;
  overflow: hidden;
  font-family: "Crimson Text", serif;
  color: #f5e6c8;
  display: flex;
  flex-direction: column;
}

header {
  height: 42px;
  background: rgba(8, 4, 0, 0.88);
  border-bottom: 3px solid #5a2e00;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
}

.header-btn {
  background: rgba(50, 25, 0, 0.9);
  border: 1px solid #7a3d00;
  color: #c8a443;
  font-family: "Cinzel", serif;
  font-size: 11px;
  padding: 5px 16px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-btn:hover {
  background: rgba(80, 40, 0, 0.95);
  color: #e8c460;
}

.news-ticker {
  flex: 1;
  text-align: center;
  font-family: "Cinzel", serif;
  font-size: 12px;
  color: #f5e6c8;
  letter-spacing: 1px;
  padding: 0 20px;
}

main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

#left-panel {
  width: 380px;
  min-width: 380px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 3px solid #3d1f00;
  overflow: hidden;
}

#column1 {
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 2;
}

#column2 {
  position: absolute;
  right: 0;
  top: 0;
  width: 52px;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  z-index: 2;
}

#score-section {
  width: 100%;
  text-align: center;
  padding: 14px 60px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 2px solid #3d1f00;
  z-index: 3;
  flex-shrink: 0;
}

#score-section .stage-name {
  font-family: "Cinzel", serif;
  font-size: 13px;
  color: #c8a443;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

#score-section .note-count {
  font-family: "Cinzel", serif;
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(200, 164, 67, 0.45);
}

#score-section .per-second {
  font-size: 13px;
  color: #c8a443;
  margin-top: 3px;
}

#guitar-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  padding: 0 60px;
}

#guitar {
  width: 280px;
  height: auto;
  cursor: pointer;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 0 20px rgba(200, 164, 67, 0.2));
  transition:
    transform 0.08s ease,
    filter 0.08s ease;
}

#guitar:hover {
  filter: drop-shadow(0 0 35px rgba(200, 164, 67, 0.5)) brightness(1.07);
}

#guitar:active {
  transform: scale(0.92) rotate(-2deg);
  filter: drop-shadow(0 0 50px rgba(200, 164, 67, 0.85)) brightness(1.18);
}

#horizont_column1 {
  width: 100%;
  height: 34px;
  object-fit: fill;
  display: block;
  flex-shrink: 0;
  z-index: 3;
}

#center-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 3px solid #3d1f00;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.panel-tabs {
  display: flex;
  background: rgba(8, 4, 0, 0.75);
  border-bottom: 2px solid #3d1f00;
  flex-shrink: 0;
}

.tab {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c8a443;
  padding: 10px 20px;
  cursor: pointer;
  background: transparent;
  border: none;
  border-right: 1px solid #3d1f00;
}

.tab:hover,
.tab.active {
  background: rgba(50, 25, 0, 0.6);
  color: #e8c460;
}

#center-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  scrollbar-width: thin;
  scrollbar-color: #3d1f00 transparent;
}

#center-log::-webkit-scrollbar {
  width: 5px;
}
#center-log::-webkit-scrollbar-track {
  background: transparent;
}

#center-log::-webkit-scrollbar-thumb {
  background: #3d1f00;
  border-radius: 3px;
}

.log-entry {
  background: rgba(20, 10, 0, 0.65);
  border: 1px solid #3d1f00;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #f5e6c8;
}

.log-entry .log-title {
  font-family: "Cinzel", serif;
  font-size: 12px;
  color: #c8a443;
  margin-bottom: 3px;
  letter-spacing: 1px;
}

#right-panel {
  width: 300px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  background: rgba(4, 2, 0, 0.9);
  overflow: hidden;
}

#store-title {
  text-align: center;
  padding: 11px;
  background: rgba(8, 4, 0, 0.95);
  border-bottom: 2px solid #7a3d00;
  flex-shrink: 0;
}

#store-title h2 {
  font-family: "Cinzel", serif;
  font-size: 22px;
  font-weight: 900;
  color: #e8c460;
  letter-spacing: 6px;
  text-shadow: 0 0 10px rgba(200, 164, 67, 0.35);
}

#buy-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid #3d1f00;
  flex-shrink: 0;
}

#buy-bar .bar-label {
  font-family: "Cinzel", serif;
  font-size: 11px;
  color: #c8a443;
  letter-spacing: 1px;
}

.qty-btn {
  background: rgba(50, 25, 0, 0.9);
  border: 1px solid #7a3d00;
  color: #c8a443;
  font-family: "Cinzel", serif;
  font-size: 10px;
  padding: 3px 9px;
  cursor: pointer;
}

.qty-btn:hover {
  background: rgba(80, 40, 0, 0.95);
  color: #fff;
}

#store-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3d1f00 transparent;
}

#store-list::-webkit-scrollbar {
  width: 5px;
}

#store-list::-webkit-scrollbar-track {
  background: transparent;
}

#store-list::-webkit-scrollbar-thumb {
  background: #3d1f00;
  border-radius: 3px;
}

.store-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(50, 25, 0, 0.5);
  cursor: pointer;
  transition: background 0.12s;
}

.store-row:hover {
  background: rgba(50, 25, 0, 0.5);
}

.store-row.locked {
  opacity: 0.35;
  cursor: default;
}

.store-row.locked:hover {
  background: transparent;
}

.store-thumb {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: rgba(20, 10, 0, 0.8);
  border: 1px solid #5a2e00;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.store-thumb img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.store-thumb.locked-thumb {
  filter: brightness(0.2) grayscale(1);
}

.store-info {
  flex: 1;
  min-width: 0;
}

.store-name {
  font-family: "Cinzel", serif;
  font-size: 12px;
  color: #e8c460;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-cost {
  font-size: 12px;
  color: #f5e6c8;
  margin-top: 2px;
}

.store-count {
  font-family: "Cinzel", serif;
  font-size: 18px;
  font-weight: 700;
  color: #f5e6c8;
  min-width: 26px;
  text-align: right;
}

.locked-text {
  color: #333;
}

#center-tabs {
  display: flex;
  background: rgba(8, 4, 0, 0.75);
  border-bottom: 2px solid #3d1f00;
  flex-shrink: 0;
}

.center-tab {
  font-family: "Cinzel", serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c8a443;
  padding: 10px 20px;
  cursor: pointer;
  background: transparent;
  border: none;
  border-right: 1px solid #3d1f00;
}

.center-tab:hover,
.center-tab.active {
  background: rgba(50, 25, 0, 0.6);
  color: #e8c460;
}

.tab-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
}

.scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #3d1f00;
}

.score-card {
  background: rgba(10, 5, 0, 0.75);
  padding: 18px;
}

.score-card-label {
  font-family: "Cinzel", serif;
  font-size: 10px;
  color: #c8a443;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.score-card-value {
  font-family: "Cinzel", serif;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 14px rgba(200, 164, 67, 0.4);
}

#rewards-list {
  flex: 1;
  overflow-y: auto;
}

.reward-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(50, 25, 0, 0.4);
}

.reward-badge {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 2px solid #7a3d00;
  background: rgba(20, 10, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel", serif;
  font-size: 18px;
  font-weight: 900;
  color: #c8a443;
}

.reward-info {
  flex: 1;
}

.reward-name {
  font-family: "Cinzel", serif;
  font-size: 12px;
  color: #e8c460;
}

.reward-desc {
  font-size: 12px;
  color: #a07848;
  margin-top: 2px;
}

.reward-status {
  font-family: "Cinzel", serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #5a3a10;
}

.locked-reward {
  opacity: 0.5;
}

.reward-row.unlocked {
  opacity: 1;
}
.reward-row.unlocked .reward-badge {
  border-color: #c8a443;
  color: #e8c460;
  box-shadow: 0 0 10px rgba(200, 164, 67, 0.4);
}
.reward-row.unlocked .reward-status {
  color: #c8a443;
}

.help-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
}

.help-overlay.visible {
  display: flex;
  animation: popupFadeIn 0.3s ease;
}

.help-overlay-inner {
  background: rgba(10, 5, 0, 0.97);
  border: 2px solid #c8a443;
  border-radius: 4px;
  padding: 36px 44px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 0 40px rgba(200, 164, 67, 0.25);
  animation: popupBounce 0.4s ease;
}

.help-overlay-title {
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #e8c460;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 24px;
  text-shadow: 0 0 10px rgba(200, 164, 67, 0.4);
}

.help-overlay-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 26px;
}

.help-section {
  border-left: 2px solid #7a3d00;
  padding-left: 14px;
}

.help-section-title {
  font-family: "Cinzel", serif;
  font-size: 12px;
  color: #c8a443;
  letter-spacing: 1px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.help-section p {
  font-size: 13px;
  color: #f5e6c8;
  line-height: 1.6;
}

.help-overlay-close {
  font-family: "Cinzel", serif;
  display: block;
  width: 100%;
  background: rgba(50, 25, 0, 0.9);
  color: #e8c460;
  border: 1px solid #7a3d00;
  border-radius: 2px;
  padding: 11px 30px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  text-align: center;
}

.help-overlay-close:hover {
  background: rgba(80, 40, 0, 0.95);
  color: #fff;
}

.level-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.level-popup.visible {
  display: flex;
  animation: popupFadeIn 0.3s ease;
}

.level-popup-inner {
  background: rgba(10, 5, 0, 0.95);
  border: 2px solid #c8a443;
  border-radius: 4px;
  padding: 36px 44px;
  text-align: center;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 0 40px rgba(200, 164, 67, 0.25);
  animation: popupBounce 0.4s ease;
}

.level-popup-title {
  font-family: "Cinzel", serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #e8c460;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(200, 164, 67, 0.4);
}

.level-popup-message {
  font-size: 0.95rem;
  color: #f5e6c8;
  line-height: 1.5;
  margin-bottom: 22px;
}

.level-popup-close {
  font-family: "Cinzel", serif;
  background: rgba(50, 25, 0, 0.9);
  color: #e8c460;
  border: 1px solid #7a3d00;
  border-radius: 2px;
  padding: 9px 30px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.level-popup-close:hover {
  background: rgba(80, 40, 0, 0.95);
  color: #fff;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popupBounce {
  0% {
    transform: scale(0.75);
    opacity: 0;
  }
  60% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.floating-note {
  position: absolute;
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #e8c460;
  pointer-events: none;
  z-index: 100;
  text-shadow: 0 0 6px rgba(200, 164, 67, 0.5);
  animation: floatUp 0.9s ease-out forwards;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-55px);
  }
}

.log-reward {
  background: rgba(200, 164, 67, 0.1);
  border-left: 3px solid #c8a443;
  transition: opacity 0.6s ease;
}

.log-reward .log-title {
  color: #e8c460;
}

.log-fade-out {
  opacity: 0;
}

.unlocked-reward {
  opacity: 1;
}

.unlocked-reward .reward-badge {
  border-color: #c8a443;
  color: #e8c460;
  font-size: 1.3rem;
  box-shadow: 0 0 10px rgba(200, 164, 67, 0.35);
}

.unlocked-reward .reward-status {
  color: #c8a443;
}

.store-row.affordable {
  background: rgba(200, 164, 67, 0.06);
}

.store-row:not(.affordable):not(.locked) {
  opacity: 0.8;
}

.store-row:not(.affordable):not(.locked) .store-cost {
  color: #a05a5a;
}
