:root {
    --bg-color: #0f0f0f;
    --accent-color: #ff1010;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-color: #e0e0e0;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(255, 16, 16, 0.15), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 16, 16, 0.05), transparent 30%);
    color: var(--text-color);
    font-family: var(--font-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

#header {
    margin-top: 15vh;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

#page-title {
    color: var(--text-color);
    font-weight: 300;
    font-size: 3rem;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(255, 16, 16, 0.3);
}

#page-title span {
    color: var(--accent-color);
    font-weight: 600;
}

#textbox-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 60%;
    max-width: 800px;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.textarea-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
}

.input {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-mono);
}

/* Textbox */
#textbox {
    width: 100%;
    height: 60px;
    padding: 1rem 1.5rem;
    padding-right: 3rem;
    /* Make room for clear button */
    resize: none;
    font-size: 1rem;
    line-height: 1.5;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

#textbox::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#textbox:hover {
    border-color: rgba(255, 16, 16, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

#textbox:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 16, 16, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

/* Clear Button */
#clear-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#clear-button:hover {
    background: rgba(255, 16, 16, 0.8);
    color: white;
}

/* Submit Button */
#submit-button {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

#submit-button img {
    width: 24px;
    height: 24px;
    filter: invert(1) opacity(0.8);
    transition: transform 0.3s ease;
}

#submit-button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 16, 16, 0.4);
    transform: translateY(-2px);
}

#submit-button:hover img {
    filter: invert(1) opacity(1);
    transform: scale(1.1) rotate(-10deg);
}

#submit-button:active {
    transform: translateY(0);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}