/* Shared styles for user-facing pages */

/* Base typography and layout */
body {
  font-family: Arial, sans-serif;
  margin: 0;
}

/* Index page specific layout */
body.index-page {
  background: #fafafa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Login page specific */
body.login-page {
  background-color: #f2f2f2;
}

/* Signup page specific */
body.signup-page {
  font-family: 'Segoe UI', sans-serif;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

/* Navigation bar */
.navbar {
  background-color: #6b1e1e;
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
body.index-page .navbar {
  padding: 15px 30px;
}
.navbar a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: bold;
}
.navbar a:hover {
  text-decoration: underline;
}
/* Highlighted search link */
.navbar a.search-link {
  background-color: #ffffff;
  color: #6b1e1e;
  padding: 5px 10px;
  border-radius: 4px;
  margin-left: 20px;
}
.navbar a.search-link:hover {
  background-color: #f0f0f0;
  text-decoration: none;
}

/* Login form container */
.container {
  max-width: 400px;
  margin: 60px auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h1 {
  margin-top: 0;
  color: #3b5998;
  text-align: center;
}

h2 {
  text-align: center;
  color: #333;
}

input {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

.signup-container input {
  padding: 0.8rem;
  margin: 0.5rem 0;
  border-radius: 5px;
}

button {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background-color: #6b1e1e;
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.signup-container button {
  background: #3b5998;
  padding: 0.8rem;
  margin-top: 1rem;
  border-radius: 5px;
  font-size: 1rem;
}
button:hover,
.signup-container button:hover {
  background-color: #8c2b2b;
}
.signup-container button:hover {
  background: #2d4373;
}

.note {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}
.note a {
  color: #6b1e1e;
  text-decoration: none;
}
.note a:hover {
  text-decoration: underline;
}

.link {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}
.link a {
  color: #3b5998;
  text-decoration: none;
}

.error {
  color: red;
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

/* Hero section on index page */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(to bottom right, #b35252, #7c2020);
  color: #333;
}
.hero h2 {
  font-size: 36px;
  margin-bottom: 20px;
}
.hero p {
  font-size: 18px;
  max-width: 600px;
  margin-bottom: 30px;
}
.buttons a {
  display: inline-block;
  background-color: #6b1e1e;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  margin: 10px;
  font-weight: bold;
}
.buttons a:hover {
  background-color: #8c2b2b;
}

footer {
  background: #eee;
  text-align: center;
  padding: 15px;
  font-size: 14px;
}

/* Signup specific container */
.signup-container {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

/* Keyboard focus styles */
.a11y-focus,
a:focus,
button:focus {
  outline: 3px solid #ff9800;
  outline-offset: 2px;
}
/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  width: auto;
  height: auto;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
}

/* Profile page layout */
body.profile-page {
  background: #f9f9f9;
  padding: 20px;
}

body.profile-page .section {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

body.profile-page button {
  width: auto;
  background-color: #007bff;
  border-radius: 8px;
  padding: 10px 20px;
}

body.profile-page button:hover {
  background-color: #0056b3;
}

body.profile-page h1 {
  color: #6b1e1e;
}

body.profile-page .navbar {
  margin-bottom: 20px;
}

body.profile-page input[type="email"],
body.profile-page input[type="password"] {
  width: 100%;
  padding: 8px;
  margin: 5px 0 15px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

body.profile-page #profile-pic {
  max-width: 150px;
  display: block;
  margin-bottom: 10px;
}

.message {
  display: none;
  margin: 10px 0;
  padding: 10px;
  border-radius: 5px;
  background: #e6ffe6;
}

.message.error {
  background: #ffe6e6;
}

#incoming-requests button,
#outgoing-requests button {
  margin-left: 5px;
}

#friends-list button {
  margin-left: 5px;
}

/* Loading spinner */
.spinner {
  display: none;
  width: 24px;
  height: 24px;
  margin: 10px auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #6b1e1e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

