@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Young+Serif&display=swap");

:root {
  --primary: #1e3a8a; /* Deep blue */
  --secondary: #3b82f6; /* Bright blue */
  --accent: #10b981; /* Green for buttons */
  --error: #8b0000; /* Red for errors */
  --background: #f9fafb; /* Light gray background */
  --card-bg: #ffffff; /* White cards */
  --text: #1f2937; /* Dark gray text */
  --text-light: #6b7280; /* Light gray text */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.5;
  margin: 0;
  background: var(--background);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#progresscontainer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--background);
  z-index: 1000;
  transition: opacity 0.3s ease;
}

#progressbar {
  height: 100%;
  width: 0;
  background: var(--secondary);
  transition: width 0.3s ease;
}

#loading {
  display: none;
  margin: 40px auto;
  width: 60px;
  height: 60px;
  background-image: url(//lokowebdesign.com/wp-content/uploads/2019/06/favicon.png);
  background-size: cover;
  animation: rotation 1.5s infinite ease-in-out reverse;
}

#body.loading #loading {
  display: block;
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

h1,
h2,
h3,
h4,
label {
  font-family: "Young Serif", serif;
  color: var(--primary);
  margin: 0;
}

h1 {
  font-size: clamp(32px, 4vw, 40px);
  text-align: center;
  margin: 20px 0 30px;
}

h2,
label {
  font-size: clamp(24px, 3vw, 28px);
  margin-bottom: 15px;
}

h3 {
  font-size: clamp(20px, 2.5vw, 24px);
}

h4 {
  font-size: clamp(18px, 2vw, 20px);
  margin-bottom: 10px;
}

label small {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--text-light);
  font-style: italic;
  display: block;
  margin-top: 5px;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:active {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

input[type="submit"] {
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

input[type="submit"]:hover {
  background: #059669;
  transform: translateY(-1px);
}

fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

legend {
  font-weight: 600;
  font-size: 16px;
  color: var(--primary);
}

.flex {
  display: flex;
  gap: 16px;
}

@media (max-width: 768px) {
  .flex {
    flex-direction: column;
  }
  .url,
  .articles {
    width: 100%;
  }
}

.uppercase {
  text-transform: uppercase;
}

#login,
#logout {
  display: block;
  text-align: right;
  font-size: 16px;
  color: var(--secondary);
}

#login:hover,
#logout:hover {
  color: var(--primary);
}

#loggedout {
  background: #fef3c7;
  color: var(--text);
  padding: 12px;
  text-align: center;
  font-weight: 500;
  border-radius: 8px;
  margin: 0 20px 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#loggedout.ng-hide {
  opacity: 0;
  height: 0;
  padding: 0;
}

#logo {
  max-width: 180px;
  margin: 0 auto;
  display: block;
}

#refresh {
  text-align: right;
  font-size: 14px;
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: 8px;
  margin: 0 0 20px;
}

#refresh a {
  color: var(--text-light);
}

#refresh a:hover {
  color: var(--text);
}

#body.loading section,
#body.loading #refresh,
#body.loading #alert {
  display: none;
}

section {
  margin-bottom: 20px;
}

.accordionTrigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.2s ease;
}

.accordionTrigger:hover {
  background: #f1f5f9;
}

@media (max-width: 768px) {
  .accordionTrigger {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.expand-collapse-icon {
  display: inline-block;
  font-size: 16px;
  color: var(--accent);
  vertical-align: 2px;
  transform: rotate(-45deg);
  transition: all 0.3s ease, color 0.2s ease;
}

.active .expand-collapse-icon {
  transform: rotate(0deg);
  color: var(--error);
}

.accordionContent {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordionContent.active {
  max-height: 2000px;
  padding: 20px 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 0 0 40px;
  list-style-type: none;
}

.grid > li {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid > li:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

.grid > li h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.grid > li .date {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.description {
  max-height: 200px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
}

.description::-webkit-scrollbar {
  width: 8px;
}

.description::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.description::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}

.description::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.source-logo {
  height: 40px;
  width: auto;
  vertical-align: middle;
  margin-right: 12px;
}

.icon-bin2 {
  float: right;
  font-size: 18px;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s ease;
}

.icon-bin2:hover {
  color: #ef4444;
}

.error {
  color: #ef4444;
  font-size: 14px;
}

#frontendfocus td,
#frontendfocus p {
  color: var(--text) !important;
}

#frontendfocus a[style] {
  color: var(--secondary) !important;
}

#frontendfocus a[style]:hover {
  color: var(--primary) !important;
}

footer {
  background: var(--text-light);
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
}

#body.loading #myfcst-fcst,
#body.loading footer,
#body.loading #logout,
#body.loading #login,
#body.loading #loggedout {
  display: none;
}
