* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: palegreen;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: auto;
}

.container {
    background-color: whitesmoke;
    width: 90%;
    max-width: 800px;
    min-height: 90vh;
    padding: 40px 50px;
    box-shadow: 0 0 20px 10px rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 2.2em;
    font-weight: 600;
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px;
    background-color: white;
    transition: all 0.3s ease;
}

.input-group:hover {
    border-color: #4CAF50;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.input-group i {
    padding: 15px 20px;
    background-color: #f8f8f8;
    font-size: 18px;
    color: #555;
    border-radius: 8px 0 0 8px;
}

.input-group input {
    border: none;
    outline: none;
    padding: 15px 20px;
    width: 100%;
    font-size: 18px;
    background-color: transparent;
}

.btn {
    width: 100%;
    padding: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.flash {
    color: red;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.input-name {
    width: 100%;
    position: relative;
    margin: 0 auto 15px;
}

form.control {
    visibility: hidden;
    position: absolute;
    top: 40px;
    right: 10px;
}

form.control.success input {
    border-color: #4CAF50;
}

form.control.error input {
    border-color: #f44336;
}

.input-container {
    position: relative;
    margin-bottom: 25px; 
    width: 100%;
}

.input-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #777;
    z-index: 1;
}

input {
    width: 100%;
    padding: 18px 20px 18px 55px; 
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-sizing: border-box; 
    transition: all 0.3s ease;
    background-color: white;
}

input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.error {
    color: #f44336;
    font-size: 13px;
    margin-top: 8px; 
    display: block;
    text-align: left;
    padding-left: 55px;
    font-weight: 500;
}

.invalid {
    border: 2px solid #f44336 !important;
    background-color: #fff8f8;
}

/* Make form elements more balanced */
.form-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 30px 25px;
        min-height: 95vh;
    }
    
    h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    
    .input-group i {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .input-group input {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .btn {
        padding: 15px;
        font-size: 18px;
    }
    
    input {
        padding: 15px 15px 15px 50px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .input-group i {
        padding: 10px 12px;
    }
}

.input-container textarea {
    width: 100%;
    padding: 18px 20px 18px 55px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-color: white;
    font-family: Arial, sans-serif;
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
    line-height: 1.5;
}

.input-container textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.input-container textarea ~ i {
    top: 18px;
    transform: none;
    position: absolute;
}


.input-container:has(textarea) i {
    top: 18px;
    transform: none;
}

.char-counter {
    position: absolute;
    bottom: 8px;
    right: 15px;
    font-size: 12px;
    color: #777;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 2;
}