:root {
  --primary-text: #e0f7fa;
  --secondary-text: #b0e0e6;
  --bubble-size: clamp(120px, 15vw, 140px);  /* Reduced from 150px/20vw/200px */
  --header-size: clamp(2.5rem, 5vw, 4rem);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: 'AppleGaramond';
  src: url('fonts/AppleGaramond.ttf') format('truetype');
  font-display: swap;
}

body {
  font-family: 'AppleGaramond', serif;
  min-height: 100vh;
  background: url('images/wallpp.jpg') center/cover fixed no-repeat;
  color: var(--primary-text);
}

.container {
  padding: clamp(20px, 5vw, 40px);
  width: 100%;
}

header h1 {
  font-size: var(--header-size);
  margin-bottom: 2rem;
  text-align: center;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

.channel-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, var(--bubble-size));
  grid-template-columns: repeat(auto-fill, var(--bubble-size));
  gap: 1.6rem;  /* Reduced from 2rem */
  margin: 2rem 0;
  justify-content: start;
  padding-left: 1rem;  /* Reduced from 2rem */
  height: fit-content;
}

.bubble-icon {
  width: var(--bubble-size);
  height: var(--bubble-size);
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease;
}

a {
  text-decoration: none;
}

.bubble-icon span {
  color: white;
  font-weight: bold;
  font-size: 1rem;  /* Reduced from 1.2rem */
  margin-top: 60%;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.bubble-icon:hover {
  animation: wobble 0.5s ease-in-out;
}

footer {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--secondary-text);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.nextwebsite {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-size: 1rem;
  color: var(--secondary-text);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease;
  color: black;
}

.nextwebsite:hover {
  transform: translateY(-3px);
}

@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(3deg); }
}

@media (max-width: 768px) {
  .channel-grid {
      grid-auto-flow: row;
      grid-template-columns: repeat(2, var(--bubble-size));
      grid-template-rows: auto;
      justify-content: center;
      padding-left: 0;
  }
  
  .bubble-icon {
      width: min(120px, 100%);  /* Reduced from 150px */
      height: min(120px, 100%);  /* Reduced from 150px */
  }
  .nextwebsite {
    position: static;
    text-align: center;
    margin-top: 2rem;
}
}

@media (max-width: 480px) {
  
  
  .nextwebsite {
      position: static;
      text-align: center;
      margin-top: 2rem;
  }


  .channel-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, var(--bubble-size));
    grid-template-rows: auto;
    justify-content: center;
    padding-left: 0;
}
}