:root {
    --link-color: #7aa2f7; /* light blue accent */
    --link-hover-color: #2ac3de; /* neon cyan */
}

/* General Styling */
body {
    font-family: Courier, monospace;
    background-color: #1a1b26; /* dark background */
    color: #c0caf5; /* light text */
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-size: 20px;  /* font size for all text, 24 too big */
}

/* SCROLLBAR */
/* classic bar, light-blue theme */
::-webkit-scrollbar         { width: 10px; }
::-webkit-scrollbar-track   { background: #1a1b26; }  /* page bg */
::-webkit-scrollbar-thumb   {
  background: #cbdaf8;       /* very light blue */
  border-radius: 10px;          /* keep classic rectangular look */
}
::-webkit-scrollbar-thumb:hover {
  background: #c2d7ff;       /* slightly lighter on hover */
}
::-webkit-scrollbar-button  { display: none; }

/* Header */
header {
    background-image: url('../images/shanghai_img.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0; /* More padding to lower the header text */
    text-align: center;
    position: relative;
    color: white;
    margin-bottom: -0px;
    padding-bottom: 0; /* Remove extra padding if present */
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

header > * {
    position: relative;
    z-index: 2;
}

header h1 {
    margin: 0;
    color: #f0f0f0; /* light text */
}

/* Navigation */
nav {
    background: rgba(16, 18, 26, 0.37); /* More transparent background */
    padding: 0; /* Reduced padding to shorten the nav bar */
    text-align: center;
    width: 100%;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

/* nav links using variables */
nav ul li a {
    color: #c0caf5;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    color: #5972e3;
}

nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 5px;
}

/* Sections */
section {
    max-width: 1100px;  /* space between the end of the screen*/
    margin: 20px auto;
    padding: 20px;
    padding-top: 5px;
    background: #161821;
    border-radius: 20px;
}

#games-section section {
    padding-top: 20px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #1a1b26;
    margin-top: auto;
    color: #c0caf5;
}

.center-div {
    width: 50%; /* Or a fixed pixel value */
    margin: auto;
}

[id$="item-list"] {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    list-style: none;
}

.item {
    display: flex; /* enables vertical + horizontal centering */
    align-items: center; /* vertical center */
    justify-content: center; /* horizontal center */
    border: 1px solid black;
    margin: 5px;
    width: 100px;
    height: 60px;
    background-color: #f0f0f0;
    color: #161821;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0px; /* optional: makes corners look smoother */
}

.item.selected {
    background-color: #c0caf5; /* highlight selected item */
}

#timer {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #c0caf5; /* light text */
    margin: 10px 0
}

#game-container {
    text-align: center;
}

#game-container p,
#game-container #message,
#game-container {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

#leaderboard {
    list-style: none;
    padding: 0 20px;
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    font-size: 18px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 5px;
    border-bottom: 1px solid #444;
    align-items: center;
}

.leaderboard-entry .time {
    flex-basis: 30%;
    text-align: right;
}

.rank-name {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time {
    flex-shrink: 0;
    width: 80px;
    text-align: right;
    font-family: monospace;
}

.hint-highlight {
    background-color: #c0caf5;
    transition: background-color 0.5s ease;
}

.correct {
    background-color: #b0f2b6; /* light green */
    border: 2px solid #2ecc71; /* darker green border */
    color: #2e7d32; /* optional: green text */
}

#button-row {
    display: flex;
    gap: 10px; /* small space between buttons */
    justify-content: center; /* center horizontally */
    margin-top: 10px; /* optional vertical spacing */
    padding: 0; /* reset any extra padding */
}

#button-row button {
    margin: 0; /* reset any extra margin */
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #eee;
    transition: background-color 0.3s ease;
}

#button-row button:hover {
    background-color: #ddd;
}

/* Make game containers display horizontally */
.game-modes-wrapper, .game-modes, .game-modes-row {
    display: flex;
    flex-direction: row;
    gap: 24px; /* space between boxes */
    justify-content: center;
    align-items: flex-start;
}

/* Each game mode box */
.game-mode {
    border: 1px solid #161821;
    border-radius: 12px;
    padding: 24px 16px;
    background: #161821;
    min-width: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: none;
    flex-direction: column;
    align-items: center;
}
.game-mode.active {
    display: flex;
}

/* Buttons styling */
button, .game-mode button {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    margin: 6px 0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover, .game-mode button:hover {
    background: #1e40af29;
}
.active-easy {
    background-color: #3fc97a !important; /* or any green you like */
    color: #161821 !important;            /* optional: dark text for contrast */
    border-color: #2ea35c !important;     /* optional: green border */
}
.active-easy:hover {
    background: #16a34a !important;
    color: #fff !important;
}

/* Game mode switch buttons */
#game1-button, #game2-button, #game3-button {
    margin: 0 8px 24px 0;
    font-weight: bold;
    background: #f3f4f6;
    color: #222;
    border: 1px solid #d1d5db;
    transition: background 0.2s, color 0.2s;
}
#game1-button.active, #game2-button.active, #game3-button.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
#game1-button:hover, #game2-button:hover, #game3-button:hover {
    background: #1e40af;
    color: #fff;
}


