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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    will-change: auto;
    transform: translateZ(0);
}

.container {
    width: 100%;
    max-width: 450px;
}

.recaptmen-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #dadce0;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    will-change: box-shadow;
    transform: translateZ(0);
}

.recaptmen-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header {
    background: #fff;
    color: #202124;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dadce0;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo-text {
    font-size: 18px;
    font-weight: 400;
    color: #1a73e8;
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 12px;
    color: #5f6368;
    font-weight: 400;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-select {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #fff;
    color: #202124;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.language-select:hover {
    border-color: #1a73e8;
}

.language-select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.attempts-display {
    font-size: 12px;
    background: #f8f9fa;
    color: #5f6368;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #dadce0;
}

.challenge-area {
    padding: 24px 20px;
}

.target-display {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dadce0;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.target-char {
    font-size: 64px;
    margin-bottom: 8px;
    animation: bounce 4s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

.target-status {
    font-size: 32px;
    transition: all 0.3s ease;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) translateZ(0);
    }
    50% {
        transform: translateY(-8px) translateZ(0);
    }
}

.instruction {
    text-align: center;
    margin-bottom: 24px;
}

.instruction h3 {
    color: #202124;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 400;
}

.instruction p {
    color: #5f6368;
    font-size: 14px;
}

#target-name {
    color: #1a73e8;
    font-weight: 500;
}

.input-area {
    margin-bottom: 20px;
    position: relative;
}

#joke-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: #202124;
    will-change: border-color, box-shadow;
}

#joke-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 1px #1a73e8;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.submit-btn, .refresh-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    will-change: background-color, transform;
    transform: translateZ(0);
}

.submit-btn {
    background: #1a73e8;
    color: white;
}

.submit-btn:hover:not(:disabled) {
    background: #1557b0;
    transform: translateY(-1px) translateZ(0);
}

.submit-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
    transform: none;
}

.refresh-btn {
    background: #f8f9fa;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.refresh-btn:hover {
    background: #e8eaed;
    transform: translateY(-1px) translateZ(0);
}

.success-message, .failed-message {
    text-align: center;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    will-change: opacity, transform;
    transform: translateZ(0);
}

.success-message {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.success-message h3 {
    color: #0c4a6e;
    margin-bottom: 8px;
}

.success-message p {
    color: #0369a1;
}

.failed-message {
    background: #fef2f2;
    border: 1px solid #ef4444;
}

.failed-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.failed-message h3 {
    color: #7f1d1d;
    margin-bottom: 8px;
}

.failed-message p {
    color: #dc2626;
}

.verification-complete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: #10b981;
    color: white;
    border-radius: 4px;
    font-weight: 500;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: white;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.retry-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 16px;
}

.retry-btn:hover {
    background: #dc2626;
}

.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #5f6368;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e8eaed;
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
    will-change: transform;
}

@keyframes spin {
    0% { transform: rotate(0deg) translateZ(0); }
    100% { transform: rotate(360deg) translateZ(0); }
}

.success-message {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.failed-message {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.spinner {
    transform: translateZ(0);
}

@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .recaptmen-box {
        margin: 0 10px;
    }
    
    .challenge-area {
        padding: 20px 16px;
    }
    
    .target-char {
        font-size: 48px;
    }
    
    .target-status {
        font-size: 24px;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .target-char {
        animation: none;
    }
    
    .spinner {
        animation: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 