/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font styles */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298, #00909e);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* Main container */
.container {
    width: 100%;
    max-width: 900px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    padding: 40px;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
}

/* Hover Effect */
.container:hover {
    transform: translate(0, -10px);
    /* Moves the container slightly upward */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    /* Increase shadow for a floating effect */
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo img {
    height: 80px;
    width: 80px;
    margin-right: 10px;
    border-radius: 10px;
    border: 2px solid #fff;
}

header h1 {
    font-size: 50px;
    font-weight: 700;
    color: #1d1b41;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
}

header h3 {
    font-weight: 400;
    color: #1d1b41;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    color: #272044;
    opacity: 0.8;
    font-style: italic;
}

/* Form section */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0px 15px 40px rgba(65, 50, 100, 0.1);
    border-radius: 12px;
    width: 100%;
}

form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.user-input {
    flex-grow: 1;
    padding: 12px 24px;
    font-size: 16px;
    border: 2px solid #1d1b41;
    border-radius: 8px;
    background-color: #f0f8ff;
    color: #272044;
    font-weight: 400;
    line-height: 1.6;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

/* Focus Effect on User Input */
.user-input:focus {
    border-color: #2a5298;
    box-shadow: 0 0 5px rgba(42, 82, 152, 0.5);
    transform: scale(1.02);
}

/* General placeholder styling */
.user-input::placeholder {
    color: #6c757d;
    font-size: 16px;
    font-style: italic;
    opacity: 1;
    transition: all 0.3s ease;
}

/* Submit Button Styling */
.submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #1e3c72, #2a5298, #00909e);
    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Submit Button Hover Effect */
.submit-btn:hover {
    background: linear-gradient(135deg, #007f8d, #1d1b41);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Submit Button Active Effect */
.submit-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

.submit-btn:disabled {
    opacity: 0.5;
}

/* Output section */
.output {
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.95);
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    line-height: 1.8;
    border-left: 5px solid #1d1b41;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
    color: #272044;
    font-style: italic;
    transition: background-color 0.3s ease;
}

.output:hover {
    background-color: #f7f9fc;
}

.output strong {
    color: #272044;
}

.hidden {
    display: none;
}

.waiting {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.hint {
    line-height: 1.5;
    margin-top: 5px;
    opacity: 0.6;
    font-size: 12px;
    color: #1d1b41;
    font-style: italic;
}

/* Footer styles */
footer {
    margin-top: 30px;
    font-size: 17px;
    color: #1d1b41;
    text-align: center;
}

footer a {
    color: #1d1b41;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
    color: #007f8d;
}

footer a:active {
    color: #2a5298;
}


/* Responsive Design */
/* Phones and very small devices */
@media screen and (max-width: 480px) {
    header h1 {
        font-size: 24px;
        text-align: center;
    }

    header h3 {
        font-size: 24px;
        text-align: center;
        margin-bottom: 10px;
    }

    .container {
        max-width: 95%;
        padding: 15px;
    }

    form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    #user-input,
    #submit-btn {
        width: 100%;
    }

    .user-input {
        font-size: 14px;
        padding: 12px 16px;
    }

    .user-input::placeholder {
        font-size: 14px;
        color: #4a4a4a;
        opacity: 1;
    }

    #submit-btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    #output {
        font-size: 14px;
        padding: 15px;
    }

    .hint {
        font-size: 12px;
    }
}

/* Tablets and medium devices */
@media screen and (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 28px;
        text-align: center;
    }

    header h3 {
        font-size: 22px;
        text-align: center;
    }

    form {
        flex-direction: column;
        gap: 15px;
    }

    #user-input {
        font-size: 16px;
        padding: 14px 18px;
    }

    .user-input::placeholder {
        font-size: 15px;
        color: #555;
    }

    #submit-btn {
        font-size: 16px;
        padding: 14px;
        padding: 20px;
    }

    #output {
        font-size: 16px;
    }
}

/* Larger mobile screens and smaller tablets */
@media screen and (max-width: 1024px) {
    header h1 {
        font-size: 32px;
    }

    header h3 {
        font-size: 24px;
    }

    .container {
        padding: 30px;
    }

    .user-input::placeholder {
        font-size: 17px;
        color: #6c757d;
    }

    .output {
        font-size: 18px;
        padding: 20px;
    }
}