diff --git a/.vscode/settings.json b/.vscode/settings.json index 6f3a291..f673a71 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "liveServer.settings.port": 5501 + "liveServer.settings.port": 5502 } \ No newline at end of file diff --git a/assets/logo/BeachPartyBalloons-logo.webp b/assets/logo/BeachPartyBalloons-logo.webp new file mode 100644 index 0000000..4dc4ebb Binary files /dev/null and b/assets/logo/BeachPartyBalloons-logo.webp differ diff --git a/assets/pictures/asfalt-dark.png b/assets/pictures/asfalt-dark.png new file mode 100644 index 0000000..286f884 Binary files /dev/null and b/assets/pictures/asfalt-dark.png differ diff --git a/color.css b/color.css new file mode 100644 index 0000000..dd5bb9c --- /dev/null +++ b/color.css @@ -0,0 +1,538 @@ +body { + margin: 0; + padding: 10px; + box-sizing: border-box; + /* font-family: sans-serif; */ + font-family: "Autour One", serif; + background-color: #c2c2c2; + background-image: url("assets/pictures/asfalt-dark.png"); + /* This is mostly intended for prototyping; please download the pattern and re-host for production environments. Thank you! */ +} +#main-header { + text-align: center; + padding: 20px 10px; + background: #ffffffdd; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); + border-radius: 12px; + margin-bottom: 20px; +} + +#main-header h1 { + font-size: 2rem; + margin-bottom: 5px; +} + +#main-header p { + font-size: 1rem; + color: #666; +} + +#selected-palette { + position: sticky; + top: 60px; /* Adjusted top position for better spacing */ + max-width: 85%; + margin: auto; + padding: 10px; + background-color: #e8e8e8; + background-image: url("https://www.transparenttextures.com/patterns/asfalt-light.png"); + border: 2px solid #ccc; + border-radius: 10px; + z-index: 1; + + /* Flexbox settings */ + display: flex; + flex-direction: column; + gap: 15px; + + /* ✨ Sizing and Scrolling Fix */ + max-height: 50vh; /* Keep your max-height */ + min-height: 0; /* Add this to allow flex children to shrink */ +} + +/* Strong shadow when stuck */ +#selected-palette.stuck { + box-shadow: 16px 16px 15px rgba(0, 0, 0, 0.25); + border: 1px solid rgb(0, 0, 0); + border-radius: 7px; +} + + + +#palette-colors { + display: flex; + flex-wrap: wrap; + justify-content: center; + padding: 10px; + + /* ✨ Scrolling Fix */ + overflow-y: auto; /* Change from 'visible' to 'auto' for vertical scroll */ + flex-grow: 1; /* Allow this container to fill available space */ +} + + +#clear-palette { + margin-top: 20px; + padding: 8px 12px; + font-size: 0.9rem; + background: #8ae7db; + border: 1px solid #ccc; + border-radius: 15px; + cursor: pointer; + margin: auto; + +} + +#color-families { + display: flex; + flex-direction: column; + gap: 15px; + font-family: "Autour One", serif; + +} + +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} +footer { + text-align: center; + font-size: 0.9rem; + color: #777; + padding: 20px; +} + +@media (max-width: 480px) { + .color-name { + font-size: 0.7rem; + } + + #main-header h1 { + font-size: 1.5rem; + } +} +.color-family { + display: flex; + flex-direction: column; + align-items: center; + gap: 10px; + padding-bottom: 20px; + border-bottom: 1px solid #ccc; + animation: fadeInUp 0.5s ease; + font-family: "Autour One", serif; + +} +.swatch-container { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 10px 20px; /* add horizontal AND vertical gaps */ +} + +.color-family h3 { + text-align: center; + margin: 10px 0 5px; + font-size: 1rem; + font-weight: bold; +} + + +.swatch-wrapper { + display: inline-flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + /* width: 60px; */ + /* margin: 0 5px; */ + /* padding: 10px; */ + max-width: min-content; + position: relative; + overflow-wrap: break-word; + transition: filter 0.3s ease; + filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25)); + +} + +.palette-header-row { + display: flex; + justify-content: space-between; /* Pushes title and buttons apart */ + align-items: center; /* Vertically centers them */ + width: 100%; /* Makes the row fill the container */ + padding: 0 10px; /* Adds some horizontal spacing */ + margin: auto +} + +/* Remove the default margins from your title */ +#selected-palette h2 { + margin: 0; + font-size: 1.2rem; +} + + +.metallic-element[data-color="#FFD700"] { + background: linear-gradient(to bottom, #B88606, #79550E); + box-shadow: + inset 0 0 0 0 rgba(255, 255, 255, 0.3), + inset 0 0 0 1px rgba(0, 0, 0, 0.3), + inset 0 0 10px rgba(0, 0, 0, 0.2); +} + + + .color-swatch { + width: 100px; + height: 136px; + position: relative; + background: #ccc; /* fallback */ + transition: transform 0.3s ease; + z-index: 1; + background: radial-gradient(circle at 30% 30%, #fff5, transparent 60%), #ddd; + + -webkit-mask-image: url('images/balloon-mask.svg'); + -webkit-mask-size: contain; + -webkit-mask-repeat: no-repeat; + -webkit-mask-position: center; + + mask-image: url('images/balloon-mask.svg'); + mask-size: contain; + mask-repeat: no-repeat; + mask-position: center; +font-family: "Autour One", serif; + +} + +.color-shine.has-halo { + filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.4)); +} + +.color-swatch:hover, +.color-swatch:active { + transform: scale(1.2); +} + + +/* Adjust shine for chosen state if necessary */ + +.color-background { + width: 100%; + height: 100%; + border-radius: 50%; + border: 2px solid rgba(0, 0, 0, 0.1); /* Light gray border */ + box-shadow: 1 1 1; +} +.color-shine { + position: absolute; + top: 45%; + left: 45%; + width: 70px; + opacity: 0.6; + z-index: 100; /* make this high enough */ + pointer-events: none; + transform: translate(-50%, -50%); + height: auto; +} + +.color-name { + font-size: 0.85rem; + text-align: center; + margin-top: 5px; + word-break: keep-all; /* Prevent breaking long words */ + /* white-space: nowrap; Keep names on a single line */ + /* overflow: hidden; /*Hide overflow text if necessary */ + text-overflow: ellipsis; /* Add ... when text is too long */ + max-width: 100%; + /* background-color: #e8e8e8; */ + z-index: 1; +} + + +@media (max-width: 600px) { + + .swatch-wrapper { + width: 50px; + } + + .color-name { + font-size: 0.65rem; + max-width: 50px; + word-wrap: break-word; + } + + #selected-palette h2 { + font-size: 1.1rem; + } +} + +.color-name { + transition: all 0.3s ease; +} + +.color-name.highlighted-name { + text-decoration:underline; + font-weight: bold; + color: #111; +} + +@keyframes pop { + 0% { transform: scale(1); } + 50% { transform: scale(1.2); } + 100% { transform: scale(1); } +} + +.color-background.pop { + animation: pop 0.25s ease; +} + +.chosen{ + z-index: 4; +} + +.color-swatch.chosen { + outline: 3px solid #333; + outline-offset: 1px; + width: 90px; /* Keep these specific dimensions for chosen state */ + height: 126px; /* Keep these specific dimensions for chosen state */ + z-index: 10; + /* IMPORTANT: Re-apply the complex shadow from the base .color-swatch, + and add the extra glow/shadow you want for the chosen state. + This ensures depth is maintained. */ + box-shadow: + inset 2px 2px 6px rgba(255, 255, 255, 0.6), /* Retain inner highlight for depth */ + 0 8px 16px rgba(0, 0, 0, 0.3), /* Slightly larger/darker outer shadow for more pop */ + 0 0 15px rgba(0, 0, 0, 0.4); /* More pronounced glow for chosen state */ +} + +/* Shared metallic style */ +.metallic { + position: relative; + border: 1px solid rgba(255, 255, 255, 0.3); + /* box-shadow: inset 1px 1px 4px rgba(255, 255, 255, 0.6), + 0 2px 4px rgba(0, 0, 0, 0.3); */ + overflow: hidden; +} + +/* Highlight overlay */ +.metallic1::after { + content: ''; + position: absolute; + top: 15%; + left: 15%; + width: 70%; + height: 70%; + background: radial-gradient(circle at top left, rgba(255,255,255,0.3), transparent 70%); + transform: rotate(-20deg); + pointer-events: none; + border-radius: 50%; +} + +/* Specific chrome variants */ +.chrome-gold { + background: linear-gradient(145deg, #fefcea, #b69978, #a18b67, #806748); +} + +.chrome-silver { + background: linear-gradient(145deg, #e0e0e0, #a9a9a9, #808080, #e0e0e0); +} + +.chrome-rosegold { + background: linear-gradient(145deg, #fbe3dc, #e6b7a9, #d19387, #fbe3dc); +} + +.chrome-champagne { + background: linear-gradient(145deg, #fff2cc, #f2e6b6, #d9c08e, #fff2cc); +} + +.chrome-blue { + background: linear-gradient(145deg, #d0f0ff, #4d7995, #2d576f, #d0f0ff); +} + +.chrome-purple { + background: linear-gradient(145deg, #e0ccff, #b08be1, #915bc4, #e0ccff); +} + +.chrome-green { + background: linear-gradient(145deg, #e2ffe2, #457066, #5c877d, #e2ffe2); +} + + +@keyframes balloonFloat { + 0%, 100% { transform: translateY(0) rotate(-4deg); } + 50% { transform: translateY(-25px) rotate(4deg); } +} + +.balloon-float { + animation-name: balloonFloat; + animation-timing-function: 4s ease-in-out; + animation-iteration-count: infinite; + transform-origin: bottom center; + position: relative; +} + +.color-background { + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} +/* --- SVG Balloon String --- */ +.balloon-string-svg { + position: absolute; + top: 82px; /* match .color-swatch height */ + left: 45%; + transform: translateX(-50%); + width: 20px; + height: 40px; + z-index: -4; + pointer-events: none; + overflow: visible; + transform-origin: top center; + animation: svgWiggle 2s ease-in-out infinite; +} + + +.balloon-float-group { + position: relative; + display: flex; + flex-direction: column; + align-items: center; + animation-name: balloonFloat; + animation-duration: 4s; + animation-timing-function: ease-in-out; + animation-iteration-count: infinite; + transform-origin: bottom center; +} + +.wiggle-path { + stroke: #727171; + stroke-width: 2; + fill: none; + stroke-linecap: round; + stroke-dasharray: 1, 2; +} + +@keyframes svgWiggle { + 0%, 100% { + transform: translateX(-50%) rotate(0deg); + } + 25% { + transform: translateX(-50%) rotate(2deg); + } + 50% { + transform: translateX(-50%) rotate(-2.5deg); + } + 75% { + transform: translateX(-50%) rotate(1.5deg); + } +} + +#palette-controls { + position: static; + top: 10px; + right: 10px; + display: flex; + align-items: center; + gap: 10px; + z-index: 200; +} +/* Toggle Switch Styling */ +.switch { + position: relative; + display: inline-block; + width: 40px; + height: 20px; +} +.switch input { + opacity: 0; + width: 0; + height: 0; +} +.slider { + position: absolute; + cursor: pointer; + top: 0; left: 0; + right: 0; bottom: 0; + background-color: #ccc; + transition: 0.4s; + border-radius: 20px; +} +.slider:before { + position: absolute; + content: ""; + height: 14px; + width: 14px; + left: 3px; + bottom: 3px; + background-color: white; + transition: 0.4s; + border-radius: 50%; +} +input:checked + .slider { + background-color: #4caf50; +} +input:checked + .slider:before { + transform: translateX(20px); +} + +/* Shuffle Button */ +#shuffle-palette { + font-size: 16px; + padding: 4px 8px; + border: none; + background: #f0f0f0; + border-radius: 6px; + cursor: pointer; +} +.palette-modal-backdrop { + position: fixed; + top: 0; left: 0; + width: 100vw; height: 100vh; + background: rgba(0, 0, 0, 0.4); + display: none; /* Default is hidden */ + justify-content: center; + align-items: center; + z-index: 1000; +} + +.palette-modal-backdrop .palette-modal { + background: white; + padding: 20px; + border-radius: 12px; + max-width: 90%; + width: 400px; + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); + text-align: center; + display: block; +} + +/* Styling for the share link input field inside the modal */ +#share-link-input { + display: block; + width: 90%; + padding: 8px; + margin: 15px auto 0; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 0.9rem; + text-align: center; +} + +/* Styling for the copy button inside the modal */ +#copy-link-button { + margin-top: 15px; + padding: 10px 20px; + font-size: 1rem; + font-weight: bold; + background-color: #4CAF50; /* Green */ + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +#copy-link-button:hover { + background-color: #45a049; +} \ No newline at end of file diff --git a/index.html b/index.html index e308f48..c810210 100644 --- a/index.html +++ b/index.html @@ -6,16 +6,82 @@ Beach Party Balloons Color Palette Picker - + + + + + + + + Beach Party Balloons Color Palette Picker + + + + + + + + + + + + -
-

🎈 Color Balloon Picker

-

Select and float your favorite shades

-
+ +
-

Your Palette

+

Your Palette

- +
-