*,*::after,*::before{
    -webkit-box-sizing:border-box;
    -moz-box-sizing:border-box;
    box-sizing:border-box;
    margin: 0;
}

:root{
  /* Colors */
  --youtube-red: #E7000B;
  --lightgrey: #FBFBFB;
  --black-text: #000;
  /* Fonts */
  --fonts-body: 'Roboto', sans-serif;
}

html{
  scroll-padding-top: 9rem;
  scroll-behavior: smooth;
}

body {
  font-family: var(--fonts-body);
  color: var(--black-text);
  font-weight: 400;
  padding: 0 2rem 2rem 2rem;
  margin: 0;
  background-color: oklab(100% 0 -0.00011);
}

.nav-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.nav-items {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: flex-end;
}

.nav-bar a {
    text-decoration: none;
}

.nav-button {
    font-size: 16px;
    color: var(--black-text);
}

.selected {
    font-weight: 600;
}

.nav-home-button {
    font-size: 20px;
    font-weight: 600;
    color: var(--youtube-red);
}

.hero-container {
    display: flex;
    align-items: center;
    margin: 5rem 0;
    padding: 2rem;
}

.hero-text-container {
    margin: 3rem 1rem;
}

.hero-title {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-text {
    margin-bottom: 0.5rem;
}

.hero-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img img {
    width: 50%;
}

.scroll-down-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.scroll-down-button {
    color: var(--youtube-red);
    font-size: 24px;
}

.main-container {
    margin: 3rem 1rem;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.vis-container {
    width: 100%;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    padding: 1rem;
    margin: 1rem 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vis-container.fit-content {
    width: fit-content;
}

.vis-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

div[id^="vis"] {
    width: 100%;
}

.ranking-card {
    flex: 0 0 18rem;
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 12px;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

.ranking-title {
    font-size: 16px;
    font-weight: 600;
}

.ranking-subtitle {
    font-size: 12px;
    color: #666;
    margin-bottom: 1rem;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.ranking-left {
    display: flex;
    gap: 10px;
}

.rank-number {
    font-weight: bold;
}

.genre-name {
    font-size: 14px;
    font-weight: 500;
}

.genre-top{
    display: flex;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.genre-top > .vis-container {
    flex: 1;
    min-width: 0;
    margin: 0; 
}

.view-value {
    color: #333;
}

@media screen and (max-width: 800px) {
    .genre-top {
        flex-direction: column;
    }
    .ranking-card {
        flex: 1;
        width: 100%;
    }
}