/* =========================
   VARIABLES & GLOBAL RESET
========================= */
:root {
  --bg: #f5f7fa;
  --text: #1f2937;
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --font: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.container.main h1{
  margin-bottom: 84px;
}

/* =========================
   HEADER
========================= */
header {
  background: white;
  box-shadow: var(--shadow);
  width: 100%;
}

.header-inner {
  position: relative;          /* for absolute nav centering */
  display: flex;
  align-items: center;
  padding: 0 40px;            /* space on left & right edges */
  height: 70px;               /* consistent header height */
  background: white;
}


/* Logo fully left */
.logo {
  font-size: 1.5rem;
  font-weight: 600;
  z-index: 1;                 /* keeps it above nav if needed */
}

/* Nav links perfectly centered relative to page */
.nav-wrapper {
  display: flex;
  gap: 30px;
  position: absolute;         /* absolute to center relative to page */
  left: 50%;
  transform: translateX(-50%);
}

.nav-wrapper a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.nav-wrapper a:hover {
  color: var(--primary);
}

/* =========================
   HERO / TITLE
========================= */
.title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-top: 35px;
}

.subtitle {
  text-align: center;
  margin-top: 8px;
  font-size: 1.1rem;
  color: #4b5563;
}

/* =========================
   TABS
========================= */
.tabs {
  display: flex;
  margin-top: 30px;
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab {
  padding: 12px 25px;
  border: none;
  background: #E5E7EB;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
}

.tab:hover {
  background: #D1D5DB;
}

.tab.active {
  background: var(--primary);
  color: white;
}

/* =========================
   INPUT SECTIONS
========================= */
.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px; /* spacing between boxes and button */
  width: 100%;
  max-width: 900px;
  margin: 0 auto; /* center everything */
}

.input-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 25px;
}

.card {
  background: var(--card-bg);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

textarea,
input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px solid color(#9ca3af);
  border-radius: var(--radius);
  font-family: var(--font);
  margin-bottom: 20px;
}

textarea {
  height: 220px;
  resize: vertical;
}

.input-box,
.upload-box {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-top: 40px;
}

.upload-box input[type="file"] {
  margin-top: auto;
}

/* =========================
   BUTTON
========================= */
button#summarize-btn {
  width: 100%;
  font-size: 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: white;
  font-weight: 600;
  margin-top: 15px;
  padding: 12px 20px;
  height: 50px;
}

button#summarize-btn:hover {
  background: var(--primary-dark);
}

/* =========================
   OUTPUT SECTION
========================= */
.output {
  display: none;
  margin-top: 25px;
}

.output h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.output p {
  line-height: 1.7;
  white-space: pre-line;
}

/* =========================
   HIDDEN CLASS
========================= */
.hidden {
  display: none;
}
/* =========================
   RESPONSIVE DESIGN
========================= */
@media (min-width: 800px) {
  .input-section {
    flex-direction: row;
    gap: 20px;
  }

  .input-box,
  .upload-box {
    flex: 1;
  }
}

@media(max-width: 600px) {
  .title {
    font-size: 1.6rem;
  }

  .tabs {
    flex-direction: column;
  }

  .tab {
    text-align: center;
  }
}

/* =========================
   FOOTER
========================= */
footer {
  width: 100%;
  padding: 15px 20px;
  font-size: 0.9rem;
  color: #6b7280;
  display: flex;
  justify-content: flex-end;
}

/* =========================
   MAIN
========================= */
.main {
  flex: 1;
  margin-top: 40px;
}

/* =========================
   Drag n Drop
========================= */
#drop-area {
  flex: 1;
  border: 2px dashed #9ca3af;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-align: center;
  padding: 20px;
  transition: background 0.2s, border-color 0.2s;
  min-height: 220px; /* same height as textarea */
  background: var(--card-bg);
}

#drop-area.dragover {
  background: #f3f4f6;
  border-color: var(--primary);
}

#drop-area p {
  margin: 8px 0;
  color: #4b5563;
}

#drop-area a {
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}
