body {
    box-sizing: border-box;
    margin: 0;
    min-height: 100vh;
    padding: 2rem 1rem 8rem;
    font-family: Arial, sans-serif;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(45, 189, 98, 0.582) 0%, transparent 50%),
        radial-gradient(circle at bottom right, rgba(167, 139, 250, 0.35) 0%, transparent 50%),
        linear-gradient(135deg, #f0fdf4 0%, #eef2ff 45%, #f5f3ff 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.85;
}

body::before {
    top: -80px;
    left: -80px;
    background: rgba(34, 197, 94, 0.25);
}

body::after {
    right: -80px;
    bottom: -80px;
    background: rgba(139, 92, 246, 0.24);
}

* {
    box-sizing: border-box;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

@keyframes celebrate {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes pulseGreen {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(65, 171, 93, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(65, 171, 93, 0);
    }
}

.main-container {
    width: min(92vw, 560px);
    max-width: 560px;
    padding: 2rem 1.5rem 2.2rem;
    background: rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.title {
    font-size: 32px;
    color: #41ab5d;
    text-align: center;
    margin-top: 30px;
    font-weight: 800;
    padding: 0 20px;
    line-height: 1.2;
    animation: fadeInDown 0.6s ease;
}

.subtitle {
    font-size: 17px;
    color: #64748b;
    text-align: center;
    margin-top: 10px;
    padding: 0 25px;
    animation: fadeInDown 0.6s ease 0.1s backwards;
}

.input-container {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

.result-container,
.TryesList {
    visibility: hidden;
}

.result-container.visible,
.TryesList.visible {
    visibility: visible;
    animation: popIn 0.35s ease;
}

.result-container.shake {
    animation: shake 0.4s ease;
}

.result-container.celebrate {
    animation: celebrate 0.4s ease;
}

#userGuess {
    font-size: 18px;
    color: #334155;
    text-align: center;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    background-color: white;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

#userGuess:focus {
    border-color: #41ab5d;
    box-shadow: 0 0 0 3px rgba(65, 171, 93, 0.15);
    transform: scale(1.01);
}

#guessButton {
    font-size: 17px;
    font-weight: 700;
    color: white;
    background-color: #41ab5d;
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 2px 8px rgba(65, 171, 93, 0.25);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

#guessButton:hover {
    background-color: rgba(65, 171, 93, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(65, 171, 93, 0.35);
}

#guessButton:active {
    transform: translateY(0) scale(0.97);
}

#guessButton:disabled {
    background-color: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    animation: pulseGreen 1.5s ease infinite;
}

.result-container {
    margin: 20px auto 0;
    padding: 16px 20px;
    max-width: 420px;
    width: calc(100% - 40px);
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#resultMessage {
    font-size: 18px;
    font-weight: bold;
    color: #334155;
    margin: 0;
    min-height: 24px;
    transition: color 0.2s ease;
    word-wrap: break-word;
}

.TryesList h2 {
    font-size: 18px;
    color: #334155;
    margin: 25px 0 10px;
}

#triesList {
    list-style: none;
    margin: 0 auto;
    padding: 10px 20px;
    max-width: 420px;
    width: calc(100% - 40px);
    max-height: 220px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: #334155;
    text-align: left;
}

#triesList li {
    position: relative;
    padding: 8px 0 8px 20px;
    font-size: 15px;
    border-bottom: 1px solid #f1f5f9;
    animation: slideInLeft 0.3s ease;
}

#triesList li:last-child {
    border-bottom: none;
}

#triesList li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #41ab5d;
    font-weight: bold;
}

#refreshButton {
    font-size: 16px;
    font-weight: 700;
    color: white;
    background-color: #41ab5d;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 25px;
    box-shadow: 0 2px 8px rgba(65, 171, 93, 0.25);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    animation: fadeInUp 0.4s ease;
}

#refreshButton:hover {
    background-color: rgba(65, 171, 93, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(65, 171, 93, 0.35);
}

#refreshButton:active {
    transform: translateY(0) scale(0.97);
}



.footer-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    z-index: 100;
}

.footer-signature {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

@media (min-width: 640px) {
    .footer-signature {
        font-size: 1rem;
    }
}

.signature-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #41ab5d;
    font-weight: 700;
    margin-left: 0.25rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.signature-link:hover {
    color: rgba(65, 171, 93, 0.8);
}

.ig-icon {
    transition: transform 0.2s ease;
}

.signature-link:hover .ig-icon {
    transform: scale(1.1);
}

.site-link-container {
    display: flex;
    justify-content: center;
}

.site-link {
    color: #41ab5d;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-link:hover {
    color: rgba(65, 171, 93, 0.8);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 480px) {
    .title {
        font-size: 26px;
    }

    .subtitle {
        font-size: 14px;
    }

    #resultMessage {
        font-size: 16px;
    }

    #triesList {
        font-size: 14px;
    }

    .footer-signature {
        font-size: 0.75rem;
    }

    .site-link {
        font-size: 0.75rem;
    }
}