:root {
  --bg-color: #101217;
  --sec-color: #1a1d24;
  --green: rgb(86, 222, 147);
  --white: #ffffff;
}

/* Fixed overflow issues for mobile */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--white);
  overflow-x: hidden;
  width: 100%;
  min-width: 320px;
}

header {
  padding: 2rem 1rem;
  width: 100%;
  max-width: 100vw;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--sec-color) 100%);
  box-sizing: border-box;
}

footer {
  padding: 3rem 1rem;
  width: 100%;
  max-width: 100vw;
  text-align: center;
  background: var(--sec-color);
  border-top: 1px solid var(--sec-color-2);
  box-sizing: border-box;
}

h1 {
  color: var(--green);
  font-size: 2rem;
  word-wrap: break-word;
}

.subtitle {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.modal-content {
  padding: 1rem;
  border-radius: 6px;
}

select {
  font-size: 1.5rem;
  padding: 1rem;
  background: var(--bg-color);
  color: var(--white);
  border: 2px solid var(--green);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  max-width: 90vw;
}

/* Social Bar */
.social-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.social-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-block;
  transition: filter 0.3s ease;
  cursor: pointer;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--white);
  transition: fill 0.3s ease;
}

.social-icon:hover svg {
  fill: var(--green);
}

/* Art Section */
.artwork-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem;
  max-width: 100%;
}

.art-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--sec-color);
  transition: transform 0.3s ease;
  max-width: 100%;
}

.art-item:hover {
  transform: scale(1.02);
}

.art-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.art-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 2rem;
  color: var(--white);
  z-index: 2;
  box-sizing: border-box;
}

.art-rank {
  font-weight: bold;
  color: var(--green);
}

.art-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Responsive Layout */
@media (min-width: 600px) {
  .artwork-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .artwork-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile-specific overflow fixes */
@media (max-width: 768px) {
  .art-text {
    font-size: 1.5rem;
    padding: 0.4rem 0.6rem;
  }

  .social-bar {
    gap: 1rem;
  }

  select {
    font-size: 1.2rem;
    padding: 0.8rem;
  }
}

@media (max-width: 480px) {
  .art-text {
    font-size: 1.2rem;
    padding: 0.3rem 0.5rem;
  }

  .social-icon {
    width: 2rem;
    height: 2rem;
  }
}
