.ytmp3-wrapper {
    max-width: 700px;
    margin: 30px auto;
    font-family: 'Segoe UI', sans-serif;
}

.ytmp3-form-container {
    display: flex;
    align-items: center;
    background: #f0f8ff;
    border: 2px solid #0088cc;
    border-radius: 10px;
    padding: 10px 15px;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ytmp3-input {
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
}

.ytmp3-btn {
    background: #0088cc;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.ytmp3-btn:hover {
    background: #006699;
}

.loader {
    text-align: center;
    margin: 20px 0;
    font-size: 18px;
    color: #555;
}

.ytmp3-error {
    background: #ffe0e0;
    padding: 10px;
    color: #c00;
    border-left: 5px solid #c00;
    border-radius: 5px;
    margin-top: 10px;
}

.ytmp3-results .card {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 15px;
    margin-top: 20px;
}

.card img.thumbnail-img {
    width: 160px;
    border-radius: 8px;
}

.card-content {
    flex-grow: 1;
}

.card-content p {
    margin: 4px 0;
}

/* Ensure loading gif fits inside button without overflow */
.button-group a {
    position: relative;
    background: #28a745;
    color: white;
    padding: 8px 14px;
    margin-right: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    overflow: hidden;
}

.button-group a img.loading-icon {
    max-height: 24px;
    width: auto;
}

.button-group a:hover {
    background: #218838;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .ytmp3-form-container {
    flex-direction: column;
    align-items: stretch;
  }

  .ytmp3-input,
  .ytmp3-btn {
    width: 100%;
    box-sizing: border-box;
  }

  .ytmp3-btn {
    margin-top: 10px;
  }
}


@media (max-width: 480px) {
  .ytmp3-btn {
    padding: 12px;
    font-size: 16px;
  }

  .ytmp3-input {
    padding: 12px;
  }
}

@media (max-width: 750px) {
  .ytmp3-results .card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .card img.thumbnail-img {
    width: 100%;
    max-width: 250px;
    height: auto;
  }

  .card-content {
    margin-top: 15px;
    align-items: center;
  }

  .button-group {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
  }

  .button-group a {
    margin-right: 0;
  }
}
