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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

.hero-section {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.main-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

.form-container {
    padding: 40px 30px;
}

.conversion-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 15px 18px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #1877f2;
    background: white;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
    transform: translateY(-1px);
}

.form-group input:valid {
    border-color: #28a745;
    background: white;
}

.submit-btn {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.3);
}

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

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.success-message {
    padding: 40px 30px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

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

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 20px;
    animation: bounce 0.6s ease-out 0.2s both;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-15px,0);
    }
    70% {
        transform: translate3d(0,-7px,0);
    }
    90% {
        transform: translate3d(0,-2px,0);
    }
}

.success-message h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.success-message p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.new-conversion-btn {
    background: transparent;
    color: #1877f2;
    border: 2px solid #1877f2;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.new-conversion-btn:hover {
    background: #1877f2;
    color: white;
    transform: translateY(-1px);
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    .hero-section {
        padding: 30px 20px;
    }
    
    .main-title {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .success-message {
        padding: 30px 20px;
    }
    
    .form-group input {
        padding: 12px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .submit-btn {
        padding: 15px 25px;
    }
}

/* Focus styles for accessibility */
.submit-btn:focus,
.new-conversion-btn:focus {
    outline: 3px solid rgba(24, 119, 242, 0.3);
    outline-offset: 2px;
}

/* Loading state */
.loading .btn-text {
    opacity: 0;
}

.loading .btn-loader {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

