@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap'); /* Added 300 weight */

/* --- GLOBAL STYLES --- */

html {
  background-color: #0a0a0a; /* Ensures the very bottom layer of the browser is dark */
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a); /* Deeper, cleaner dark background */
  background-color: #0a0a0a; /* Fallback and color for overscroll */
  overscroll-behavior: none;  /* Stops the "bounce" and white gap */
  color: #f0f0f0; 
  text-align: center;
  margin: 0;
  min-height: 100vh;
  padding-top: 70px; 
  transition: background 0.5s;
}
a {
  color: #00ff9f; /* Bright accent color */
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #4dffb4;
  text-decoration: underline;
}

h1 {
  font-size: 2.8rem; 
  color: #00ff9f;
  text-shadow: 0 0 15px rgba(0, 255, 159, 0.8), 0 0 5px rgba(0, 255, 159, 0.6); /* Stronger glow */
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.main-content {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}


/* --- NAVIGATION STYLES --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95); 
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-link {
    color: #b0b0b0;
    text-decoration: none;
    margin: 0 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: 0.3s ease;
    font-weight: 400;
}

.nav-link:hover {
    color: #00ff9f;
    background: #1e1e1e;
    text-decoration: none;
}

.nav-link.active {
    background: #00ff9f;
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 255, 159, 0.4);
}


/* --- FORM AND INPUT STYLES --- */
form {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem; 
  flex-wrap: wrap;
}

.input-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

input {
  padding: 0.8rem; 
  border: 1px solid #333;
  border-radius: 8px;
  width: 220px; 
  background: #1a1a1a;
  color: #f0f0f0;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus {
    border-color: #00ff9f;
    box-shadow: 0 0 8px rgba(0, 255, 159, 0.7);
    outline: none;
}

button {
  background: #00ff9f;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  color: #1a1a1a;
  transition: 0.3s ease-in-out;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0, 255, 159, 0.5);
}

button:hover:not(:disabled) {
  background: #4dffb4;
  transform: translateY(-3px) scale(1.02); /* Lift and scale animation */
  box-shadow: 0 8px 20px rgba(0, 255, 159, 0.6);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}


/* --- STATS CONTAINER --- */
#stats {
  margin-top: 2.5rem; /* More spacing */
  background: #101010; /* Very dark background for stats */
  padding: 2rem; 
  border-radius: 16px; 
  box-shadow: 0 0 20px rgba(0, 255, 159, 0.4), 0 8px 40px rgba(0, 0, 0, 0.8); /* Stronger glow effect */
  display: inline-block;
  text-align: left;
  max-width: 1200px;
  width: 100%; 
  border: 1px solid #2e2e2e; 
  opacity: 0; /* Initial state for animation */
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* --- COMPARISON STYLES --- */
.comparison-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 800px) {
    .comparison-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.user-col {
    flex: 1;
    min-width: 300px;
    padding: 1.5rem;
    border-radius: 12px;
    background: #1e1e1e; 
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid #333;
}

.user-col:hover {
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.2);
    transform: translateY(-5px); /* Subtle lift on hover */
}

