:root {
    --bg-color: #1d3f59; 
    --text-color: #2b2b2b;
    --accent-yellow: #F3C15D;
    --accent-orange: #D46B46;
    --accent-purple: #9D72A6;
    --paper-color: #fdfbf7;
    --ink-color: #1a1a1a;
}

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

body {
    font-family: 'Elms Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

header {
    margin-bottom: 30px;
    margin-top: 20px;
    text-align: center;
}

.logo {
    max-width: 300px;
    height: auto;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
}

main {
    width: 100%;
    max-width: 800px;
}

.intro {
    text-align: center;
    margin-bottom: 30px;
}

.intro h1 {
    font-family: 'Chewy', cursive;
    color: #fff;
    font-size: 3rem;
    text-shadow: 2px 2px 0px var(--accent-orange), 4px 4px 0px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.intro p {
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.wizard-container {
    width: 100%;
    position: relative;
}

.step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: center;
}

.step-active {
    display: block;
    animation: slideUpFadeIn 0.4s forwards;
}

@keyframes slideUpFadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

#step-0 {
    background: transparent;
    box-shadow: none;
}

#step-3 {
    text-align: left;
}

.step h2 {
    font-family: 'Chewy', cursive;
    color: var(--accent-orange);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

#step-success .intro h1 {
    color: var(--accent-orange);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

#step-success .intro p {
    color: var(--text-color);
    text-shadow: none;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.row {
    display: flex;
    gap: 20px;
}

.col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--accent-purple);
    font-size: 1.1rem;
}

input[type="text"], input[type="email"] {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Elms Sans', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="email"]:focus {
    border-color: var(--accent-orange);
    outline: none;
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.btn-option {
    background: #fdfbf7;
    border: 3px solid var(--accent-yellow);
    border-radius: 10px;
    padding: 20px;
    font-size: 1.5rem;
    font-family: 'Chewy', cursive;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-option:hover {
    background: var(--accent-yellow);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.error-msg {
    color: #c62828;
    margin-top: 10px;
    font-weight: bold;
}

.letter-body-wrapper {
    margin-top: 30px;
    border: 2px solid var(--accent-yellow);
    border-radius: 10px;
    display: flex;
    align-items: stretch;
    background: #fff;
    position: relative;
}

/* Sidebar Toolbar */
.editor-sidebar {
    background: transparent;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 60px;
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
    align-self: flex-start;
    z-index: 50;
}

.sidebar-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.tool-btn {
    background: #fff;
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
    font-size: 1.2rem;
    font-family: 'Chewy', cursive;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    user-select: none;
}

.tool-btn:hover {
    background: var(--accent-orange);
    color: #fff;
    transform: translateY(-2px);
}

.stamps-group {
    position: relative;
}

.stamps-menu-sidebar {
    position: absolute;
    left: 55px;
    top: 0;
    background: #fff;
    border: 2px solid var(--accent-yellow);
    border-radius: 10px;
    padding: 10px;
    display: none;
    flex-wrap: wrap;
    width: 200px;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 100;
}

.stamps-menu-sidebar.show {
    display: flex;
    animation: fadeIn 0.2s;
}

/* Remove floating-toolbar since we moved to sidebar */

.stamp-btn {
    background: #fff;
    border: 2px solid #fff;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.stamp-btn:hover {
    transform: scale(1.1) rotate(-5deg);
    border-color: var(--accent-orange);
}

/* The Letter */
.letter-paper {
    position: relative;
    width: 100%;
    min-height: 400px;
    border-radius: 8px;
    background-color: var(--paper-color);
    background-image: url('texture.webp');
    background-size: cover;
    background-blend-mode: multiply;
    padding: 30px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.05);
}

#visualMessage {
    position: relative;
    width: 100%;
    min-height: 340px;
    font-family: 'Chewy', cursive;
    font-size: 1.5rem;
    color: var(--ink-color);
    line-height: 1.6;
    outline: none;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
    z-index: 5;
}

#visualMessage:empty:before {
    content: attr(data-placeholder);
    color: rgba(0,0,0,0.3);
    font-style: italic;
    pointer-events: none;
}

#visualMessage::selection,
#visualMessage *::selection {
    background-color: var(--accent-yellow);
    color: #000;
}

/* Rich Text Styles */
#visualMessage h1, #visualMessage h2 {
    font-size: 2.5rem;
    color: var(--accent-purple);
    margin-bottom: 10px;
    margin-top: 10px;
}

/* Polaroid Collage Image Style */
.polaroid-img {
    max-width: 80%;
    height: auto;
    border: 10px solid #fff;
    border-bottom: 30px solid #fff; /* Polaroid feel */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin: 15px;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s;
    cursor: pointer;
}

