@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-Regular.otf') format('opentype');
    font-weight: 400;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-Medium.otf') format('opentype');
    font-weight: 500;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-SemiBold.otf') format('opentype');
    font-weight: 600;
}

@font-face {
    font-family: 'Metropolis';
    src: url('../fonts/Metropolis-Bold.otf') format('opentype');
    font-weight: 700;
}

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

body {
    font-family: 'Metropolis', sans-serif;
    background: url('../img/bg_tile.png') repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.steps-container {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.step {
    display: none;
    width: 100%;
    position: relative;
}

.step.active {
    display: block;
}

.step.slide-in-right {
    display: block;
    animation: slideInRight 0.35s ease-out forwards;
}

.step.slide-in-left {
    display: block;
    animation: slideInLeft 0.35s ease-out forwards;
}

.step.slide-in-up {
    display: block;
    animation: slideInUp 0.5s ease-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    height: 60px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.back-button {
    cursor: pointer;
    transition: transform 0.2s;
}

.back-button:hover {
    transform: scale(1.1)
}

.back-button img {
    width: 45px;
    height: 45px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 50px 0 25px 0;
}

.header-penguin {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #4682b4;
    margin-top: 0;
}

p {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 10px 0 20px 0;
}

.input-container {
    position: relative;
    margin-bottom: 10px;
}

input {
    width: 100%;
    padding: 15px 50px 15px 15px;
    font-size: 16px;
    font-family: 'Metropolis', sans-serif;
    border: 2px solid #ccc;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #4682b4;
}

input.valid {
    border-color: #4caf50;
}

input.invalid {
    border-color: #f44336;
}

.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.validation-icon.valid {
    background-image: url('../img/happy_emoji.png');
}

.validation-icon.invalid {
    background-image: url('../img/stressed_emoji.png');
}

.error-message {
    color: #f44336;
    font-size: 12px;
    margin-bottom: 15px;
    min-height: 0;
    padding-left: 5px;
}

.next-button {
    width: 100%;
    padding: 13px;
    font-size: 17px;
    font-weight: 600;
    font-family: 'Metropolis', sans-serif;
    background: #F46200;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 3px 0px rgba(0, 0, 0, 0.1), inset 0 -3px 0px rgba(0, 0, 0, 0.1);
}

.next-button:hover {
    transform: scale(1.05)
}

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.spinner {
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-container h2 {
    font-size: 24px;
    color: #4682b4;
    font-weight: 600;
}

.welcome-container {
    text-align: center;
    padding: 30px 0;
}

.welcome-penguin {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
}

.welcome-container p {
    font-size: 14px;
    line-height: 1.2;
    color: #666;
}

@media (max-width: 768px) {
    .header-container {
        margin: 40px 0 20px 0;
    }
    
    .header-penguin {
        width: 60px;
        height: 60px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .back-button img {
        width: 40px;
        height: 40px;
    }
}