:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --success: #10B981;
    --error: #EF4444;
    --bg-color: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #475569;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.background-shapes {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.shape-1 {
    background: #4F46E5;
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
}

.shape-2 {
    background: #EC4899;
    width: 350px;
    height: 350px;
    bottom: -50px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    background: #06B6D4;
    width: 300px;
    height: 300px;
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(180deg); }
}

.widget-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: none;
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.widget-header {
    text-align: center;
    margin-bottom: 32px;
}

.widget-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #60A5FA, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.widget-header p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.form-group input::placeholder {
    color: #64748B;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn.loading span {
    display: none;
}

.submit-btn.loading .loader {
    display: block;
}

.loader {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.result-display {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
}

.status-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.result-display h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.result-display p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.reset-btn {
    padding: 10px 24px;
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 520px) {
    .widget-container {
        margin: 20px;
        padding: 30px 20px;
    }
}