.polaroid-img:nth-child(even) {
    transform: rotate(2deg);
}
.polaroid-img:nth-child(odd) {
    transform: rotate(-2deg);
}

.polaroid-img:hover {
    transform: scale(1.05) rotate(0deg);
    z-index: 20;
    position: relative;
}

/* Placeholder for visual text */
.placeholder-text {
    color: rgba(0,0,0,0.3);
    font-style: italic;
}

/* Individual char ink bleed */
.ink-char {
    animation: inkBleed 0.3s forwards ease-out;
}

@keyframes inkBleed {
    0% {
        opacity: 0;
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

/* Stamps dropped on the letter */
#stampsContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 11;
}

.placed-stamp-wrapper {
    position: absolute;
    pointer-events: auto;
    cursor: grab;
    user-select: none;
    animation: stampPlop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placed-stamp-wrapper:active {
    cursor: grabbing;
}

.placed-stamp {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.remove-stamp-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #c62828;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.placed-stamp-wrapper:hover .remove-stamp-btn {
    display: flex;
}

@keyframes stampPlop {
    0% { transform: scale(3) rotate(15deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.btn-primary {
    background-color: var(--accent-orange);
    color: #fff;
    font-family: 'Chewy', cursive;
    font-size: 1.8rem;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 0 #b35130, 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-primary:active {
    transform: translateY(6px);
    box-shadow: 0 0px 0 #b35130, 0 4px 10px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: #ddd;
    color: #333;
    font-family: 'Chewy', cursive;
    font-size: 1.5rem;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-secondary:hover {
    opacity: 0.8;
}

.btn-danger {
    background-color: #c62828;
    color: #fff;
    font-family: 'Chewy', cursive;
    font-size: 1.5rem;
    padding: 10px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 0 #8e1c1c, 0 6px 15px rgba(0,0,0,0.2);
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-danger:active {
    transform: translateY(4px);
    box-shadow: 0 0px 0 #8e1c1c, 0 2px 10px rgba(0,0,0,0.2);
}

.feedback {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.success { color: #2e7d32; }
.error { color: #c62828; }

/* Social Links */
.social-links {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    justify-content: center;
}
.social-links a {
    font-size: 2.5rem;
    transition: transform 0.2s, filter 0.2s;
    text-decoration: none;
}
.social-links a:hover {
    transform: scale(1.1);
}

.social-links a.social-spotify { color: #1DB954; }
.social-links a.social-spotify:hover { color: #1ed760; }

.social-links a.social-apple { color: #9933ff; }
.social-links a.social-apple:hover { color: #b266ff; }

.social-links a.social-amazon { color: #00A8E1; }
.social-links a.social-amazon:hover { color: #33C5FF; }

.social-links a.social-youtube { color: #FF0000; }
.social-links a.social-youtube:hover { color: #ff3333; }

.social-links a.social-tiktok { color: #000000; filter: drop-shadow(2px 0 0 #00f2fe) drop-shadow(-2px 0 0 #fe0050); }
.social-links a.social-tiktok:hover { filter: drop-shadow(3px 0 0 #00f2fe) drop-shadow(-3px 0 0 #fe0050); }

.social-links a.social-twitch { color: #9146FF; }
.social-links a.social-twitch:hover { color: #a970ff; }

.social-links a.social-instagram i {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.social-links a.social-instagram:hover i {
    filter: brightness(1.2);
}

/* Newsletter */
.btn-news-tab {
    background: transparent;
    border: 2px solid var(--accent-yellow);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-family: 'Elms Sans', sans-serif;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
}
.btn-news-tab.active, .btn-news-tab:hover {
    background: var(--accent-yellow);
}
.news-input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    width: 250px;
}
.news-input:focus {
    border-color: var(--accent-orange);
    outline: none;
}
.iti {
    /* intl-tel-input container */
    text-align: left;
}

/* Custom Banner & HTML */
.custom-banner img {
    transition: transform 0.2s;
}
.custom-banner a:hover img {
    transform: scale(1.02);
}

/* PIX Container */
.pix-container {
    background: #fff;
    border: 2px dashed var(--accent-yellow);
    border-radius: 10px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.pix-container h2 {
    font-family: 'Chewy', cursive;
    color: var(--accent-orange);
    font-size: 2.2rem;
    margin-bottom: 5px;
}
.pix-container p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}
.pix-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
.pix-input-group .currency {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
}
.pix-input-group input {
    font-size: 1.5rem;
    padding: 10px;
    width: 150px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Elms Sans', sans-serif;
    outline: none;
}
.pix-input-group input:focus {
    border-color: #4CAF50;
}
.pix-input-group button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.2rem;
    font-family: 'Chewy', cursive;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 0 #388E3C;
    transition: transform 0.1s, box-shadow 0.1s;
}
.pix-input-group button:active {
    transform: translateY(4px);
    box-shadow: 0 0px 0 #388E3C;
}
#pixResult {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#qrcode {
    margin-bottom: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.pix-copy {
    display: flex;
    width: 100%;
    max-width: 400px;
    gap: 10px;
}
.pix-copy input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #555;
    background: #fff;
}
.pix-copy button {
    background: var(--accent-orange);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}
.pix-copy button:hover {
    background: #b35130;
}

/* Podcast Section */
.podcast-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.podcast-card {
    display: flex;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    align-items: center;
    border: 2px solid var(--accent-yellow);
}

.playable-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.playable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: var(--accent-orange);
}

.podcast-cover {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.podcast-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.podcast-info h3 {
    font-family: 'Chewy', cursive;
    color: var(--accent-purple);
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.podcast-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.podcast-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.3;
}

.btn-play-episode {
    background: var(--accent-orange);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-family: 'Chewy', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.2s;
    width: fit-content;
}

.btn-play-episode:hover {
    transform: scale(1.05);
}

/* Global Audio Player */
.global-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111;
    color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.global-player.hidden {
    transform: translateY(100%);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 30%;
}

.player-info img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
}

.player-title {
    font-family: 'Elms Sans', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.player-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-control {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-control:hover {
    color: #fff;
}

.play-btn {
    background: #fff;
    color: #111;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
}

.play-btn:hover {
    transform: scale(1.1);
    color: #111;
}

.speed-btn {
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #b3b3b3;
    border-radius: 5px;
    padding: 2px 5px;
}

.player-timeline {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #b3b3b3;
}

.player-timeline input[type="range"] {
    flex: 1;
    cursor: pointer;
    accent-color: var(--accent-orange);
}

/* Responsive */
@media (max-width: 600px) {
    .row { flex-direction: column; gap: 10px; }
    .intro h1 { font-size: 2.2rem; }
    .btn-primary { width: 100%; }
    
    .stamps-menu-sidebar {
        left: 55px; /* keep it opening to the right */
        top: 0;
        width: 250px;
    }
}

/* ====== FISH BACKGROUND ====== */
.pond {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: transparent;
  z-index: -1;
  pointer-events: none;
}

.fish {
  position: absolute;
  margin: -15px 0 0 -30px;
  opacity: 0;
  transition: transform 10s;
  animation: spawn .5s forwards;
  pointer-events: auto;
}
@keyframes spawn {
  100% { opacity: 1; }
}

.fish-bob {
  position: relative;
  margin-top: -20px;
  animation: bob 6s infinite;
}
@keyframes bob {
  50% { transform: translateY(40px); }
}

.fish-direction {
  position: relative;
  transition: transform .5s;
}

.fish-body {
  position: relative;
  margin-left: 10px;
  width: 50px;
  height: 30px;
  border-radius: 50%;
  border-bottom: solid 1px rgba(0, 0, 0, .2);
  transition: transform 2s ease-out;
  cursor: pointer;
}
.fish-body::before {
  content: '';
  display: block;
  position: absolute;
  left: -10px;
  width: 0;
  height: 0;
  border-left: solid 25px orange;
  border-top: solid 15px transparent;
  border-bottom: solid 15px transparent;
}
.fish-body::after {
  content: '';
  display: block;
  position: absolute;
  top: 8px;
  left: 34px;
  width: 6px;
  height: 6px;
  background-color: #fff;
  border-radius: 50%;
}

.fish-1 .fish-body { background-color: #d49919; }
.fish-1 .fish-body::before { border-left-color: #d49919; }
.fish-2 .fish-body { background-color: #74a135; }
.fish-2 .fish-body::before { border-left-color: #74a135; }
.fish-3 .fish-body { background-color: #806fad; }
.fish-3 .fish-body::before { border-left-color: #806fad; }
.fish-4 .fish-body { background-color: #d97eb6; }
.fish-4 .fish-body::before { border-left-color: #d97eb6; }

.fish-flip .fish-direction { transform: scaleX(-1); }

.fish-spin .fish-body { transform: rotate(720deg); }

.bubble {
  position: absolute;
  width: 6px;
  height: 6px;
  border: solid 1px #fff;
  border-radius: 50%;
  margin: -15px 0 0 20px;
  transform-origin: center top;
  animation: bubble 4s linear forwards;
}
@keyframes bubble {
  100% {
    transform: translateY(-200px) rotate(-1080deg);
    opacity: 0;
  }
}

.bubble-flip {
  margin-left: -28px;
  animation-name: bubble-flip;
}
@keyframes bubble-flip {
  100% {
    transform: translateY(-200px) rotate(1080deg);
    opacity: 0;
  }
}

