@font-face {
    font-family: 'HandwritingUwu';
    src: url('HandwritingUwuByMonicaartie-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: transparent !important;
    background-color: transparent !important;
    font-family: 'HandwritingUwu', 'Comic Sans MS', cursive;
    min-height: 100%;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF69B4 0%, #DA70D6 50%, #40E0D0 100%);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.8), 0 0 40px rgba(218, 112, 214, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.3);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FF1493 0%, #BA55D3 50%, #00CED1 100%);
    box-shadow: 0 0 25px rgba(255, 20, 147, 1), 0 0 50px rgba(186, 85, 211, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.5);
}

html, body {
    scrollbar-width: thin;
    scrollbar-color: #FF69B4 transparent;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 15px 25px 10px 25px;
    text-align: center;
}

.header {
    margin-bottom: 20px;
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.title-line {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.title-letter {
    font-family: 'HandwritingUwu', cursive;
    font-size: 58px;
    color: #1a1a1a;
    display: inline-block;
    position: relative;
    animation: letterBounce 2s ease-in-out infinite;
}

.title-letter::before,
.title-letter::after {
    content: attr(data-letter);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.7;
}

.title-letter::before {
    color: #ff0000;
    animation: rgbShiftRed 0.1s infinite;
}

.title-letter::after {
    color: #00ffff;
    animation: rgbShiftCyan 0.1s infinite;
}

.title-bottom .title-letter {
    font-size: 68px;
}

@keyframes letterBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes rgbShiftRed {
    0%, 100% {
        transform: translate(-2px, 0);
    }
    50% {
        transform: translate(-1px, 1px);
    }
}

@keyframes rgbShiftCyan {
    0%, 100% {
        transform: translate(2px, 0);
    }
    50% {
        transform: translate(1px, -1px);
    }
}

.header p {
    font-family: 'HandwritingUwu', cursive;
    color: #1a1a1a;
    font-size: 22px;
    margin-top: 15px;
}

.gradient-box {
    background: linear-gradient(135deg, #7FFFD4 0%, #40E0D0 50%, #48D1CC 100%);
    border-radius: 25px;
    padding: 5px;
    margin-bottom: 15px;
    box-shadow: 0 6px 20px rgba(64, 224, 208, 0.4);
    width: 100%;
}

.gradient-box-inner {
    background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(240,255,255,0.97) 100%);
    border-radius: 21px;
    padding: 30px;
}

.prompt-label {
    display: block;
    font-family: 'HandwritingUwu', cursive;
    font-weight: normal;
    color: #1a1a1a;
    margin-bottom: 18px;
    font-size: 26px;
    text-align: center;
}

.prompt-input {
    width: 100%;
    padding: 22px 24px;
    border: 4px solid #40E0D0;
    border-radius: 18px;
    font-size: 22px;
    font-family: 'HandwritingUwu', cursive;
    color: #1a1a1a;
    outline: none;
    transition: all 0.3s;
    resize: none;
    min-height: 120px;
    background: #fff;
    text-align: center;
}

.prompt-input:focus {
    border-color: #00CED1;
    box-shadow: 0 0 0 5px rgba(64, 224, 208, 0.25);
}

.prompt-input::placeholder {
    color: #666;
}

.generate-btn {
    width: 100%;
    padding: 24px 36px;
    background: linear-gradient(90deg, #FF69B4, #FF1493, #C71585, #FF69B4);
    background-size: 300% 100%;
    color: #1a1a1a;
    border: 4px solid #fff;
    border-radius: 18px;
    font-size: 30px;
    font-weight: normal;
    cursor: pointer;
    font-family: 'HandwritingUwu', cursive;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.5);
    margin-top: 25px;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.6);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.generate-btn svg {
    width: 34px;
    height: 34px;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result-section {
    margin-top: 30px;
}

.result-box {
    background: linear-gradient(135deg, #98FB98 0%, #90EE90 50%, #7CFC00 100%);
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 6px 20px rgba(144, 238, 144, 0.5);
    width: 100%;
}

.result-box-inner {
    background: #fff;
    border-radius: 21px;
    padding: 20px;
}

.result-image {
    width: 100%;
    display: block;
    border-radius: 15px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
    padding: 18px 30px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    border: 4px solid #fff;
    border-radius: 15px;
    font-size: 24px;
    cursor: pointer;
    font-family: 'HandwritingUwu', cursive;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
}

.error-message {
    padding: 20px 24px;
    background: linear-gradient(135deg, #FFB6C1 0%, #FF69B4 100%);
    border: 4px solid #fff;
    border-radius: 18px;
    color: #8B0000;
    font-size: 20px;
    margin-top: 20px;
    font-family: 'HandwritingUwu', cursive;
    text-align: center;
}

.examples {
    margin-top: 15px;
}

.examples-box {
    background: linear-gradient(135deg, #DDA0DD 0%, #DA70D6 50%, #BA55D3 100%);
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 6px 20px rgba(186, 85, 211, 0.4);
    width: 100%;
}

.examples-box-inner {
    background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(255,240,255,0.97) 100%);
    border-radius: 21px;
    padding: 25px;
}

.examples-title {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 18px;
    font-family: 'HandwritingUwu', cursive;
    text-align: center;
}

.example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.example-chip {
    padding: 14px 22px;
    background: linear-gradient(135deg, #E6E6FA 0%, #D8BFD8 100%);
    border: 3px solid #BA55D3;
    border-radius: 30px;
    font-size: 18px;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'HandwritingUwu', cursive;
}

.example-chip:hover {
    background: linear-gradient(135deg, #DDA0DD 0%, #DA70D6 100%);
    color: #fff;
    transform: translateY(-3px);
}

.status-text {
    text-align: center;
    font-size: 22px;
    color: #1a1a1a;
    margin-top: 20px;
    font-family: 'HandwritingUwu', cursive;
}

.hidden {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .title-letter {
        font-size: 42px;
    }

    .title-bottom .title-letter {
        font-size: 50px;
    }

    .header p {
        font-size: 18px;
    }

    .gradient-box-inner {
        padding: 22px;
    }

    .prompt-label {
        font-size: 22px;
    }

    .prompt-input {
        font-size: 18px;
        padding: 18px 20px;
        min-height: 100px;
    }

    .generate-btn {
        font-size: 24px;
        padding: 20px 28px;
    }

    .generate-btn svg {
        width: 28px;
        height: 28px;
    }

    .examples-box-inner {
        padding: 20px;
    }

    .examples-title {
        font-size: 20px;
    }

    .example-chip {
        font-size: 16px;
        padding: 12px 18px;
    }

    .download-btn {
        font-size: 20px;
        padding: 16px 24px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .title-letter {
        font-size: 32px;
    }

    .title-bottom .title-letter {
        font-size: 38px;
    }

    .header {
        margin-bottom: 25px;
    }

    .header p {
        font-size: 16px;
        margin-top: 10px;
    }

    .gradient-box {
        border-radius: 18px;
        margin-bottom: 18px;
    }

    .gradient-box-inner {
        border-radius: 14px;
        padding: 18px;
    }

    .prompt-label {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .prompt-input {
        font-size: 16px;
        padding: 16px 18px;
        min-height: 90px;
        border-radius: 14px;
        border-width: 3px;
    }

    .generate-btn {
        font-size: 20px;
        padding: 18px 24px;
        border-radius: 14px;
        margin-top: 18px;
        gap: 10px;
    }

    .generate-btn svg {
        width: 24px;
        height: 24px;
    }

    .examples {
        margin-top: 18px;
    }

    .examples-box {
        border-radius: 18px;
    }

    .examples-box-inner {
        border-radius: 14px;
        padding: 16px;
    }

    .examples-title {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .example-chips {
        gap: 10px;
    }

    .example-chip {
        font-size: 14px;
        padding: 10px 16px;
        border-radius: 22px;
    }

    .result-box {
        border-radius: 18px;
    }

    .result-box-inner {
        border-radius: 14px;
        padding: 15px;
    }

    .result-image {
        border-radius: 12px;
    }

    .download-btn {
        font-size: 18px;
        padding: 14px 20px;
        border-radius: 12px;
        margin-top: 15px;
    }

    .error-message {
        font-size: 16px;
        padding: 16px 20px;
        border-radius: 14px;
    }

    .status-text {
        font-size: 18px;
    }
}
