pahvalentines/assets/css/style.css
michael 9c5b054dcc feat: Add Sonauto streaming audio on waiting page
Enable users to listen to their song while video generation continues
in the background. Backend proxies authenticated Sonauto stream API
since HTML audio elements cannot send auth headers.

- Add streaming_ready_at column to track when stream becomes available
- Enable streaming in Sonauto API request payload
- Handle GENERATING_STREAMING_READY webhook status
- Add /api/stream/{session_id} proxy endpoint using httpx
- Update StatusResponse with streaming_ready and task_id fields
- Add audio player UI with autoplay fallback for mobile
- Fade out audio gracefully before redirect to result page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 08:23:14 -06:00

1030 lines
No EOL
20 KiB
CSS
Executable file

@font-face {
font-family: 'Pets Headline Bold';
font-weight: 700;
font-style: normal;
font-stretch: normal;
src: url('../fonts/PetsHeadline-Bold.otf') format('opentype');
}
@font-face {
font-family: 'TT Commons Pro Body DemiBold';
font-weight: 700;
font-style: normal;
font-stretch: normal;
src: url('../fonts/EOT/TT_Commons_Pro_DemiBold.eot') format('embedded-opentype'),
url('../fonts/WOFF2/TT_Commons_Pro_DemiBold.woff2') format('woff2'),
url('../fonts/WOFF/TT_Commons_Pro_DemiBold.woff') format('woff'),
url('../fonts/TTF/TT_Commons_Pro_DemiBold.ttf') format('truetype'),
url('../fonts/SVG/TT_Commons_Pro_DemiBold.svg#CommonsProBodyDemiBold') format('svg');
}
@font-face {
font-family: 'TT Commons Pro Medium';
font-weight: 500;
font-style: normal;
font-stretch: normal;
src: url('../fonts/EOT/TT_Commons_Pro_Medium.eot') format('embedded-opentype'),
url('../fonts/WOFF2/TT_Commons_Pro_Medium.woff2') format('woff2'),
url('../fonts/WOFF/TT_Commons_Pro_Medium.woff') format('woff'),
url('../fonts/TTF/TT_Commons_Pro_Medium.ttf') format('truetype'),
url('../fonts/SVG/TT_Commons_Pro_Medium.svg#CommonsProMedium') format('svg');
}
@font-face {
font-family: 'TT Commons Pro Bold';
font-weight: 700;
font-style: normal;
font-stretch: normal;
src: url('../fonts/EOT/TT_Commons_Pro_Bold.eot') format('embedded-opentype'),
url('../fonts/WOFF2/TT_Commons_Pro_Bold.woff2') format('woff2'),
url('../fonts/WOFF/TT_Commons_Pro_Bold.woff') format('woff'),
url('../fonts/TTF/TT_Commons_Pro_Bold.ttf') format('truetype'),
url('../fonts/SVG/TT_Commons_Pro_Bold.svg#CommonsProBold') format('svg');
}
@font-face {
font-family: 'TT Commons Pro Regular';
font-weight: 200;
font-style: normal;
font-stretch: normal;
src: url('../fonts/EOT/TT_Commons_Pro_Regular.eot') format('embedded-opentype'),
url('../fonts/WOFF2/TT_Commons_Pro_Regular.woff2') format('woff2'),
url('../fonts/WOFF/TT_Commons_Pro_Regular.woff') format('woff'),
url('../fonts/TTF/TT_Commons_Pro_Regular.ttf') format('truetype'),
url('../fonts/SVG/TT_Commons_Pro_Regular.svg#CommonsProRegular') format('svg');
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Pets Headline Bold','Montserrat', sans-serif;
background: #FFA4B3;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 0px;
flex-direction: column;
}
.container {
max-width: 700px;
flex: 1;
}
.header {
background-image: url('../images/header-title.png');
background-repeat: no-repeat;
background-position: center;
height: 60px;
color: transparent;
font-family: 'Pets Headline Bold';
background-color: #FFFAF5;
width: 100%;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.sr-only-focusable:active, .sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
overflow: visible;
clip: auto;
white-space: normal;
}
.body-container {
width: 100%;
height: auto;
/*background-image: url('../images/pink-bg.jpg');
background-size: cover;
background-repeat: repeat;
background-position: center;*/
padding-bottom: 10px;
background-color: #FFA4B3;
}
.jukebox-banner-mb {
width: 100%;
margin: auto;
display: block;
padding: 0px 0px;
}
.jukebox-banner-dt {
display: none;
}
.title {
font-family: "Pets Headline Bold";
font-weight: 700;
font-size: 32px;
line-height: 110.00000000000001%;
text-align: center;
color: #FFFAF5;
margin: 0px 0px 10px 0px;
}
.sub-title {
font-family: "TT Commons Pro Body DemiBold";
font-weight: 600;
font-size: 16px;
line-height: 110.00000000000001%;
text-align: center;
color: #FFFAF5;
margin: 10px 0px;
}
.form-row {
/*text-align: center;*/
display: flex;
justify-content: center;
flex-direction: column;
}
.form-group {
/*display: inline-grid;*/
display: flex;
flex-direction: column;
align-items: center;
margin: 10px 0px;
}
label {
font-family: "TT Commons Pro Body DemiBold";
font-weight: 600;
font-size: 16px;
line-height: 110.00000000000001%;
text-align: center;
color: #FFFFFF;
margin: 10px 0px;
}
input[type="text"], input[type="email"], input[type="password"], select {
border: 1px solid #fff;
border-radius: 4px;
font-size: 16px;
transition: border-color 0.3s ease;
color: #000;
width: 160px;
padding: 0 2%;
}
.file-upload {
position: relative;
display: inline-block;
cursor: pointer;
width: 100%;
}
.file-upload input[type="file"] {
position: absolute;
opacity: 0;
width: 100%;
height: 100%;
cursor: pointer;
pointer-events: none;
}
.file-upload-label {
display: block;
padding: 20px;
border: 2px dashed #FFFAF5;
border-radius: 5px;
background: #febac2;
color: #ffffff;
text-align: center;
transition: all 0.3s ease;
width: 70%;
margin: 10px auto;
}
.file-upload:hover .file-upload-label {
background: #febac2;
border-color: #FFFAF5;
}
.file-upload-icon {
font-size: 2rem;
color: #ffffff;
margin-bottom: 10px;
}
.file-upload-text {
font-family: "TT Commons Pro Body DemiBold";
font-weight: 600;
font-size: 16px;
line-height: 110.00000000000001%;
text-align: center;
color: #FFFFFF;
}
.file-upload-subtext {
font-family: "TT Commons Pro Body DemiBold";
font-weight: 600;
font-size: 12px;
line-height: 110.00000000000001%;
text-align: center;
color: #FFFFFF;
margin-top: 3px;
}
.submit-btn {
padding: 15px 30px;
background: #D2323D;
border-color: #D2323D;
color: #fff;
border-radius: 4px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
margin: 20px auto;
border-width: 0px;
border-style: none;
}
.submit-btn:hover, .submit-btn:focus {
background: #E02440;
border-color: #E02440;
}
.melody-record-container {
position: relative;
width: 65%;
margin: auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.melody-record {
width: 100%;
display: block;
padding: 20px 0px;
animation: spin 5s linear infinite;
aspect-ratio: 1/1;
object-fit: contain;
}
.record-text-overlay {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
animation: spin 5s linear infinite;
}
/* Audio player styles for waiting page */
.audio-player-container {
width: 80%;
max-width: 400px;
margin: 20px auto;
padding: 15px 20px;
background: rgba(255, 255, 255, 0.15);
border-radius: 12px;
text-align: center;
}
.audio-player-label {
font-family: "TT Commons Pro Body DemiBold";
font-weight: 600;
font-size: 14px;
color: #FFFAF5;
margin-bottom: 12px;
}
.audio-player-container audio {
width: 100%;
height: 40px;
border-radius: 20px;
}
/* Style the audio element for webkit browsers */
.audio-player-container audio::-webkit-media-controls-panel {
background: #FFFAF5;
}
.audio-tap-message {
font-family: "TT Commons Pro Body DemiBold";
font-weight: 600;
font-size: 14px;
color: #FFFAF5;
margin-top: 10px;
cursor: pointer;
animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.6; }
}
.top-text, .bottom-text {
font-size: 5px; /* Adjust size as needed */
font-weight: bold;
fill: #D2323D; /* Set your desired color */
}
.top-text { dominant-baseline: text-after-edge; }
.bottom-text { dominant-baseline: text-after-edge; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}
.record-container{
/*margin: auto;
display: block;
padding: 20px 0px;
text-align: center;
margin-bottom: -200px;*/
width: 100%;
max-width: 500px;
margin: 0px auto 20px;
}
#video-record{
width: 100%;
aspect-ratio: 1 / 1;
object-fit: cover;
}
.dog-record {
width: 65%;
display: flex;
margin: auto;
}
.rotate {
animation: spin 2s linear infinite;
}
.record-needle{
width: 85px;
height: auto;
position: relative;
bottom: 280px;
right: calc(20% - 45%);
}
.footer {
background: #002828;
color: #fff;
padding: 40px;
width: 100%;
}
.footer-content {
max-width: 700px;
margin: 0 auto;
}
.footer p {
font-family: "TT Commons Pro Medium";
font-weight: 500;
font-size: 13px;
line-height: 120%;
margin-bottom: 10px;
}
.footer a {
color: #fff;
}
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
/*background-color: rgba(0, 0, 0, 0.6);*/
background: rgba(232, 112, 137, 0.86);
justify-content: center;
align-items: center;
}
.modal-content {
background-color: #D2323D;
margin: 0px auto;
padding: 30px;
width: 100%;
max-width: 700px;
text-align: center;
color: #ffffff;
}
.modal-header {
font-family: "Pets Headline Bold";
font-size: 32px;
font-weight: 700;
color: #fff;
margin-bottom: 20px;
}
.modal-message {
font-family: 'TT Commons Pro Medium';
font-size: 16px;
margin: 0px auto 25px auto;
color: #cccccc;
width: 65%;
}
.modal-close {
width: 80%;
background: #00AA28;
color: white;
border-radius: 5px;
border-color: #00AA28;
padding: 12px 24px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.modal-close:hover {
background: #00AA28;
border-color: #00AA28;
}
.heart-icon {
width: 100%;
height: 70px;
}
.white-heart-1 {
width: 45px;
float: right;
}
.white-heart-2 {
width: 30px;
float: left;
margin-top: 20px;
}
.pets-text-logo {
background-image: url('../images/pets-logo.png');
background-repeat: no-repeat;
background-position: center;
height: 60px;
}
.title1 {
font-family: "Pets Headline Bold";
font-weight: 700;
font-size: 32px;
line-height: 110.00000000000001%;
text-align: center;
color: #FFFAF5;
margin: 10px auto;
width: 45%;
}
.heart1-icon {
width: 100%;
height: 50px;
}
.red-heart-1 {
width: 45px;
float: left;
}
.red-heart-2 {
width: 20px;
float: right;
margin-top: 20px;
}
.song-lyrics {
font-family: "TT Commons Pro Body DemiBold";
font-weight: 600;
font-size: 16px;
line-height: 110.00000000000001%;
text-align: center;
color: #FFFFFF;
margin: 15px 0px;
}
.song-control {
width: 100%;
height: 60px;
margin: 15px auto;
z-index: 500;
position: relative;
}
.song-play {
background-image: url('../images/play.png');
background-repeat: no-repeat;
background-position: center;
width: 60px;
height: 60px;
display: block;
margin: 0px auto;
border: 2px solid #fff;
border-radius: 30px;
}
.song-pause {
background-image: url('../images/pause.png');
background-repeat: no-repeat;
background-position: center;
width: 60px;
height: 60px;
display: block;
margin: 0px auto;
border: 2px solid #fff;
border-radius: 30px;
}
.share-container {
background: #D2323D;
color: #fff;
font-family: 'TT Commons Pro Bold';
font-size: 16px;
width: 80%;
margin: 25px auto 20px auto;
text-align: center;
padding: 25px 20px;
border-radius: 20px;
}
.share-title {
font-family: "Pets Headline Bold";
font-size: 24px;
font-weight: 700;
color: #fff;
margin-bottom: 15px;
}
.share-icons {
display: flex;
justify-content: center;
gap: 30px;
margin: 20px 0px;
}
.download-song-btn {
width: 90%;
background: #fff;
color: #D2323D;
border-radius: 5px;
border: 1px solid #fff;
padding: 12px 24px;
font-size: 16px;
font-weight: 700;
cursor: pointer;
margin: 10px auto;
display: block;
text-decoration: none;
}
.download-song-btn:hover, .download-song-btn:focus {
color: #fff;
background: #D2323D;
border-color: #fff;
}
.copy-btn {
width: 90%;
background: #D2323D;
color: #fff;
border-radius: 5px;
border: 1px solid #fff;
padding: 12px 24px;
font-size: 16px;
font-weight: 700;
cursor: pointer;
margin: 10px auto;
display: block;
text-decoration: none;
}
.copy-btn:hover, .copy-btn:focus {
color: #D2323D;
background: #fff;
border-color: #D2323D;
}
.share-text {
margin: 20px 15px 20px 15px;
}
.make-another-song-btn {
width: 80%;
background: #fff;
color: #D2323D;
border-radius: 5px;
padding: 12px 24px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
margin: auto auto 30px auto;
display: block;
text-decoration: none;
text-align: center;
border-style: none;
}
.make-another-song-btn:hover, .make-another-song-btn:focus {
color: #fff;
background: #D2323D;
border-color: #fff;
}
.banner1-container {
background-color: #fff;
}
.banner1 {
width: 100%;
height: auto;
margin: 0px auto;
padding: 30px 40px;
margin-bottom: -20px;
}
.banner1-cta {
font-family: 'TT Commons Pro Bold';
width: auto;
border-radius: 5px;
padding: 12px 15px;
font-size: 16px;
font-weight: 700;
cursor: pointer;
margin: auto;
text-decoration: none;
color: #fff;
background: #00AA28;
position: relative;
bottom: 4.5rem;
left: 3.5rem;
}
.banner2-container {
margin: 30px 40px;
}
.banner2 {
width: 100%;
height: auto;
margin: 0px auto;
margin-bottom: -20px;
}
.banner2-cta {
font-family: 'TT Commons Pro Bold';
width: auto;
border-radius: 5px;
padding: 12px 15px;
font-size: 16px;
font-weight: 700;
cursor: pointer;
margin: auto;
text-decoration: none;
color: #fff;
background: #00AA28;
position: relative;
bottom: 3rem;
left: 1.5rem;
}
.banner1-cta:hover, .banner1-cta:focus, .banner2-cta:hover, .banner2-cta:focus {
background: #00871E;
border-color: #00871E;
}
#banner1-mb, #banner2-mb {
display: block;
}
#banner1-dt, #banner2-dt {
display: none;
}
@media (min-width: 576px) and (max-width: 767.98px) {
.record-container{
/*margin: auto;
display: block;
padding: 20px 0px;
text-align: center;
margin-bottom: -45%;*/
}
.dog-record {
width: 65%;
display: flex;
margin: auto;
}
.record-needle{
width: 20%;
height: auto;
position: relative;
bottom: 450px;
right: calc(20% - 45%);
}
.banner1-cta {
bottom: 7rem;
left: 4rem;
}
.banner2-cta {
bottom: 5rem;
left: 2.5rem;
}
}
/* Medium devices (tablets, 768px and less than 992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
.jukebox-banner-mb {
display: none !important;
}
.jukebox-banner-dt {
display: block;
width: 100%;
margin: 0px auto 30px;
}
.title {
margin: -60px 0px 10px 0px;
}
.form-row {
max-width: 400px;
margin: auto;
}
.form-group {
flex-direction: row;
justify-content: space-between;
}
label {
margin: 0px 10px;
font-size: 18px;
}
.file-upload-label {
width: 100%;
}
input[type="text"], input[type="email"], input[type="password"], select {
width: 200px;
font-size: 18px;
}
#banner1-mb, #banner2-mb {
display: none;
}
#banner1-dt, #banner2-dt {
display: block;
}
.record-container{
/*margin: auto;
display: block;
padding: 20px 0px;
text-align: center;
margin-bottom: -45%;*/
margin: 20px auto 20px;
}
.dog-record {
width: 65%;
display: flex;
margin: auto;
}
.record-needle{
width: 20%;
height: auto;
position: relative;
bottom: 450px;
right: calc(20% - 45%);
}
.banner1-cta {
font-size: 18px;
bottom: 9rem;
left: 5rem;
}
.banner2-cta {
font-size: 18px;
bottom: 10.5rem;
left: 1.5rem;
}
}
/* Medium devices (desktops, 992px and less than 1200px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
.jukebox-banner-mb {
display: none !important;
}
.jukebox-banner-dt {
display: block;
width: 100%;
margin: 0px auto 30px;
}
.title {
margin: -60px 0px 10px 0px;
}
.form-row {
max-width: 400px;
margin: auto;
}
.form-group {
flex-direction: row;
justify-content: space-between;
}
label {
margin: 0px 10px;
font-size: 18px;
}
.file-upload-label {
width: 100%;
}
input[type="text"], input[type="email"], input[type="password"], select {
width: 200px;
font-size: 18px;
}
#banner1-mb, #banner2-mb {
display: none;
}
#banner1-dt, #banner2-dt {
display: block;
}
.dog-record {
width: 65%;
}
.record-needle{
width: 85px;
height: auto;
}
.record-container{
/*margin: auto;
display: block;
padding: 20px 0px;
text-align: center;
margin-bottom: -45%;*/
margin: 20px auto 20px;
}
.dog-record {
width: 65%;
display: flex;
margin: auto;
}
.record-needle{
width: 20%;
height: auto;
position: relative;
bottom: 450px;
right: calc(20% - 45%);
}
.banner1-cta {
font-size: 18px;
bottom: 9rem;
left: 5rem;
}
.banner2-cta {
font-size: 18px;
bottom: 10.5rem;
left: 1.5rem;
}
}
/* Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
.jukebox-banner-mb {
display: none !important;
}
.jukebox-banner-dt {
display: block;
width: 100%;
margin: 0px auto 30px;
}
.title {
margin: -60px 0px 10px 0px;
}
.form-row {
max-width: 400px;
margin: auto;
}
.form-group {
flex-direction: row;
justify-content: space-between;
}
label {
margin: 0px 10px;
font-size: 18px;
}
.file-upload-label {
width: 100%;
}
input[type="text"], input[type="email"], input[type="password"], select {
width: 200px;
font-size: 18px;
}
#banner1-mb, #banner2-mb {
display: none;
}
#banner1-dt, #banner2-dt {
display: block;
}
.record-container{
/*margin: auto;
display: block;
padding: 20px 0px;
text-align: center;
margin-bottom: -45%;*/
margin: 20px auto 20px;
}
.dog-record {
width: 65%;
display: flex;
margin: auto;
}
.record-needle{
width: 20%;
height: auto;
position: relative;
bottom: 450px;
right: calc(20% - 45%);
}
.banner1-cta {
font-size: 18px;
bottom: 9rem;
left: 5rem;
}
.banner2-cta {
font-size: 18px;
bottom: 10.5rem;
left: 1.5rem;
}
}