.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
  margin-top: 0;
  width: 100%;
  max-width: 850px;
}

.skill-box {
  background-color: #2A2D3D;
  border-radius: 10px;
  width: 150px;
  height: 180px;
  padding: 12px;
  color: #c0caf5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  position: relative;
  text-decoration: none;
}

.certification-box {
    width: 375px;
    cursor: pointer;
}

.external-link-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
}

.skill-box:hover {
  background-color: #3B4064;
  color: white;
  box-shadow: 0 8px 20px rgba(122, 162, 247, 0.7);
}

.skill-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.skill-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  object-fit: contain;
}

.skill-icon2 {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
}

.skill-desc {
  font-size: 0.85rem;
  line-height: 1.2;
}

.java-cert-icon {
    width: 96px;
    height: 96px;
}

.certification-date {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 0.8rem;
  color: #f0f0f0;
}

h2 {
    text-align: center;
}

h3{
    text-align: left;
}

.skill-category {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  box-sizing: border-box;
}

.skill-category > h3 {
  text-align: center;
  width: 100%;
}


#skills h3 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

#version-display, #last-updated {
    visibility: hidden;
}

#version-display.loaded, #last-updated.loaded {
    visibility: visible;
}

.award-category {
  margin-bottom: 30px;
}

.award-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.award-item, .project-item, .bar-item {
  background-color: #2A2D3D;
  padding: 15px;
  border-radius: 8px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  color: #c0caf5;
  text-decoration: none;
  display: block;
}

.project-item-large {
  min-height: 50px;
}

.award-item:hover, .project-item:hover, .bar-item:hover {
  background-color: #3B4064;
  color: white;
  box-shadow: 0 8px 20px rgba(122, 162, 247, 0.7);
}

#unlock-links-button {
  align-items: right;
  background: #1a1b26;
  color: #1a1b26;
  border: none;
  border-radius: 6px;
  padding: 0px 0px;
  margin: 0px 0;
  font-size: 1rem;
  cursor: default;
  user-select: none;
  outline: none;
}


.project-item a {
  color: inherit;
  /* text-decoration: none; */
}
.project-item {
  position: relative;
}
.external-link-icon {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
}

.highlight {
    background-color: #3B4064;
    color: white;
    box-shadow: 0 8px 20px rgba(122, 162, 247, 0.7);
}

.locked-link {
    cursor: default;
}
.award-item a {
    color: inherit;
    text-decoration: none;
}

.youtube-link {
    color: #7aa2f7;
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        font-size: 18px;
    }
    
    header {
        padding: 15px 0;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    section {
        margin: 15px 10px;
        padding: 15px;
    }
    
    .skills-container {
        grid-template-columns: repeat(2, 130px);
        gap: 12px;
    }
    
    .skill-box {
        width: 130px;
        height: 160px;
        padding: 10px;
    }
    
    .skill-name {
        font-size: 1rem;
    }
    
    .skill-desc {
        font-size: 0.8rem;
    }
    
    .game-modes-wrapper, .game-modes, .game-modes-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-mode {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px;
    }
    
    .skills-container {
        grid-template-columns: repeat(1, 120px);
        gap: 12px;
    }

    .skill-box {
        width: 120px;
        height: 150px;
    }
    
    .skill-icon {
        width: 48px;
        height: 48px;
    }
    
    button, .game-mode button {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    #button-row {
        flex-wrap: wrap;
    }
    
    .award-item, .project-item, .bar-item {
        padding: 12px;
    }
}

/* Schedule Table */
#schedule-container {
    margin-top: 20px;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.schedule-table th, .schedule-table td {
    border: 1px solid #444;
    padding: 8px;
    text-align: left;
}

.schedule-table th {
    background-color: #2A2D3D;
}

.current-period {
    background-color: #3B4064;
    color: white;
    font-weight: bold;
}

/* Event Details Container */
#event-details-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.event-box {
    background-color: #2A2D3D;
    border-radius: 10px;
    padding: 15px;
    width: 280px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #c0caf5;
    font-size: 16px;
    cursor: default;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.event-box:hover {
    background-color: #3B4064;
    box-shadow: 0 8px 20px rgba(122, 162, 247, 0.7);
}

.event-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.event-time {
    font-size: 0.9rem;
    color: #a0a8c0;
}
