:root {
    --background: #1a1a1a;
    --text: #ffffff;
    --accent: #2d2d2d;
    --success: #4caf50;
    --error: #f44336;
    --button: #3700B3;
    --button-hover: #6200ee;
}

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

body {
    font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f9d423 0%, #ff4e50 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
    transition: background 0.7s cubic-bezier(.68,-0.55,.27,1.55);
    overflow-x: hidden;
}

.container {
    max-width: 600px;
    margin: 60px auto 40px auto;
    padding: 36px 30px 30px 30px;
    text-align: center;
    background: rgba(255,255,255,0.13);
    border-radius: 32px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.17);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,0.18);
}

h1 {
    font-size: 2.7em;
    margin-bottom: 12px;
    font-weight: 700;
    color: #ff4e50;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.emoji {
    font-size: 1.2em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18));
    margin: 0 0.1em;
    animation: emoji-pop 1.2s cubic-bezier(.68,-0.55,.27,1.55) infinite alternate;
}

@keyframes emoji-pop {
    0% { transform: scale(1) rotate(-7deg); }
    100% { transform: scale(1.15) rotate(7deg); }
}

h2 {
    font-size: 2em;
    color: #f9d423;
    margin-bottom: 38px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(255, 78, 80, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.search-container {
    margin-top: 30px;
}

input[type="text"] {
    width: 70%;
    padding: 14px 24px;
    margin: 8px 0;
    border: none;
    border-radius: 32px;
    background: rgba(255,255,255,0.18);
    color: #2d2d2d;
    font-size: 18px;
    font-family: inherit;
    box-shadow: 0 2px 12px 0 rgba(255, 212, 35, 0.07);
    transition: box-shadow 0.2s, background 0.2s;
}
input[type="text"]:focus {
    outline: 2px solid #ff4e50;
    background: #fffbe6;
    box-shadow: 0 2px 18px 0 rgba(255, 78, 80, 0.13);
}

button {
    padding: 14px 32px;
    margin: 8px;
    border: none;
    border-radius: 32px;
    background: linear-gradient(90deg, #ff4e50 0%, #f9d423 100%);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-family: inherit;
    font-weight: 700;
    box-shadow: 0 4px 16px 0 rgba(249, 212, 35, 0.13);
    transition: background 0.3s cubic-bezier(.68,-0.55,.27,1.55), transform 0.2s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
button:hover {
    background: linear-gradient(90deg, #f9d423 0%, #ff4e50 100%);
    transform: scale(1.07) rotate(-2deg);
    box-shadow: 0 6px 24px 0 rgba(255, 78, 80, 0.18);
}
button:active {
    transform: scale(0.97) rotate(2deg);
}

button:hover {
    background-color: var(--button-hover);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: rgba(255,255,255,0.9);
    margin: 15% auto;
    padding: 38px 30px 30px 30px;
    width: 80%;
    max-width: 500px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.17);
    color: #2d2d2d;
    font-family: 'Fredoka', sans-serif;
}

.modal-buttons {
    margin-top: 20px;
}

/* Result Modal Variations */
.success {
    background-color: var(--success);
}

.error {
    background-color: var(--error);
}

#resultModal .modal-content {
    padding: 48px 34px 36px 34px;
}

#thinkingIndicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    min-height: 48px;
}

.thinking-dots {
    display: inline-block;
    font-size: 2.2em;
    color: #ff4e50;
    letter-spacing: 0.15em;
    font-weight: bold;
}
.thinking-dots span {
    opacity: 0.4;
    animation: bounce 1.2s infinite;
    display: inline-block;
}
.thinking-dots span:nth-child(1) { animation-delay: 0s; }
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-10px); opacity: 1; }
}

.thinking-text {
    font-size: 1.1em;
    color: #ff4e50;
    margin-top: 2px;
    letter-spacing: 0.04em;
    font-weight: 500;
}

#resultMessage {
    font-size: 1.2em;
    margin-bottom: 20px;
}