.col-header {
    text-align: center;
    color: #00ff9f;
    border-bottom: 2px solid #00ff9f;
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* --- HIGHLIGHTING STYLES --- */
.highlight-winner {
    background-color: #0f301d; 
    color: #4dffb4; 
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
    transition: background-color 0.3s;
    text-shadow: 0 0 5px rgba(77, 255, 180, 0.8);
    display: inline-block; /* Essential for highlighting text nodes */
}

.highlight-loser {
    background-color: #301414; 
    color: #ff6666; 
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
    opacity: 0.8; 
    transition: background-color 0.3s;
    display: inline-block;
}

.highlight-tie {
    background-color: #302a0f; 
    color: #ffee00; 
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
    opacity: 0.9; 
    display: inline-block;
}

/* Highlight key for comparison page */
.highlight-key {
    text-align: center;
    margin-top: 2rem;
    font-weight: 400;
    padding: 1rem;
    border-radius: 8px;
    background: #1e1e1e;
    border: 1px solid #2e2e2e;
}

.highlight-key span {
    margin: 0 10px;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
}


/* --- PROFILE AND INFO --- */
.profile {
  display: flex;
  align-items: center;
  gap: 1.5rem; 
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #333;
  margin-bottom: 1.5rem;
}

.profile img {
  width: 100px; 
  height: 100px;
  border-radius: 50%;
  border: 4px solid #00ff9f;
  box-shadow: 0 0 15px rgba(0, 255, 159, 0.8); /* Strong profile glow */
  transition: transform 0.4s ease;
}

.profile img:hover {
    transform: rotate(5deg) scale(1.05);
}

.profile h2 {
  font-size: 1.8rem;
}

.profile-btn {
    display: inline-block;
    background: #2e2e2e;
    color: #00ff9f;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 0.5rem;
    border: 1px solid #00ff9f;
}

.profile-btn:hover {
    background: #00ff9f;
    color: #1e1e1e;
    text-decoration: none;
}


.user-info {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
}

.user-info p {
    margin: 0.4rem 0; 
    line-height: 1.4;
    transition: color 0.3s;
}

.user-info p:hover {
    color: #00ff9f;
}

/* --- ACTIVITY SECTION --- */
.activity-section {
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
}

.activity-section h4 {
    margin: 0.8rem 0 0.4rem 0;
    color: #4dffb4;
    font-size: 1.1rem;
    font-weight: 600;
}

.activity-content {
    background: #242424;
    padding: 1rem;
    border-radius: 10px;
    font-style: italic;
    color: #ccc;
    white-space: pre-wrap;
    max-height: 120px; 
    overflow-y: auto;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    border: 1px solid #2e2e2e;
}


/* --- STATS GRID --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #333;
}

/* --- PROJECT HIGHLIGHTS --- */
.project-highlights-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between; 
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-box {
  background: #1e1e1e;
  padding: 1.2rem;
  border-radius: 10px;
  flex: 1 1 30%; 
  min-width: 250px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 159, 0.3);
}

.project-box h3 {
    color: #4dffb4;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.project-thumbnail {
    border-radius: 8px;
    border: 2px solid #00ff9f;
}

.project-title {
    font-weight: 700;
    margin-top: 0.5rem;
}

.project-stats {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #333;
    font-size: 0.95rem;
}

.comparison-project-summary {
    border-top: 1px solid #333;
    padding-top: 1rem;
    margin-top: 1rem;
}

.comparison-project-summary p {
    margin: 0.3rem 0;
}

.comparison-project-summary a {
    font-weight: 700;
}

.comparison-project-summary a.highlight-winner {
    font-weight: 900;
}

.project-btn {
    background: #00ff9f;
    color: #1a1a1a;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
}


/* --- FOOTER --- */
footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid #2e2e2e;
    text-align: center;
}


/* --- MEDIA QUERIES (Small Screen Adjustments) --- */
@media (max-width: 600px) {
    .nav-link {
        margin: 0 0.5rem;
    }
    .input-group input {
        width: 90%;
        max-width: 300px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .project-highlights-container {
        justify-content: center;
    }
    .project-box {
        flex: 1 1 90%;
    }
}


/* --- UX Feedback Styles (kept the same) --- */
.loading-spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: #00ff9f;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-message {
    text-align: center;
    background-color: #301414;
    color: #ff6666;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ff6666;
}

.notice-message {
    text-align: center;
    background-color: #302a0f;
    color: #ffee00;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
/* --- MODAL STYLES --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0;
    width: 100%; height: 100%; 
    background-color: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1a1a;
    margin: 15% auto;
    padding: 2rem;
    border: 2px solid #00ff9f;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: left;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 159, 0.3);
}

.close-btn {
    position: absolute;
    right: 20px; top: 10px;
    color: #888;
    font-size: 28px;
    cursor: pointer;
}

.close-btn:hover { color: #00ff9f; }

.about-links { text-align: center; margin-top: 1.5rem; }
