@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

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

body {
  font-family: 'Roboto', sans-serif;
  background-color: #121212;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background-color: #181818;
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2a2a2a;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #e0e0e0;
}

.user-icon {
  width: 28px;
  height: 28px;
  background: #383838;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #bbb;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
}

.header-logout {
  background: none;
  border: none;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 4px;
}

.header-logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Main Grid Layout */
main {
  flex: 1;
  padding: 16px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  height: 380px;
  border-radius: 12px;
  overflow: hidden;
  background-color: #1e1e1e;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.card:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(106, 53, 156, 0.4);
}

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

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 0.5px;
}

/* Bottom Status Bar */
footer {
  background-color: #e5dfec;
  color: #2b2738;
  padding: 8px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
}

/* Modal Window for Analysis & Login */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #1e1e1e;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.form-control:focus {
  border-color: #7c4dff;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: #7c4dff;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: #651fff;
}

.result-box {
  background: #121212;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  margin-top: 16px;
  border: 1px solid #3a3a3a;
}
