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

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.6;
    color: #333;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

h1 {
    color: #ff4a93;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

h2 {
    color: #7166ee;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.btn {
    background-color: #ff4a93;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 74, 147, 0.3);
    margin: 10px 5px;
}

.btn:hover {
    background-color: #ff76ad;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 74, 147, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #7166ee;
    box-shadow: 0 4px 8px rgba(113, 102, 238, 0.3);
}

.btn-secondary:hover {
    background-color: #8d85f2;
    box-shadow: 0 6px 12px rgba(113, 102, 238, 0.4);
}

input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
    margin: 10px auto;
    display: block;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #7166ee;
}

/* Welcome page styles and animations */
.welcome-container {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.welcome-container .card {
    animation: cardAppear 1.5s ease-out;
}

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

.welcome-container h1 {
    font-family: 'Dancing Script', cursive;
    animation: colorCycle 5s infinite;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

@keyframes colorCycle {
    0% { color: #ff4a93; }
    25% { color: #ff76ad; }
    50% { color: #9D80FF; }
    75% { color: #7166ee; }
    100% { color: #ff4a93; }
}

/* Balloon animations */
.balloon-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.balloon {
    width: 60px;
    height: 70px;
    background-color: var(--balloon-color);
    border-radius: 50%;
    margin: 0 10px;
    position: relative;
    animation: float 5s ease-in-out infinite;
}

.welcome-container .balloon {
    animation: float 5s ease-in-out infinite, sway 3s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.welcome-container .balloon:nth-child(2) {
    animation-delay: 1s, 0.5s;
}

.welcome-container .balloon:nth-child(3) {
    animation-delay: 2s, 1s;
}

.welcome-container .balloon:nth-child(4) {
    animation-delay: 0.5s, 1.5s;
}

.balloon:nth-child(2) {
    animation-delay: 1s;
}

.balloon:nth-child(3) {
    animation-delay: 2s;
}

.balloon:nth-child(4) {
    animation-delay: 0.5s;
}

.balloon:before {
    content: '';
    position: absolute;
    width: 2px;
    height: 80px;
    background-color: #ccc;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes sway {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-5px) translateY(-10px);
    }
    75% {
        transform: translateX(5px) translateY(-10px);
    }
}

/* Welcome page text animations */
.welcome-container p {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.welcome-container p:nth-of-type(1) {
    animation-delay: 0.5s;
}

.welcome-container p:nth-of-type(2) {
    animation-delay: 1s;
}

.welcome-container p:nth-of-type(3) {
    animation-delay: 1.5s;
}

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

/* Button animations for welcome page */
.welcome-container .btn {
    opacity: 0;
    animation: pulseButton 1.5s ease-out 2s forwards;
    position: relative;
    overflow: hidden;
}

.welcome-container .btn:after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes pulseButton {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* Sparkle effect */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 0 10px 2px white;
    opacity: 0;
    pointer-events: none;
}

@keyframes sparkle {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    20% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Password section */
.password-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.hidden {
    display: none;
}

.success-message {
    color: #33cc33;
    font-weight: bold;
}

.error-message {
    color: #ff3333;
    font-weight: bold;
}

/* Responsive design */
@media (max-width: 768px) {
    .card {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .balloon {
        width: 40px;
        height: 50px;
    }
}