@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0e0e0e, #1f1f1f);
  color: #f2f2f2;
  min-height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-flex {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
}

.container {
  background-color: #222;
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  text-align: center;
  position: relative;
  flex-shrink: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: #f9f9f9;
}

input[type="text"] {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  margin-bottom: 16px;
  background: #333;
  color: #f9f9f9;
  font-size: 1rem;
}

input[type="text"]::placeholder {
  color: #aaa;
}

button {
  background: linear-gradient(to right, #007bff, #0056b3);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

button:hover {
  transform: scale(1.05);
}

#output {
  margin-top: 10px;
}

.profile-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

#avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-right: 12px;
}

.nickname-text {
  font-size: 1.1rem;
  font-weight: 600;
}

.external-links {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.external-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}

.external-icon:hover {
  transform: scale(1.2);
}

#stats-container {
  margin-top: 30px;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #444;
  text-align: left;
}

#stats-container h3 {
  margin-top: 0;
  color: #ffa500;
  border-bottom: 1px solid #555;
  padding-bottom: 5px;
  font-size: 1.2rem;
}

.stat {
  margin: 10px 0;
  font-size: 1rem;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.tab-button {
  padding: 8px 16px;
  background: #333;
  color: #f9f9f9;
  border: 1px solid #555;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tab-button:hover {
  background: #444;
}

.tab-button.active {
  background: #007bff;
  border-color: #007bff;
  font-weight: bold;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.match-table-wrapper {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
  border: 1px solid #444;
}

.match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.match-table thead th {
  text-align: center;
  padding: 8px;
  color: orange;
  border-bottom: 1px solid #444;
}

.match-table tbody td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #333;
  color: white;
  word-wrap: break-word;
}

.match-table a {
  color: #4da6ff;
  font-weight: bold;
  text-decoration: none;
}

.match-table a:hover {
  text-decoration: underline;
}

.match-card,
.match-scroll,
.match-card-horizontal {
  display: none;
}

.tab-button img.tab-icon {
  height: 16px;
  vertical-align: middle;
  margin-right: 6px;
}

#leetify-aside {
  display: flex;
  align-items: flex-start;
  margin-top: 0;
}

#leetify-container {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid #444;
  text-align: left;
  min-width: 260px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

#leetify-container h3 {
  margin-top: 0;
  color: #F84982;
  border-bottom: 1px solid #555;
  padding-bottom: 5px;
  font-size: 1.2rem;
}

.leetify-badge {
  margin-top: 36px;
  text-align: center;
}

.leetify-badge img {
  height: 48px;
  opacity: 1;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  display: inline-block;
}

.leetify-links {
  margin-top: 10px;
  margin-bottom: -8px;
}

.leetify-view-link {
  color: #F84982;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.2s;
}

.leetify-view-link:hover {
  opacity: 0.7;
  text-decoration: none;
}

@media (max-width: 900px) {
  body {
    align-items: flex-start;
  }

  .main-flex {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  #leetify-aside {
    margin-top: 0;
    margin-bottom: 32px;
  }
}

body.light-mode {
  background: #fff !important;
  color: #f2f2f2;
}