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

/* Body Styling */
html, body {
  height: 100%; 
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f8f5ff; /* Reverted to White */
  color: #222;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff; /* Reverted to White */
  padding: 10px 30px;
  border-bottom: 1px solid #342f8f; /* Restored the blue border */
  position: relative; 
  z-index: 100; 
}

/* Logo */
#logo {
  display: block;
  width: 150px; 
  height: 70px;
}

/* Logo Image */
#logo img {
  position: absolute;
  left: 30px;         
  top: 50%;           
  transform: translateY(-50%); 
  height: 200px;     
  width: auto;
  z-index: 101;
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;  
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: #000000;
  transition: color 0.3s;
}

nav a:hover {
  color: #342f8f; 
}

/* Profile icon */
nav img {
  vertical-align: middle;
  border-radius: 50%;
  background-color: #ffffff;
  padding: 3px;
  display: block;       
  height: 40px;
  width: 40px;
  object-fit: cover;    
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

/* Headings - UPDATED: Changed from Green to Blue */
main h1 {
  color: #342f8f; 
  margin-bottom: 20px;
}

main h2 {
  color: #342f8f; 
  margin-top: 30px;
}

/* Default Buttons - UPDATED: All Blue */
button {
  background-color: #342f8f;
  color: #fff;
  border: none;
  padding: 10px 20px;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #2a2675; 
}

input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Footer */
footer {
  text-align: center;
  background-color: #342f8f;
  color: #ffffff;
  padding: 10px;
  font-size: 0.9em;
  margin-top: auto; 
}

/* --------------------------------------------------------- */
/* LAYOUT FIXES (Sticky Footer & Centering)            */
/* --------------------------------------------------------- */

#login-warning {
  flex: 1; 
  display: flex !important; 
  flex-direction: column;
  justify-content: center;  
  align-items: center;      
  width: 100%;
  padding: 20px;
  text-align: center;
}

#login-warning[style*="display: none"] {
    display: none !important;
}

#content, #challenge-app {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;          
  justify-content: flex-start;  
  padding: 40px 20px;
}

#content[style*="display: none"], 
#challenge-app[style*="display: none"] {
    display: none !important;
}
