/* General Reset */
body, h1, h2, h3, p, ul, ol, li, form, input, button, textarea, a {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Body Styling with Pattern */
body {
  /* Base background color */
  background-color: #f4f4f4;
  
  /* Rotated squares pattern with gradient overlay */
  background-image: 
      linear-gradient(to bottom, rgba(244, 244, 244, 0.8) 0%, rgba(255, 255, 255, 1) 100%),
      linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0),
      linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  background-position: 0 0, 0 0, 20px 20px;
  background-attachment: fixed;
  
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation Bar */
header {
  background-color: #414758;
  color: white;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-right: 2rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  padding: 0.5rem;
}

nav ul li a:hover {
  color: #D8C3A5;
}

.user-welcome {
  color: white;
  font-weight: bold;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 1rem;
  background: transparent;
}

/* Layout container */
.main-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  background: transparent;
}

/* Content (Left) Container */
.content-container {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.content-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6C567B, #9A8C98, #6C567B);
  opacity: 0.7;
}

.content-container h1 {
  color: #333;
  margin-bottom: 1.2rem;
  text-align: center;
}

.stock-search {
  margin-bottom: 1.5rem;
  text-align: center;
}

.stock-search label {
  margin-right: 0.5rem;
  font-weight: bold;
}

input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 200px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fafafa;
}

input:focus {
  border-color: #9A8C98;
  outline: none;
  box-shadow: 0 0 0 3px rgba(154, 140, 152, 0.2);
  background-color: white;
}

/* Buttons */
.primary-button {
  background: #9A8C98;
  color: white;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.primary-button:hover {
  background: #6C567B;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-container {
  margin: 1rem 0;
  background: white;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
}

.error-message {
  color: red;
  font-weight: bold;
  text-align: center;
  margin: 1rem 0;
}

/* Side Container */
.side-container {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.side-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6C567B, #9A8C98, #6C567B);
  opacity: 0.7;
}

.side-container h2 {
  text-align: center;
  margin-bottom: 1.2rem;
  color: #333;
}

/* Stock Buttons in Side Container */
.stock-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.collection-button {
  width: 100%;
  transition: transform 0.2s ease;
}

.collection-button:hover {
  transform: translateY(-2px);
}

/* Collection List */
.collection-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.collection-item {
  background: #f9f9f9;
  padding: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #e0e0e0;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.collection-item:hover {
  background: #f0f0f0;
  transform: translateX(2px);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 1000px) {
  .main-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  
  nav ul {
    margin-bottom: 0.5rem;
  }
  
  .user-welcome {
    align-self: flex-end;
    margin-top: -2rem;
  }
  
  .stock-search {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  input, .primary-button {
    width: 100%;
    max-width: 300px;
  }
}

/* Footer Styling */
.footer {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #666;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  border-top: 1px solid #e0e0e0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.copyright {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.footer-note {
  font-size: 0.8rem;
  color: #888;
}

@media (max-width: 768px) {
  .copyright {
    font-size: 0.8rem;
  }
  
  .footer-note {
    font-size: 0.75rem;
  }
}