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

:root {
    --bg-color: #FFFDE7; /* Light Vibrant Cream */
    --primary: #FF9CEE; /* Vibrant Pink */
    --primary-dark: #FF6BE6;
    --secondary: #FFC300; /* Vibrant Yellow */
    --secondary-dark: #FFAA00;
    --accent: #00E5FF; /* Vibrant Cyan */
    --accent-dark: #00B8D4;
    --success: #00E676; /* Vibrant Green */
    --rose: #FF007F; /* Bright Rose */
    --text: #264653; /* Dark Charcoal Grey */
    --white: #ffffff;
    --bg-card: #ffffff;
    --shadow: 0 10px 40px rgba(38, 70, 83, 0.2); 
    --border-dark: 2px solid rgba(38, 70, 83, 0.25);
}

body {
    font-family: 'Baloo Bhaijaan 2', cursive;
    background: transparent;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: var(--text);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 2rem 1rem;
}

/* خلفية التطبيق النظيفة - المرسم السحري */
.garden-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background: var(--bg-color);
    transition: background 1s ease;
    overflow: hidden;
}

/* Watercolor splashes */
.garden-bg::before, .garden-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
}
.garden-bg::before {
    top: -20%; left: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--rose) 0%, transparent 70%);
    animation: blobFloat 8s infinite alternate ease-in-out;
}
.garden-bg::after {
    bottom: -20%; right: -10%;
    width: 70vw; height: 70vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    animation: blobFloat 10s infinite alternate-reverse ease-in-out;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

.star-dust {
    position: absolute;
    bottom: -50px;
    background: rgba(255, 209, 102, 0.6); 
    border-radius: 50%;
    animation: floatUp infinite linear;
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.8);
}
@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-110vh) scale(0.5); opacity: 0; }
}

.cloud-shadow {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    background: rgba(255, 209, 102, 0.2);
    animation: drift infinite linear;
    z-index: -2;
    font-size:0; /* Hide cloud text */
}
@keyframes drift {
    0% { transform: translateX(110vw); }
    100% { transform: translateX(-30vw); }
}

.captain-avatar {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 5rem;
    z-index: 10;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.container {
    background: var(--white);
    border: 8px solid var(--primary-dark);
    border-radius: 40px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), inset 0 0 40px rgba(0, 0, 0, 0.02);
    width: 90%;
    max-width: 700px;
    text-align: center;
    transition: all 0.4s ease;
    z-index: 10;
    position: relative;
    margin: auto;
}

/* Audio & Text wrappers */
.text-with-audio {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 0.5rem;
}
.subtitle-audio {
    margin-bottom: 2.5rem;
}

.title {
    font-size: 4rem;
    color: var(--accent-dark);
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    margin: 0;
}

.subtitle {
    font-size: 1.8rem;
    color: var(--text);
    line-height: 1.6;
    font-weight: 700;
    margin: 0;
}

/* أزرار السماعة */
.speak-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 0;
}
.speak-btn:hover {
    transform: scale(1.1);
    background: var(--secondary);
    color: var(--text);
}
.speak-btn:active {
    transform: scale(0.95);
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 1.5rem;
}

.input-audio-wrapper {
    position: relative;
    width: 85%;
}

input {
    width: 100%;
    padding: 20px 60px 20px 25px;
    font-size: 1.8rem;
    border: 6px solid var(--primary-dark);
    border-radius: 25px;
    outline: none;
    background: var(--white);
    color: var(--text);
    transition: all 0.3s;
    font-family: 'Baloo Bhaijaan 2', cursive;
    text-align: center;
    font-weight: 800;
}
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(244, 143, 177, 0.6);
}

.input-speak {
    position: absolute;
    left: 15px; 
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}
.input-speak:hover {
    transform: translateY(-50%) scale(1.1);
}

.flower-btn {
    background: var(--secondary);
    color: var(--text);
    border: none;
    width: 140px;
    height: 140px;
    border-radius: 50% 60% 70% 40% / 40% 50% 60% 50%;
    font-size: 2.2rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'Baloo Bhaijaan 2', cursive;
    border: 5px solid var(--secondary-dark);
    box-shadow: 0 10px 25px rgba(255, 209, 102, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}
.flower-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.flower-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 35px rgba(255, 209, 102, 0.8);
    background: var(--accent);
    border-color: var(--accent-dark);
}
.flower-btn:active {
    transform: scale(0.95);
}

.error-message {
    color: #E53935;
    font-weight: 800;
    font-size: 1.5rem;
    min-height: 40px;
    opacity: 0;
    transition: opacity 0.3s;
    background: rgba(255,255,255,0.8);
    padding: 10px 20px;
    border-radius: 15px;
    border: 2px solid #E53935;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.error-message.show {
    opacity: 1;
}

.hidden {
    display: none !important;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.flower-card {
    position: relative;
    width: 160px;
    height: 160px;
    background: #E8C396;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.1) 0px, rgba(255,255,255,0.1) 2px, transparent 2px, transparent 4px);
    border-radius: 40% 50% 60% 40% / 50% 40% 60% 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    margin: 10px;
    border: 4px solid #C08B5C;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15), inset 0 0 15px rgba(255,255,255,0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.flower-card::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 25px;
    height: 25px;
    background: var(--bg-color);
    border-radius: 50%;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.2);
    border: 2px solid #C08B5C;
}
.flower-card:hover {
    transform: translateY(-10px) scale(1.1);
    border-color: var(--accent);
    box-shadow: 0 15px 25px rgba(78, 168, 222, 0.4);
}
.flower-card .glass {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.flower-card .petals {
    display: none;
}
.icon {
    font-size: 3.5rem;
    transition: transform 0.3s;
}
.flower-card:hover .icon {
    transform: scale(1.1);
}
.flower-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin: 5px 0 0 0;
}

.card-speak {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    background: rgba(255,255,255,0.3);
}
.card-speak:hover {
    background: var(--secondary);
}
